[ovirt-users] editing VM settting

Fabrice Bacchella fabrice.bacchella at orange.fr
Tue Apr 12 15:40:24 UTC 2016


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 ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160412/0ece7640/attachment-0001.html>


More information about the Users mailing list