Re: [PATCH v3 5/9] hyperv: implement domainReboot and domainReset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/21/20 1:10 PM, Matt Coleman wrote:
On Oct 21, 2020, at 7:01 AM, Michal Privoznik <mprivozn@xxxxxxxxxx> wrote:

On 10/21/20 10:46 AM, Matt Coleman wrote:
+    if (hypervMsvmComputerSystemFromDomain(domain, &computerSystem) < 0)
+        goto cleanup;
+

Should we also check if the domain is running? That is, the same check as hypervDomainSuspend() does with @computerSystem? I can copy the check locally, before pushing.

In its current form, it throws this error if you attempt to `virsh reboot` or `virsh reset` a VM that is powered off:

error: Failed to reset domain Fedora Workstation
error: internal error: Invocation of RequestStateChange returned an error: Invalid state for this operation (32775)

If you'd prefer a friendlier error message, feel free to copy the check from hypervDomainSuspend().


My aim is to use hypervRequestStateChange() from other places (like suspend). I'll copy the check since it will make the intended change easier.

Thanks,
Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux