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 [email protected] http://lists.ovirt.org/mailman/listinfo/users

