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

Michal Privoznik mprivozn at redhat.com
Wed Oct 21 11:29:51 UTC 2020

On 10/21/20 1:10 PM, Matt Coleman wrote:
>> 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().

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


More information about the libvir-list mailing list