[one-users] Creating a VM

Borja Sotomayor borja at borjanet.com
Wed Oct 13 15:24:03 PDT 2010


Hi Travis,

> I was wondering if there was a reliable way, upon creating a VM (using,
> let's say, "onevm create temp.one"), to retrieve the ID of the VM? How does
> open nebula assign VMs? It seems to be just an increasing integer? It would
> be helpful to know both how open nebula assigns these ID numbers as well as
> a good way to retrieve one. Thanks for any and all help!

You can use the "-v" option with onevm create. This will print out a
single line with "ID: " followed by the ID assigned to that VM, which
should be easy to parse from a script. Additionally, there is also an
XML-RPC API (http://www.opennebula.org/documentation:rel1.4:api) you
can use to do pretty much everything you can do from the command line
(e.g., there is a "one.vm.allocate" method that will create a VM and
return the assigned VM).

Cheers!
-- 
Borja Sotomayor
-Scientific Writer at UChicago's Computation Institute
 http://people.cs.uchicago.edu/~borja/
-Community Manager for the OpenNebula project
 http://www.opennebula.org/



More information about the Users mailing list