<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 15, 2018 at 2:26 PM, Sergey Vavilov <span dir="ltr"><<a href="mailto:sergey@vavilov.org" target="_blank">sergey@vavilov.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
I'm wondering<br>
how can I run a cmd.exe command (or powershell) inside windows guest virtual machine by<br>
ovirt-agent from outside (from ovirt-engine or from host)?<br>
What's ovirt's analogue for<br>
virsh qemu-agent-command<br>
?<br>
Actually, I want to setup ip on virtual NIC.<br>
So I can't run a command via windows' protocols.<br>
ovirt-agent service works in windows virtual machine and successfully reports its state to ovirt engine.<br>
But it looks like ovirt-agent isn't suitable to run commands in virtual machines?<br>
Or am I wrong?<br>
Should I configure a coexistence of ovirt-agent and qemu-agent inside vm somehow?<br>
How did you solve such task before?<br>
<br>
Thank you, all!<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
--<br>
Sergey Vavilov<br><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Hi Sergey,</div><div class="gmail_extra">I recently had a need for a Windows 2008 R2 x86_64 VM that I moved from vSphere to RHV (but the considerations below are the same for oVirt).</div><div class="gmail_extra">In my case I had to run a backup of an Oracle database that is in NOARCHIVELOG mode, due to performance reasons: it is an RDBMS used for BI that is refreshed every day and doesn't need a point in time recovery but only a consistent state before the "new day" processing is run at 01:00 in the night.</div><div class="gmail_extra">In vSphere the backup of the VM was implemented with Veeam, that uses snaphsot technology and interacts with VSS layer of M$ operating systems.</div><div class="gmail_extra">Oracle fully supports on Windows the backup of database using VSS only if it is in ARCHIVELOG mode.</div><div class="gmail_extra"><a href="https://docs.oracle.com/cd/E11882_01/win.112/e10845/vss.htm#NTQRF475">https://docs.oracle.com/cd/E11882_01/win.112/e10845/vss.htm#NTQRF475</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">Veeam automatically executed shutdown / snapshot / start of the dabatase because I think it implements what in the link above is called as PRE_SQLCMD in OnPrepareBackup callback (through the VeeamGuestHelper.exe executable).</div><div class="gmail_extra"><br></div><div class="gmail_extra">Coming back to oVirt, the interaction with Windows VSS layer is indeed done by "QEMU guest agent"too; you have to install it together with the oVirt Guest Agent when you install oVirt Guest Tools</div><div class="gmail_extra"><br></div><div class="gmail_extra">So in my case I would need for Windows something similar to the "fsfreeze/thaw hooks" I have in Linux QEMU guest agent.</div><div class="gmail_extra">But searching through the code it seems this functionality is only present in Linux component...</div><div class="gmail_extra">In fact some days ago I wrote to the qemu-devel mailing list to ask for possible implementation:</div><div class="gmail_extra"><a href="http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg02823.html">http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg02823.html</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">No answer so far. Feel free (you and others) to contribute to the thread if you think it can help...</div><div class="gmail_extra">It could also be useful to have at least writer control commands implementation in VSS interaction of QEMU Guest Agent in Windows, so that one could do something similar to what Veeam on vSphere already does...</div><div class="gmail_extra"><br></div><div class="gmail_extra">Based on what I have wrote above, I doubt you could interact at all through the QEMU guest agent on Windows to run any command...</div><div class="gmail_extra">And also for Linux guests, I think you are restricted to the default actions (eg shutdown) or forced to use as a workaround the approach to run a snapshot (that then you delete) and "attach" the desired command to the freeze (or thaw) hook...</div><div class="gmail_extra"><br></div><div class="gmail_extra">HIH,</div><div class="gmail_extra">Gianluca</div><div class="gmail_extra"> </div><div class="gmail_extra"> </div><div class="gmail_extra"><br></div></div>