[ovirt-users] editing VM settting

Shmuel Melamud smelamud at redhat.com
Tue May 24 11:36:57 UTC 2016


Hi!

What do you mean under "removing values"?  You want <kernel>, <initrd> etc.
not to appear in engine response? There is no such thing. There is always
some value, empty or non-empty.

Shmuel

On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella <
fabrice.bacchella at orange.fr> wrote:

> I'm trying to change the way a VM is booted, I want an initial setup with
> kernel, initrd and cmdline given and later removed.
>
> Using the GUI it works fine.
>
> But I have no success using the python API. And running with debug enable,
> I get this strange result :
>
> > PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1
> ...
> >     <os type="rhel_7x64">
> >         <boot dev="hd"/>
> >         <boot dev="network"/>
> >     </os>
> ...
> <     <os type="rhel_7x64">
> <         <boot dev="hd"/>
> <         <boot dev="network"/>
> <         <kernel>.../vmlinuz</kernel>
> <         <initrd>.../initrd.img</initrd>
> <         <cmdline>....</cmdline>
> <     </os>
>
> I got this with:
>
> os_params =  params.OperatingSystem()
> os_params.set_boot(old_os_params.get_boot())
> os_params.set_type(old_os_params.get_type())
> os_params.set_kernel(None)
> os_params.set_initrd(None)
> os_params.set_cmdline(None)
> self.broker.set_os(os_params)
> self.broker.update()
>
> trying to set kernel and others to empty string is not really better:
> >     <os type="rhel_7x64">
> >         <boot dev="hd"/>
> >         <boot dev="network"/>
> >         <kernel></kernel>
> >         <initrd></initrd>
> >         <cmdline></cmdline>
> >     </os>
> ...
> <     <os type="rhel_7x64">
> <         <boot dev="hd"/>
> <         <boot dev="network"/>
> <         <kernel></kernel>
> <         <initrd></initrd>
> <         <cmdline></cmdline>
> <     </os>
>
> What kind of "magic values" the engine uses to removes values ?
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160524/a36ab96f/attachment-0001.html>


More information about the Users mailing list