When shutting down, the VM is stuck in the state "Stopping" and Hyper-V Management Service (vmms) must be terminated

Bug #1787423 reported by Markus S.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

My problem is, that my Hyper-V Guest (Ubuntu Server 18.04.1) is stuck at the state "Stopping" when I shut down the guest. When this happens I am not capable of doing any actions regarding this guest. The only solution is to shutdown the other guests and kill the vmms.exe.

I recognized this behaviour in version 18.04 before and decided to wait a bit for the software to mature. Unfortunately this error also occurs in this version 18.04.1.
It seems that the system is shutting down fine (reboot or shutdown) and when the moment comes where it powers off the image is fading but it hangs/stucks at this faded image and it does not turn off the machine. Last time I initiated a shutdown via ssh and was not connected directly through the Hyper-V manager to the console. When I saw the "Stopping" state I tried to connect to the console and I recognized that the Hyper-V connection manager constantly flapping with connecting to the VM until an error message is shown which reports an problem with connecting to the VM. It looks like it is stuck between the last step of shutting down and the "ACPI power off".

The Hyper-V host is a Windows Server 2012 R2 Server Core. The Hyper-V guest is a generation 2 machine with 16 GiB hard disk, 1024 MiB RAM and three NICs.; 2 CPUs assigned. The previous released Ubuntu LTSB didn't show this erroneous behaviour. The machine was designed to run as router and mail relay.

In all my tests this problem occurred. I took a screenshot. Nothing - except that it stays at this point - looks wrong from outside. But I am a Windows administrator and not a Linux administrator, therefor I am not familiar dealing with those kind of problems.

https://1drv.ms/u/s!AoEuCh4Zdmlpg5MF81-oczJ8CfWeGg

---
ProblemType: Bug
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Aug 16 17:14 seq
 crw-rw---- 1 root audio 116, 33 Aug 16 17:14 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
DistroRelease: Ubuntu 18.04
HibernationDevice: RESUME=/dev/mapper/s--rras--1--vg-swap_1
InstallationDate: Installed on 2018-07-28 (19 days ago)
InstallationMedia: Ubuntu-Server 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lspci:

Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: Microsoft Corporation Virtual Machine
Package: linux (not installed)
PciMultimedia:

ProcFB: 0 hyperv_fb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-29-generic root=/dev/mapper/s--rras--1--vg-root ro
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-29-generic N/A
 linux-backports-modules-4.15.0-29-generic N/A
 linux-firmware 1.173.1
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: bionic
Uname: Linux 4.15.0-29-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 11/26/2012
dmi.bios.vendor: Microsoft Corporation
dmi.bios.version: Hyper-V UEFI Release v1.0
dmi.board.asset.tag: None
dmi.board.name: Virtual Machine
dmi.board.vendor: Microsoft Corporation
dmi.board.version: Hyper-V UEFI Release v1.0
dmi.chassis.asset.tag: 8318-2488-1276-9893-9570-2978-42
dmi.chassis.type: 3
dmi.chassis.vendor: Microsoft Corporation
dmi.chassis.version: Hyper-V UEFI Release v1.0
dmi.modalias: dmi:bvnMicrosoftCorporation:bvrHyper-VUEFIReleasev1.0:bd11/26/2012:svnMicrosoftCorporation:pnVirtualMachine:pvrHyper-VUEFIReleasev1.0:rvnMicrosoftCorporation:rnVirtualMachine:rvrHyper-VUEFIReleasev1.0:cvnMicrosoftCorporation:ct3:cvrHyper-VUEFIReleasev1.0:
dmi.product.family: Virtual Machine
dmi.product.name: Virtual Machine
dmi.product.version: Hyper-V UEFI Release v1.0
dmi.sys.vendor: Microsoft Corporation

Markus S. (schuhmam)
tags: added: hyper-v
tags: added: acpi-off
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1787423

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Markus S. (schuhmam) wrote : CRDA.txt

apport information

tags: added: apport-collected bionic
description: updated
Revision history for this message
Markus S. (schuhmam) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : ProcEnviron.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : ProcModules.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : UdevDb.txt

apport information

Revision history for this message
Markus S. (schuhmam) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.18 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key kernel-hyper-v
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Markus S. (schuhmam) wrote :

I really was not expecting that this will work but today I was able to successfully update the Kernel to 4.18.5. And furthermore for the first time this machine exist, I was able to reboot and shutdown the system without killing my hypervisor and rebooting the host.

tags: added: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Markus S. (schuhmam) wrote :

Maybe keep this in mind: Before I upgraded to the Kernel 4.18.5 I have created a snapshot. So maybe if someone wants me to do some further testing I am able to revert the changes and do so.

Brad Figg (brad-figg)
tags: added: cscc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.