[Users] VM payload
Shahar Havivi
shaharh at redhat.com
Tue Dec 31 16:40:51 EST 2013
Hi René,
I think the flow is wrong...
You have a VM that its initial resources such as network, cdroms etc are
stored in the oVirt engine database.
The engine is sending this data to vdsm to run the VM.
You are using the one of the vdsm hooks to add a cdrom (before the vm start) for that VM but you are not
modifying the current VM xml - instead you are sending the payload data back
to the engine which store this new data in its database,
This is not effect the current running VM but the next cycle as you notice.
Please take a look at the floppy hook:
http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/floppy/before_vm_start.py;h=7616ac6927935da85833f6a574a4039fb3b04b4d;hb=refs/heads/master
Look how its modifying the domxml set it via:
hooking.write_domxml(domxml)
I think you can use this hook as a template.
Shahar Havivi.
On 31.12.13 18:51, Itamar Heim wrote:
> On 12/20/2013 05:04 PM, René Koch (ovido) wrote:
> >Hi,
> >
> >I created a vdsm hook script for passing payload information (vm name)
> >to a virtual machine, which is placed in before_vm_start folder on my
> >hypervisor (CentOS 6.5).
> >
> >If I create a new virtual machine out of a template some strange things
> >happen:
> >When starting the vm the first time I can see that the vdsm script is
> >executed, but no additional cd drive is shown in this vm. But after
> >shutting down the vm and powering on again, the cd drive appears.
> >
> >Here's the vdsm hook I use:
> >https://raw.github.com/ovido/ovirt-stuff/master/hooks/50_payload
> >
> >I don't really get why the payload isn't working when starting a vm the
> >first time.
> >This happen on oVirt 3.2 and 3.3.
> >
> >Thanks a lot for help!
> >
> >
>
> shahar - thoughts?
More information about the Users
mailing list