[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Can domU config add userdefined keys to Xenstore?



On Wed, 2011-11-23 at 20:11 +0000, Florian Heigl wrote:
> Hi,
> 
> I wonder if there is some (crazy, useful, your choice) way to do the
> equivalent of the following commands while a new VM is built.
> (much like adding usb or pci devices works)
> 
> xenstore-write /local/domain/<id>/new_node "Null"
> xenstore-chmod /local/domain/<id>/new_node w
> 
> I would like to create the entry right at domU launch, and I'd like to
> make use of Xens knowledge of the domU ID it'll use, because the changing
> domU ID is a grief.

FWIW you can use "xl domid <name>" in your scripts.

> Also, it would of course be much saner to do it in the VM config
> instead via some watch-daemon or even udev rules.

You could just start the VM paused, use "xl domid" to setup your keys
and then unpause?

If you are using xapi then VM.xenstore_data is a list of key-value pairs
which is written xenstore. AFAICT The key is relative to
to /local/domain/<id> and must start "vm-data/..." (i.e. you can only
write to keys under /local/domain/<id>/vm-data/ using this mechanism).

I suspect you aren't using xapi but the reason I mention it is that
someone added libxl_domain_create_info.xsdata in the early days of
libxl, presumably with this purpose in mind, but it appears not to be
hooked up into the xl configuration parser. I expect doing so would be a
reasonably simply job.

Another, possibly more flexible but more complex option, would be to
allow for a series of hook scripts (both global and domain specific?) to
be called at various points in a VM lifecylce, including after building
but before starting.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.