[ovirt-users] editing VM settting

Fabrice Bacchella fabrice.bacchella at orange.fr
Tue May 24 12:35:03 UTC 2016


I thinks it's a minor thing, but still puzzling.

A new VM don't have the kernel, initrd and cmdline elements. Once added for a custom boot, if I remove them using the API, there are still here, but empty. If I use, the GUI, they vanished.

Using CLI:
    <os type="rhel_7x64">
        <boot dev="hd"/>
        <boot dev="network"/>
        <kernel></kernel>
        <initrd></initrd>
        <cmdline></cmdline>
    </os>

Using GUI:
    <os type="rhel_7x64">
        <boot dev="hd"/>
        <boot dev="network"/>
    </os>

Not critical, but strange. Both works


> Le 24 mai 2016 à 13:36, Shmuel Melamud <smelamud at redhat.com> a écrit :
> 
> 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 <mailto: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 <mailto:Users at ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users <http://lists.ovirt.org/mailman/listinfo/users>
> 
> 

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


More information about the Users mailing list