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

Matt Coleman mcoleman at datto.com
Wed Oct 21 11:10:53 UTC 2020


> On Oct 21, 2020, at 7:01 AM, Michal Privoznik <mprivozn at redhat.com> 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().

-- 
Matt





More information about the libvir-list mailing list