Custom Search

Wednesday, November 30, 2011

ubuntu 11 uninstall vmware-workstation

$ vmware-installer -u vmware-workstation

Sunday, November 27, 2011

How to create .pyc file or Compile Python Code


import
py_compile
py_compile.compile("myfile.py")

There’s also a compileall module which can be used to compile all modules in an entire directory tree.You can also automatically compile all files in a directory or directories using the compileall module.

import compileall 
compileall.compile_dir("my_project_dir", force=1)

Wednesday, November 9, 2011

Eucalyptus Not enough resources (0 < 1: vm instances

Eucalyptus Not enough resources (0 < 1: vm instances

Step-1
======
root@saju:~# euca-describe-availability-zones verbose
AVAILABILITYZONE cluster 192.168.0.103
AVAILABILITYZONE |- vm types free / max cpu ram disk
AVAILABILITYZONE |- m1.small 0000 / 0000 1 192 2
AVAILABILITYZONE |- c1.medium 0000 / 0000 1 256 5
AVAILABILITYZONE |- m1.large 0000 / 0000 2 512 10
AVAILABILITYZONE |- m1.xlarge 0000 / 0000 2 1024 20
AVAILABILITYZONE |- c1.xlarge 0000 / 0000 4 2048 20
root@saju:~#


Step-2
======
root@saju:~#
root@saju:~# euca_conf --deregister-cluster cluster
SUCCESS: cluster 'cluster' successfully deregistered.
root@saju:~#


Step-3
======
root@saju:~#
root@saju:~#
root@saju:~# euca_conf --register-cluster cluster 192.168.0.103
Trying rsync to sync keys with "192.168.0.103"...The authenticity of host '192.168.0.103 (192.168.0.103)' can't be established.
ECDSA key fingerprint is dc:67:55:82:19:86:6e:26:54:49:57:ee:6e:98:77:b0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.103' (ECDSA) to the list of known hosts.
done.
SUCCESS: new cluster 'cluster' on host '192.168.0.103' successfully registered.
root@saju:~#
root@saju:~#


Step-4
======
root@saju:~#
root@saju:~#
root@saju:~# euca_conf --no-rsync --discover-nodes
root@saju:~#
root@saju:~#


Step-5
======
root@saju:~#
root@saju:~#
root@saju:~# euca-describe-availability-zones verbose
AVAILABILITYZONE cluster 192.168.0.103
AVAILABILITYZONE |- vm types free / max cpu ram disk
AVAILABILITYZONE |- m1.small 0030 / 0030 1 192 2
AVAILABILITYZONE |- c1.medium 0024 / 0024 1 256 5
AVAILABILITYZONE |- m1.large 0012 / 0012 2 512 10
AVAILABILITYZONE |- m1.xlarge 0006 / 0006 2 1024 20
AVAILABILITYZONE |- c1.xlarge 0003 / 0003 4 2048 20
root@saju:~#
root@saju:~#
root@saju:~#

Step-5
======
Try Provision VM

Eucalyptus Not enough resources available: addresses (try --addressing private)

Eucalyptus Not enough resources available: addresses (try --addressing private)

1)Check Resources
------------------
root@saju:~# euca-describe-availability-zones verbose
AVAILABILITYZONE        cluster 192.168.0.111
AVAILABILITYZONE        |- vm types     free / max   cpu   ram  disk
AVAILABILITYZONE        |- m1.small     0030 / 0030   1    192     2
AVAILABILITYZONE        |- c1.medium    0024 / 0024   1    256     5
AVAILABILITYZONE        |- m1.large     0012 / 0012   2    512    10
AVAILABILITYZONE        |- m1.xlarge    0006 / 0006   2   1024    20
AVAILABILITYZONE        |- c1.xlarge    0003 / 0003   4   2048    20
root@saju:~#

2)Free up Resources
------------------
* Remove unwanted VMs and Disks



3)Restart Cloud controller
---------------------------
root@saju:~#
root@saju:~#
root@saju:~# service eucalyptus-cc restart
eucalyptus-cc start/running, process 27279
root@saju:~#
root@saju:~#


4)Check Resources again
------------------------
root@saju:~#
root@saju:~# euca-describe-availability-zones verbose
AVAILABILITYZONE        cluster 192.168.0.111
AVAILABILITYZONE        |- vm types     free / max   cpu   ram  disk
AVAILABILITYZONE        |- m1.small     0000 / 0000   1    192     2
AVAILABILITYZONE        |- c1.medium    0000 / 0000   1    256     5
AVAILABILITYZONE        |- m1.large     0000 / 0000   2    512    10
AVAILABILITYZONE        |- m1.xlarge    0000 / 0000   2   1024    20
AVAILABILITYZONE        |- c1.xlarge    0000 / 0000   4   2048    20
root@saju:~#
root@saju:~#
root@saju:~#

5)Check address
-----------------
root@saju:~# euca-describe-addresses
ADDRESS 192.168.0.21    available (admin)
ADDRESS 192.168.0.22    available (admin)
root@saju:~#
root@saju:~#

6)Release address
-----------------
root@saju:~# euca-release-address 192.168.0.21
ADDRESS 192.168.0.21
root@saju:~#
root@saju:~# euca-release-address 192.168.0.22
ADDRESS 192.168.0.22
root@saju:~#
root@saju:~#
root@saju:~#
root@saju:~# euca-describe-addresses
ADDRESS 192.168.0.21    nobody
ADDRESS 192.168.0.22    nobody
root@saju:~#
root@saju:~#


7)Try VM Provision
------------------------
End