<div dir="auto"><div><div data-smartmail="gmail_signature">Hi,</div><div data-smartmail="gmail_signature" dir="auto"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat 14 May 2022, 21:11 Laine Stump, <<a href="mailto:laine@redhat.com">laine@redhat.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Caveat - I'm completely unfamiliar with ruby and the libvirt-ruby API <br>
bindings.<br>
<br>
If there is a problem that causes the domain config to not be updated, <br>
libvirt will return an error. So I would suspect one of the two things <br>
is happening:<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Thanks, that's what I was expecting should happen, just wanted to be sure that there wasn't some other behaviour in place for compatibility reasons.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1) there may be a problem in the libvirt-ruby bindings that causes the <br>
error reported by the call (in whatever C code is behind the ruby <br>
bindings) to libvirt to be properly propagated to ruby. I would hope <br>
this isn't the case, but "bugs happen", so it should be considered as a <br>
possibility.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">A quick look suggests that the code looks to raise an exception if the dom pointer returned is NULL, so I think the bindings are correct. But I will check that what version of ruby-libvirt I have installed matches the source code I'm looked at.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2) As I said in my earlier mail, any changes that are made will take <br>
effect the next time the domain is destroyed and restarted. This also <br>
means that the changes won't be reflected in the "live/status" XML of <br>
the domain until that time. If you want to see the new configuration <br>
after you've made changes, you should add the VIR_DOMAIN_XML_INACTIVE <br>
flag when requesting the domain XML. Possibly you haven't included this <br>
flag, and that's why you think that your change hasn't taken effect?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Ah, I forgot to outline where in the lifecycle the update is taking place. The domain isn't running when the code attempts to update the definition.</div><div dir="auto"><br></div><div dir="auto">Does that still mean that the VIR_DOMAIN_XML_INACTIVE flag is needed? I was assuming when the domain is inactive the XML changes would be reflected immediately.</div><div dir="auto"><br></div><div dir="auto">Oddly I thought during some experiments when the added NVRAM XML element was ignored, the updated number of CPUs which was in the same XML definition passed in was applied.</div><div dir="auto"><br></div><div dir="auto">Will dig further tomorrow or Monday on the version of ruby-libvirt installed into my rvm dev env as well as checking passing in the flag.</div><div dir="auto"><br></div><div dir="auto">I'm sure it'll turn out to be something obvious that I'm overlooking.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">--</div><div dir="auto">Darragh</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>