<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">Hi!<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">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.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:x-small">Shmuel<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella <span dir="ltr"><<a href="mailto:fabrice.bacchella@orange.fr" target="_blank">fabrice.bacchella@orange.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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.<div><br></div><div>Using the GUI it works fine.</div><div><br></div><div>But I have no success using the python API. And running with debug enable, I get this strange result :</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo">> PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1</div></div><div>...</div><div><div style="margin:0px;font-size:11px;font-family:Menlo">> <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">> </os></div></div><div>...</div><div><div style="margin:0px;font-size:11px;font-family:Menlo">< <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <kernel>.../vmlinuz</kernel></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <initrd>.../initrd.img</initrd></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <cmdline>....</cmdline></div><div style="margin:0px;font-size:11px;font-family:Menlo">< </os></div></div><div><br></div><div>I got this with:</div><div><pre style="background-color:rgb(255,255,255);font-family:Menlo">os_params = params.OperatingSystem()<br>os_params.set_boot(old_os_params.get_boot())<br>os_params.set_type(old_os_params.get_type())<br>os_params.set_kernel(<span style="color:#000080">None</span>)<br>os_params.set_initrd(<span style="color:#000080">None</span>)<br>os_params.set_cmdline(<span style="color:#000080">None</span>)<br><span style="color:#94558d">self</span>.broker.set_os(os_params)<br><span style="color:#94558d">self</span>.broker.update()<br></pre><div>trying to set kernel and others to empty string is not really better:</div></div><div><div style="margin:0px;font-size:11px;font-family:Menlo">> <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <kernel></kernel></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <initrd></initrd></div><div style="margin:0px;font-size:11px;font-family:Menlo">> <cmdline></cmdline></div><div style="margin:0px;font-size:11px;font-family:Menlo">> </os></div></div><div>...</div><div><div style="margin:0px;font-size:11px;font-family:Menlo">< <os type="rhel_7x64"></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <boot dev="hd"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <boot dev="network"/></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <kernel></kernel></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <initrd></initrd></div><div style="margin:0px;font-size:11px;font-family:Menlo">< <cmdline></cmdline></div><div style="margin:0px;font-size:11px;font-family:Menlo">< </os></div></div><div><br></div><div>What kind of "magic values" the engine uses to removes values ?</div><div><br></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>