Comment 0 for bug 1731051

Revision history for this message
Sean Feole (sfeole) wrote :

The Pike cloud archive has a regression, compared to Ocata, where in rebooting a VM via virsh causes the VM to powerdown, and then exit. The VM does not automatically power back up, but can be restarted.

Repro:

Install 16.04.3 on an ARM64 host
Fully update the install
add-apt-repository cloud-archive:pike
apt-get update
apt-get install qemu-efi virt-manager libvirt-bin qemu-guest-agent qemu-system-aarch64
wget http://cdimage.ubuntu.com/ubuntu/releases/17.10/release/ubuntu-17.10-server-arm64.iso
create a new session via ssh (session B)
In session B: virt-install --accelerate --cdrom ubuntu-17.10-server-arm64.iso --disk size=10 --name ubuntu1710 --os-type linux --ram 1024
Once the install completes and the guest is at the login prompt, in session A: virsh reboot ubuntu1710 --mode acpi

Observed result:
The guest will powerdown as expected (from logs on session B), and then session B will be dumped back to the host shell. "virsh list" will not show the ubuntu1710 domain.

Expected result:
The guest powers back on, and boots back to the login prompt.

Analysis:
We observe these errors in various logs:

Nov 1 13:29:16 ubuntu libvirtd[2441]: 2017-11-01 20:29:16.882+0000: 2441: error : qemuMonitorIORead:595 : Unable to read from monitor: Connection reset by peer
Nov 1 13:29:16 ubuntu libvirtd[2441]: 2017-11-01 20:29:16.882+0000: 3101: error : qemuMonitorJSONCommandWithFd:309 : internal error: Missing monitor reply object

2017-11-01T20:29:16.538762Z qemu-system-aarch64: KVM_SET_DEVICE_ATTR failed: Group 4 attr 0x0000000000000001: No such device or address

We debugged this to an issue in the QEMU in Pike being incompatible with the 4.10 kernel of 16.04.3. The QEMU in this version attempts to use the ITS migration functionality during reboot. 4.10 does not support this. When the IOCTL fails, QEMU calls abort(), thus killing the VM.

We believe QEMU should not attempt to use this functionality if the host kernel does not support it. We suggest the attached patch to resolve the issue.