Custom Search
Showing posts with label Cloud. Show all posts
Showing posts with label Cloud. Show all posts

Tuesday, May 22, 2012

vmware psphere find compute resource

from psphere.client import Client
from psphere.managedobjects import ComputeResource

client = Client("192.168.0.144", "root", "xxxxx")#ESXi node's IP

compute_res_list = ComputeResource.all(client)

print "=====cr_list=====", cr_list

for compute_res in compute_res_list:
    print "Compute Resource Name: ", compute_res.name



OUTPUT
=======

=====cr_list===== [psphere.managedobjects.ComputeResource object at 0xbc4f750>]

Compute Resource Name: localhost.



Note:
We can also find ComputeResource of vClient

Saturday, May 12, 2012

psphere hostsystem examples

psphere is a Python interface for the VMware vSphere Web Services SDK, a powerful API for programatically managing your VMware infrastructure.


IP of ESXi-5 Hots : 192.168.0.144


>>>
>>>
>>> from psphere.client import Client
>>>
>>> clnt = Client(server="192.168.0.144", username="root", password="xxxxx")
Logging to ~/.psphere/psphere.log at INFO level
>>>
>>>
>>> import psphere.managedobjects as mo
>>>
>>>
>>> mo.__dict__.keys()
['ResourcePool', 'HostActiveDirectoryAuthentication', 'SessionManager', 'HostDirectoryStore', 'EventHistoryCollector', 'AuthorizationManager', 'ViewManager', 'LicenseManager', 'HostLocalAccountManager', 'VirtualApp', 'Datacenter', 'InventoryView', 'ProfileComplianceManager', 'ClusterProfileManager', '__file__', 'TaskManager', 'HostPciPassthruSystem', 'HostFirmwareSystem', 'classmapper', 'EnvironmentBrowser', 'HostBootDeviceSystem', 'FileManager', 'PropertyCollector', 'HostProfile', 'EventManager', 'Datastore', 'HostPowerSystem', 'VirtualMachineSnapshot', 'ScheduledTask', 'Network', 'ClusterComputeResource', 'VirtualDiskManager', 'HostServiceSystem', 'SearchIndex', 'VirtualMachineProvisioningChecker', 'ClusterProfile', 'HostFirewallSystem', 'TaskHistoryCollector', 'IpPoolManager', 'ServiceInstance', '__builtins__', 'HostMemorySystem', 'PerformanceManager', '__name__', 'HttpNfcLease', 'CustomFieldsManager', 'DistributedVirtualSwitchManager', 'StorageResourceManager', 'HistoryCollector', 'ScheduledTaskManager', 'AlarmManager', 'HostSystem', 'ResourcePlanningManager', 'DistributedVirtualPortgroup', 'ManagedEntity', 'ComputeResource', 'HostPatchManager', 'HostSnmpSystem', 'HostDiagnosticSystem', 'UserDirectory', 'VmwareDistributedVirtualSwitch', 'ManagedObject', '__doc__', 'HostKernelModuleSystem', 'cached_property', 'HostDatastoreBrowser', 'classmap', 'ListView', 'HostVirtualNicManager', 'ProfileManager', 'LocalizationManager', 'HostDatastoreSystem', 'HostAutoStartManager', 'HostProfileManager', 'DiagnosticManager', 'Folder', 'OptionManager', 'Profile', 'VirtualMachine', 'HostHealthStatusSystem', 'ExtensibleManagedObject', 'CustomizationSpecManager', 'HostVMotionSystem', '__package__', 'Task', 'VirtualMachineCompatibilityChecker', 'OvfManager', 'HostLocalAuthentication', 'HostCpuSchedulerSystem', 'PropertyFilter', 'Alarm', 'HostStorageSystem', 'ContainerView', 'ManagedObjectView', 'HostAuthenticationManager', 'View', 'DistributedVirtualSwitch', 'LicenseAssignmentManager', 'VirtualizationManager', 'HostAuthenticationStore', 'ExtensionManager', 'HostDateTimeSystem', 'HostNetworkSystem']
>>>
>>>
>>>
>>> from psphere.managedobjects import HostSystem
>>>
>>>
>>> hosts = HostSystem.all(clnt)
>>>
>>>
>>> for host in hosts:
...     host.name
...
localhost.localdomain
>>>
>>>
>>>
>>> host = HostSystem.get(clnt, name="localhost.localdomain")
>>>
>>>
>>>
>>> host.name
localhost.localdomain
>>>
>>>
>>>
>>> host.summary.hardware
(HostHardwareSummary){
   vendor = "BIOSTAR Group"
   model = "A770E3"
   uuid = "00020003-0004-0005-0006-000700080009"
   otherIdentifyingInfo[] =
      (HostSystemIdentificationInfo){
         identifierValue = " None"
         identifierType =
            (ElementDescription){
               label = "AssetTag"
               summary = "AssetTag"
               key = "AssetTag"
            }
      },
      (HostSystemIdentificationInfo){
         identifierValue = "None"
         identifierType =
            (ElementDescription){
               label = "ServiceTag"
               summary = "ServiceTag"
               key = "ServiceTag"
            }
      },
   memorySize = 17179070464
   cpuModel = "AMD Athlon(tm) II X3 435 Processor"
   cpuMhz = 2900
   numCpuPkgs = 1
   numCpuCores = 3
   numCpuThreads = 3
   numNics = 1
   numHBAs = 6
 }
>>>
>>>
>>>
>>> host.summary.hardware.cpuModel
AMD Athlon(tm) II X3 435 Processor
>>>
>>>
>>>
>>> for vm in host.vm:
...     vm.name
...
ubuntu 12.04 real
vCenter Server Appliance5
vShield Manager
vCloud Director
vCD-1
cli-vm
>>>
>>>
>>>
>>>
>>> for vm in host.vm:
...     vm.summary.config
...
(VirtualMachineConfigSummary){
   name = "ubuntu 12.04 real"
   template = False
   vmPathName = "[datastore1] vm1/vm1.vmx"
   memorySizeMB = 1024
   numCpu = 1
   numEthernetCards = 1
   numVirtualDisks = 1
   uuid = "564d4e0a-3ca8-ebd9-8750-493b7136948b"
   instanceUuid = "52fe007b-291a-657a-3f42-ed77fb362c32"
   guestId = "ubuntu64Guest"
   guestFullName = "Ubuntu Linux (64-bit)"
   annotation = None
 }
--------------
(VirtualMachineConfigSummary){
   name = "vCenter Server Appliance5"
   template = False
   vmPathName = "[datastore1] vCenter Server Appliance5/vCenter Server Appliance5.vmx"
   memorySizeMB = 8192
   numCpu = 2
   numEthernetCards = 1
   numVirtualDisks = 2
   uuid = "564d0c4f-990f-5dea-6d5a-9d09cdfa26b2"
   instanceUuid = "526c78a5-d0ff-6470-3f04-09065a628d35"
   guestId = "sles11_64Guest"
   guestFullName = "Novell SUSE Linux Enterprise 11 (64-bit)"
   annotation = "VMware vCenter Server Appliance

Version 5.0 of VC running on SLES 11"
 }
>>>
>>>
>>>
>>>
>>> for vm in host.vm:
...     vm.summary.config.name
...     vm.summary.config.memorySizeMB
...     vm.summary.config.vmPathName
...     vm.summary.config.numCpu
...
ubuntu 12.04 real
1024
[datastore1] vm1/vm1.vmx
1
--------------
vCenter Server Appliance5
8192
[datastore1] vCenter Server Appliance5/vCenter Server Appliance5.vmx
2
>>>
>>>
>>>
>>>

Howto psphere Python interface for VMware vSphere Web Services SDK

psphere is a Python interface for the VMware vSphere Web Services SDK, a powerful API for programatically managing your VMware infrastructure.

1)
Install  psphere

$ pip install -U psphere


2)
Configure  psphere

$ cd ~
$ mkdir .psphere
$ cd .psphere
$ vim config.yaml
general:
    server: 192.168.0.144
    username: root
    password: xxxxx
    template_dir: ~/.psphere/templates/
logging:
    destination: ~/.psphere/psphere.log
    level: INFO # DEBUG, INFO, etc


3)
Open a Python Terminal and try following examples. 
IP of ESXi-5 Hots : 192.168.0.144

>>> from psphere.client import Client
>>>
>>> clnt = Client(server="192.168.0.144", username="root", password="xxxxx")
Logging to ~/.psphere/psphere.log at INFO level
>>>
>>> from psphere.managedobjects import VirtualMachine
>>>
>>> vms = VirtualMachine.all(clnt)
>>>
>>> for vm in vms:
...     vm.name
...
ubuntu 12.04 real
vCenter Server Appliance5
vShield Manager
vCloud Director
vCD-1
cli-vm
>>>
>>>
>>>
>>> vm = VirtualMachine.get(clnt, name="ubuntu 12.04 real")
>>>
>>> vm.name
ubuntu 12.04 real
>>>
>>> vm = VirtualMachine.get(clnt, name="vCenter Server Appliance5")
>>>
>>> vm.name
vCenter Server Appliance5
>>>
>>> vm.datastore
[psphere.managedobjects.Datastore object at 0xa61f610>]
>>>
>>> vm.datastore[0].name
datastore1
>>>
>>> vm.datastore[0].parent.name
datastore
>>>
>>>
>>> vm.datastore[0].host
[(DatastoreHostMount){
   key = psphere.managedobjects.HostSystem object at 0xa721750>
   mountInfo =
      (HostMountInfo){
         path = "/vmfs/volumes/4fa76f8a-f40f17b6-8aba-0030674106dd"
         accessMode = "readWrite"
         accessible = True
      }
 }]
>>>
>>>
>>> vm.datastore[0].host[0]
(DatastoreHostMount){
   key = psphere.managedobjects.HostSystem object at 0xa721750>
   mountInfo =
      (HostMountInfo){
         path = "/vmfs/volumes/4fa76f8a-f40f17b6-8aba-0030674106dd"
         accessMode = "readWrite"
         accessible = True
      }
 }
>>>
>>>
>>> vm.datastore[0].host[0].key.name
localhost.localdomain
>>>
>>>
>>> host = vm.datastore[0].host[0].key
>>>
>>> for vm in host.vm:
...     vm.name
...
ubuntu 12.04 real
vCenter Server Appliance5
vShield Manager
vCloud Director
vCD-1
cli-vm
>>>
>>>

Wednesday, May 9, 2012

how to install xen on CentOS 6

Installation of Xen on Centos 6 working


1)
# yum install bridge-utils

2)
# yum install http://au1.mirror.crc.id.au/repo/kernel-xen-release-6-3.noarch.rpm

3)
# yum install kernel-xen xen

4)
# vim vim /etc/grub.conf

4a) Before Edit

default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32.57-1.el6xen.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32.57-1.el6xen.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /boot/initramfs-2.6.32.57-1.el6xen.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /boot/initramfs-2.6.32-220.el6.x86_64.img

4b) After Edit

default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32.57-1.el6xen.x86_64)
        root (hd0,4)
        kernel /boot/xen.gz dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin
        module /boot/vmlinuz-2.6.32.57-1.el6xen.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        module /boot/initramfs-2.6.32.57-1.el6xen.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /boot/initramfs-2.6.32-220.el6.x86_64.img

5)
vim /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


6)
Reboot into your new Xen kernel



7)
[root@localhost ~]# xm info

host                   : localhost.localdomain
release                : 2.6.32.57-1.el6xen.x86_64
version                : #1 SMP Tue Mar 20 10:23:34 EST 2012
machine                : x86_64
nr_cpus                : 2
nr_nodes               : 1
cores_per_socket       : 2
threads_per_core       : 1
cpu_mhz                : 2933
hw_caps                : bfebfbff:20100800:00000000:00000940:0008e3bd:00000000:00000001:00000000
virt_caps              :
total_memory           : 2009
free_memory            : 961
free_cpus              : 0
xen_major              : 4
xen_minor              : 1
xen_extra              : .2
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : unavailable
xen_commandline        : dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin
cc_compiler            : gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
cc_compile_by          : mockbuild
cc_compile_domain      : crc.id.au
cc_compile_date        : Mon Feb 20 12:52:37 EST 2012
xend_config_format     : 4
[root@localhost ~]#


8)
[root@localhost ~]# ls /proc/xen/
capabilities  privcmd  xenbus  xsd_kva  xsd_port
[root@localhost ~]#

Tuesday, May 8, 2012

How to delete and create openstack nova database

delete and recreate openstack nova database

mysql> drop database nova;
Query OK, 49 rows affected (1.94 sec)

mysql>
mysql>
mysql> CREATE DATABASE nova;
Query OK, 1 row affected (0.00 sec)

mysql>
mysql>
mysql> GRANT ALL PRIVILEGES ON nova.* TO 'novadbadmin'@'%'
    ->   IDENTIFIED BY 'yourpasssword';

Query OK, 0 rows affected (0.02 sec)

mysql>
mysql>
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>

root@u1204x:~# nova-manage db sync
2012-05-08 05:24:26 DEBUG nova.utils [-] backend from (pid=23587) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
root@u1204x:~# 


root@u1204x:~# su -
root@u1204x:~# 



root@u1204x:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
92:3f:8b:8f:dd:70:46:da:af:03:4e:92:b5:84:66:51 root@u1204x
The key's randomart image is:
+--[ RSA 2048]----+
|       .E        |
|      .          |
|       o         |
|      +.o        |
|     oo+S..      |
|      oo++       |
|       +=.+      |
|       +.B..     |
|      o.+ oo.    |
+-----------------+
root@u1204x:~#  


root@u1204x:~/openstack/scripts# nova keypair-add --pub_key ~/.ssh/id_rsa.pub research_key
root@u1204x:~/openstack/scripts#






openstack how to create private network

how to create private network in Nova

root@u1204x:~# nova-manage network create private --fixed_range_v4=192.168.22.32/27 --num_networks=1 --bridge=br100 --bridge_interface=eth0 --network_size=32

2012-05-08 02:09:48 DEBUG nova.utils [req-bbffc9ea-09be-4121-8913-37b1ff2ac026 None None] backend from (pid=8157) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
root@u1204x:~#




root@u1204x:~# nova-manage network list

id       IPv4                  IPv6               start address      DNS1               DNS2               VlanID             project            uuid          
2012-05-08 02:09:57 DEBUG nova.utils [req-de496dd9-51a3-4e84-af35-9a5d7efeb4fd None None] backend from (pid=8163) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
2        192.168.22.32/27      None               192.168.22.34      8.8.4.4            None               None               None               505954cd-e77e-4ee3-a590-2f678afab541
root@u1204x:~#



root@u1204x:~# nova-manage fixed list


root@u1204x:~# nova-manage fixed

 

openstack how to delete network

how to delete network in Nova

root@u1204x:~# nova-manage network list
id       IPv4                  IPv6               start address      DNS1               DNS2               VlanID             project            uuid          
2012-05-08 01:52:18 DEBUG nova.utils [req-4381a60e-24f5-467e-adbb-f662de1cc713 None None] backend from (pid=6738) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
1        192.168.22.32/27      None               192.168.22.34      8.8.4.4            None               None               None               c6fd11e1-101e-4e99-b256-1a842ffc10ce
root@u1204x:~#



root@u1204x:~# nova-manage network delete --uuid c6fd11e1-101e-4e99-b256-1a842ffc10ce
2012-05-08 01:57:47 DEBUG nova.utils [req-adb187d5-9eb4-41ab-80f7-4949904954bc None None] backend from (pid=7175) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
root@u1204x:~#


root@u1204x:~# nova-manage network list

Tuesday, April 3, 2012

eucalyptus instance remains in pending status solutions

IF instance status showing Pending and you can see error "qemu: linux kernel too old to load a ram disk" in log files under /var/log/libvirt/qemu/, then that is the issue of image. So try new image

I could provision VM using following images

1) ubuntu-10.04-server-cloudimg-amd64.tar.gz <====
This image was working with Eucalyptus 2.0.3 (Ubuntu 11.04)


================================

http://uec-images.ubuntu.com/ <--- Main link


Ubuntu Server 9.10 (Karmic Koala)
=========================
http://cloud-images-archive.ubuntu.com/karmic/
http://cloud-images-archive.ubuntu.com/karmic/20110425/


Ubuntu Server 10.04 (Lucid Lynx)
=========================
http://uec-images.ubuntu.com/lucid/
http://uec-images.ubuntu.com/lucid/20120323/


Ubuntu Server 10.10 (Maverick Meerkat)
=============================
http://uec-images.ubuntu.com/maverick/


Ubuntu Server 11.04 (Natty Narwhal)
===========================
http://uec-images.ubuntu.com/natty/


Ubuntu Server 11.10 (Oneiric Ocelet)
===========================
http://uec-images.ubuntu.com/oneiric/


Ubuntu Server 12.04 (Precise Pangolin)
=============================
http://uec-images.ubuntu.com/precise/

Friday, March 30, 2012

Eucalyptus Syntax error /etc/eucalyptus/httpd-cc.conf /etc/eucalyptus/httpd-nc.conf

saju@ubuntu:~$/etc/init.d/eucalyptus-nc start
* Starting Eucalyptus services eucalyptus-nc Syntax error on line 17 of /etc/eucalyptus/httpd-nc.conf:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n

Failed to start the NC!



saju@ubuntu:~$/etc/init.d/eucalyptus-cc start
* Starting Eucalyptus cluster controller eucalyptus-cc Syntax error on line 17 of /etc/eucalyptus/httpd-cc.conf:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n

Failed to start the CC!


Solution
=====

1) Edit eucalyptus.conf
#vim /etc/eucalyptus/eucalyptus.conf
then change EUCA_USER="root" to EUCA_USER="eucalyptus"


2) Restart
/etc/init.d/eucalyptus-cc cleanrestart
/etc/init.d/eucalyptus-nc restart
/etc/init.d/eucalyptus-cloud restart


Friday, January 6, 2012

how to upgrade to new version of eucalyptus

1) Stop all services
# service eucalyptus-common stop
# service eucalyptus stop
# service eucalyptus-nc stop
# service eucalyptus-dc stop
# service eucalyptus-sc stop
# service eucalyptus-cc stop

2) Remove eucalyptus 2.0.2 (old version)
# apt-get remove eucalyptus-common
# apt-get remove eucalyptus*

3) add reop of new eucalyptus 2.0.3
http://wiki.almende.com/index.php/Eucalyptus
# vim /etc/apt/sources.list
deb http://eucalyptussoftware.com/downloads/repo/eucalyptus/2.0.3/debian/
squeeze main

4) do update
# apt-get update

5) Install eucalyptus 2.0.3
# apt-get install eucalyptus-cloud eucalyptus-cc eucalyptus-walrus eucalyptus-sc

6) Check version
# vim /etc/eucalyptus/eucalyptus-
version

7) Some usefull commands

# apt-get -f install
# sudo killall -9 dpkg
# sudo killall -9 apt-get
# apt-get update
# dpkg --configure -a

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

Monday, September 5, 2011

how to find OpenStack Nova version

root@saju-M61PME-S2P:~# nova-manage shell python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>
>>> from nova import version
>>> version.version_string()
'2011.2'
>>> version.version_string_with_vcs()
u'2011.2-workspace:tarmac-20110415024701-a9bdb77vaatk99lh'
>>>

Monday, March 7, 2011

Eucalyptus No route to host when ssh to instance

Eucalyptus No route to host when ssh to a instance

Check your network subnets: I think you are using 192.168.1.x for the MANAGED-NOVLANS but that network is the one your machine are using. Try something different, for example 10.10.x.x. If you do such a change you have to stop all eucalyptus services (and instances) and you have to restart the cc with clean-restart.

**********1**********
* In Cluster Controller
* In /etc/eucalyptus/eucalyptus.local.conf

# network configuration from the input configuration file
VNET_MODE="MANAGED-NOVLAN"
VNET_SUBNET="172.19.0.0"
VNET_NETMASK="255.255.0.0"
VNET_DNS="125.22.47.125"
VNET_ADDRSPERNET="32"
VNET_PUBLICIPS="192.168.1.50-192.168.1.60" <------

--------- change to

# network configuration from the input configuration file
VNET_MODE="MANAGED-NOVLAN"
VNET_SUBNET="172.19.0.0"
VNET_NETMASK="255.255.0.0"
VNET_DNS="125.22.47.125"
VNET_ADDRSPERNET="32"
VNET_PUBLICIPS="10.10.5.1-10.10.5.9" <-------

**********2**********

# restart eucalyptus-cc CLEAN=1

**********3**********

root@cc-host:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:66:1c:4d:8c
inet addr:192.168.1.107 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:66ff:fe1c:4d8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5478 errors:0 dropped:0 overruns:0 frame:0
TX packets:4483 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1550033 (1.5 MB) TX bytes:1828909 (1.8 MB)
Interrupt:22 Base address:0xb800

eth0:metadata Link encap:Ethernet HWaddr 00:19:66:1c:4d:8c <------------------
inet addr:169.254.169.254 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:22 Base address:0xb800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:57349 errors:0 dropped:0 overruns:0 frame:0
TX packets:57349 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27541581 (27.5 MB) TX bytes:27541581 (27.5 MB)


===============================

More

Monday, February 28, 2011

Eucalyptus Instance goes from pending to shutting down to terminated

Eucalyptus Instance goes from pending to shutting down to terminated

vim /etc/eucalyptus/eucalyptus.conf

Change "eth0" to "br0" or "br0" to "eth0" based on your network configuration

---------------------------

# Affects: CC, NC
# See: **NOTE** below
ENABLE_WS_SECURITY="Y"
LOGLEVEL="DEBUG"
VNET_PUBINTERFACE="eth0" <---
VNET_PRIVINTERFACE="eth0" <---
VNET_MODE="MANAGED-NOVLAN"

--------------------------- change to

# Affects: CC, NC
# See: **NOTE** below
ENABLE_WS_SECURITY="Y"
LOGLEVEL="DEBUG"
VNET_PUBINTERFACE="br0" <---
VNET_PRIVINTERFACE="br0" <---
VNET_MODE="MANAGED-NOVLAN"

Saturday, February 19, 2011

How to Disable Easy Install in VMware

  1. First start VMware Player (VMware Workstation).
  2. Create A New Virtual Machine
  3. Select the option “I will install the operating system later”.
  4. Once done, your new virtual machine will be added to your virtual library.
  5. Simply click on Edit Virtual Machine settings, select your media then Restart VM!