Ask Your Question

Can we create VM instances dynamically

asked 2014-08-27 03:40:55 -0500

ashwinfrancis gravatar image

I have two VM instances on my Compute Node. I have hosted a web service (apache tomcat) on both with a load balancing VIP. If both the VM instances are taking up full load at a particular time, will I be able to dynamically create a VM instance (a third one) similar to the two VMs I have and add it to the load balancing VIP (say by writing a script or like wise) ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-27 09:50:05 -0500

SGPJ gravatar image

I wrote a simple script

imageID1=$(nova image-list | grep cirros | grep -v kernel | grep -v ramdisk | cut -d "|" -f2)
netid1=$(neutron net-list | grep | cut -d "|" -f2 | cut -d " " -f2)

#use nova manage to check the load - tbd

echo $imageID
echo "/n"
echo $imageID1
echo $netid1
nova boot --flavor m1.micro --image 3cefc335-67eb-4cdb-8971-1a90104c1087 --nic net-id=58239186-2282-48ca-8f0d-183a36529357 vm3
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-08-27 03:40:55 -0500

Seen: 190 times

Last updated: Aug 27 '14