[libvirt] Support for pass through lines in domain XML?

Jagane Sundar jagane at altoscale.com
Wed Aug 29 17:34:46 UTC 2012


Hello All,

I have a question regarding the domain XML and its conversion to 
hypervisor specific config files.

I am using libvirt to talk to vmware ESX. ESX has a feature where you 
can add a line such as:
     guestinfo.xxx=abc
in the .vmx file that describes the VM. Later, the guest can extract the 
value of the variable xxx and use it. One potential use for such a 
mechanism is to pass in the public key string for the root user. Another 
use could be for passing in the static ip address to the VM. For 
example, the following line can be added to the .vmx file for the VM:
     guestinfo.ipaddress=10.0.0.223
In the guest, running the command:
     $ vmtoolsd --cmd "info-get guestinfo.ipaddress"
will print out 10.0.0.223, and this value can be used by the script to 
configure the static IP address.

My question is this: Is there a way for me to add this line 
'guestinfo.ipaddress=10.0.0.223' to the domain XML. When this domain XML 
is converted to a .vmx file, and the resulting VM is registered with 
ESX, I want the line 'guestinfo.ipaddress=10.0.0.223' to be passed 
through unmolested to the .vmx file.

Thanks and keep up the good work. libvirt is a useful abstraction for 
those of us needing to work with multiple virtualization technologies.
-- Jagane






More information about the libvir-list mailing list