[Users] VM payload
René Koch
r.koch at ovido.at
Wed Jan 1 16:22:28 UTC 2014
-----Original message-----
> From:Shahar Havivi <shaharh at redhat.com>
> Sent: Tuesday 31st December 2013 22:41
> To: René Koch <r.koch at ovido.at>
> Cc: ovirt-users <users at ovirt.org>; Michal Skrivanek <mskrivan at redhat.com>; Itamar Heim <iheim at redhat.com>
> Subject: Re: [Users] VM payload
>
> 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)
Thanks a lot for the reply, Shahar.
I wrote a hook based on the floppy hook first, but it didn't work with oVirt 3.2 and changed the script then to REST-API calls.
I'll test my old Python script, which does manipulate the DOM XML again against oVirt 3.3.
Thanks,
René
>
> 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