About 2 weeks ago, my Ubuntu VM (it runs years ago) is randomly freeze. It only help the hard reset on the VM. I try to check all logs (VM and Host), but not see any problem.
If the VM is freeze, the console is not working, no ssh, and 1 one the 4 cores is maxed.... The other VM at the same host is work well.
I dont know what the way that i try to figure out what is the problem, if no log error or anything that help me...
i have the same problem, in the console it is not freezed, so i think it could be a network problem (virtual network problem) with ubuntu 20.04, (its my only 20.04 deploy)
I also experienced Ubuntu 20.04 (but not 18.04) freezes without anything in the logs when passing through USB-ports (on a X470 Ryzen system).
When the usb3=0/1 option does not match the physical port (USB 2.0/3.0), the VM freezes completely when unplugging the USB-device.
For example my USB 2.0 KVM-switch will freeze Ubuntu when unplugged from a physical USB 3.0 port when I use usb0: host=x-y.z,usb3=0, but it will work fine if I use usb0: host=x-y.z,usb3=1
Maybe you are running into a similar issue with your host USB-port passthrough, and can use the same work-around?
I also experienced Ubuntu 20.04 (but not 18.04) freezes without anything in the logs when passing through USB-ports (on a X470 Ryzen system).
When the usb3=0/1 option does not match the physical port (USB 2.0/3.0), the VM freezes completely when unplugging the USB-device.
For example my USB 2.0 KVM-switch will freeze Ubuntu when unplugged from a physical USB 3.0 port when I use usb0: host=x-y.z,usb3=0, but it will work fine if I use usb0: host=x-y.z,usb3=1
Maybe you are running into a similar issue with your host USB-port passthrough, and can use the same work-around?
I experience similar thing. If i touch a USB device (not plug/unplug, only move a bit the cable...) the VM is stopped... Not freeze, stopped. I try your idea, it possible to help me. The original problem is bit different (freezing) but possible to somehow connected this....
For example my USB 2.0 KVM-switch will freeze Ubuntu when unplugged from a physical USB 3.0 port when I use usb0: host=x-y.z,usb3=0, but it will work fine if I use usb0: host=x-y.z,usb3=1
I am also seeing this issue, and my setup is very similar with a USB 2.0 KVM switch, but unfortunately the usb 2.0 <-> 3.0 mismatch did not seem to fix the issue for me. To clarify, though, are you passing through physical ports or USB IDs? I am using vendor IDs for my devices, not the port itself. I can try switching to specific ports and see if that clears it up.
I do pass through using physical port numbers. And I was convinced that matching the usb3-flag with the physical connectors fixed it...
However, I just had another Ubuntu VM freeze when switching away from it. No matter what ports (2.0 or 3.0) I use with the usb3-flag, the VM keeps freezing today.
Watchdog does not kick in and a Stop with SIGKILL is necessary to restart the Ubuntu VM. USB unplugging worked fine two days ago
Seems that the usb3-flag is a red herring and not a work-around. It now appears that it is sort of random whether it will work fine multiple times, or just keeps freezing.
PS:
I also tried using device_add usb-host,bus=xhci.0,hostbus=... and device_del instead of USB-port passthrough: same effect today, Ubuntu VM freezes.
I also tried booting (a clone of) the VM from the Ubuntu 20.04 live/install CD and it does not freeze when unplugging and replugging keyboard and mouse.
I installed LMDE 4 (Linux Mint Debian) on a clone of the VM and it does not freeze upon USB removal.
I also installed and updated Linux Mint 20 (same kernel as Ubuntu) and at first it did not freeze when unplugging and replugging keyboard and mouse, but after a Shutdown and Start it does freeze.
Unplug and replug while in the GRUB-menu looks like it results in a VM freeze as well, as it does not respond anymore and needs a SIGKILL during Stop.
Even when it does not freeze the first time, repeatedly unplugging an USB-stick will eventually freeze Ubuntu or LMDE live CD.
This might be related to [Latest] Proxmox - USB disconnects freeze KVM ?
PPS:
It can also be reproduced using echo "$UsbPort" >/sys/bus/usb/drivers/usb/unbind, which makes it testable in an automated fashion.
I'm getting the what I think is the same issue as vamp, an Ubuntu VM with USB and also PCI sound card passthrough enabled will freeze up, seemingly at random (sometimes a couple of minutes in, sometimes an hour or two in, sometimes before Ubuntu reaches the login screen). When it freezes, I have no console access, no network access (can't ping or connect via SSH), and any audio playing through the sound card will play whatever note it was playing at the moment of the freeze as a continuous droning noise. I've tried disabling the PCI device in case that was the reason but that doesn't seem to make a difference as it still freezes, although I haven't tried disabling VFIO yet to see if that makes a difference.
Like skytrooper09, I am using vendor/hw IDs to pass through the USB devices. I can happily unplug and plug back in the USB devices without causing the VM to freeze so in my case I think USB is not directly responsible, but perhaps worth noting that if I unplug and re-plug the USB devices in after the guest has locked up then the USB devices remain attached to the host (i.e. the keyboard now enters input to the Proxmox server console).
Most recently it froze at 14:55, here are the logs from that time:
Code:
Jul 29 14:54:00 px0 systemd[1]: Started Proxmox VE replication runner.
Jul 29 14:55:00 px0 systemd[1]: Starting Proxmox VE replication runner...
Jul 29 14:55:00 px0 systemd[1]: pvesr.service: Succeeded.
Jul 29 14:55:00 px0 systemd[1]: Started Proxmox VE replication runner.
Jul 29 14:55:01 px0 CRON[30973]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 29 14:55:32 px0 kernel: [238750.695872] usb 1-2-port4: disabled by hub (EMI?), re-enabling...
Jul 29 14:55:32 px0 kernel: [238750.696583] usb 1-2.4: USB disconnect, device number 20
Jul 29 14:55:32 px0 kernel: [238750.946763] usb 1-2.4: new full-speed USB device number 21 using xhci_hcd
Jul 29 14:55:33 px0 kernel: [238751.299492] usb 1-2.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Jul 29 14:55:33 px0 kernel: [238751.319249] input: USB Gaming Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4:1.1/0003:04D9:FC07.0043/input/input107
Jul 29 14:55:33 px0 kernel: [238751.450907] input: USB Gaming Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4:1.2/0003:04D9:FC07.0044/input/input109
Jul 29 14:55:44 px0 kernel: [238763.102972] hid-generic 0003:04D9:FC07.0046: input,hidraw1: USB HID v1.10 Keyboard [USB Gaming Mouse] on usb-0000:00:14.0-2.4/input1
Jul 29 14:55:44 px0 kernel: [238763.112287] input: USB Gaming Mouse Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4:1.2/0003:04D9:FC07.0047/input/input112
Jul 29 14:56:00 px0 systemd[1]: Starting Proxmox VE replication runner...
Jul 29 14:56:00 px0 systemd[1]: pvesr.service: Succeeded.
Jul 29 14:56:00 px0 systemd[1]: Started Proxmox VE replication runner.
Code:
top - 15:16:23 up 2 days, 18:40, 1 user, load average: 1.23, 1.23, 1.10
Tasks: 549 total, 2 running, 547 sleeping, 0 stopped, 0 zombie
%Cpu(s): 12.7 us, 0.4 sy, 0.0 ni, 84.9 id, 0.0 wa, 0.0 hi, 2.0 si, 0.0 st
MiB Mem : 32056.7 total, 6532.8 free, 23737.6 used, 1786.3 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 7394.6 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23863 root 20 0 7294788 6.1g 7380 S 100.0 19.4 21:45.24 kvm
2408 root 20 0 1578752 1.0g 6732 R 2.7 3.3 172:07.45 kvm
16156 root 20 0 1692452 1.0g 7212 S 2.0 3.4 1:31.83 kvm
Code:
root@px0:~# qm status 103 && qm pending 103
status: running
cur balloon: 0
cur bios: ovmf
cur boot: dcn
cur bootdisk: scsi0
cur cores: 2
cur cpu: kvm64,hidden=1
cur efidisk0: local-zfs:vm-103-disk-1,size=1M
cur hostpci0: 00:1b,pcie=1
cur ide2: local:iso/ubuntu-20.04-desktop-amd64.iso,media=cdrom,size=2651616K
cur machine: q35
cur memory: 6144
cur name: vlw0-disco
cur net0: virtio=56:D8:72:84:3A:8B,bridge=vmbr1,firewall=1
cur numa: 0
cur ostype: l26
cur scsi0: local-zfs:vm-103-disk-0,size=32G,ssd=1
cur scsihw: virtio-scsi-pci
cur serial0: socket
cur smbios1: uuid=60d0cdd4-552f-4212-8163-f6f4896114e4
cur sockets: 2
cur usb0: host=0c45:760a,usb3=1
cur usb1: host=04d9:fc07,usb3=1
cur usb2: host=13fd:1040,usb3=1
cur vcpus: 4
cur vga: none
cur vmgenid: 8943a8a6-8437-4601-8598-3e32eb4a753b
At the time of the freeze, top shows one of the KVM threads locked at 100% usage. After that, I don't know how to debug Qemu/KVM any further! Is there a way of seeing what the VM is waiting for (e.g. memory / storage operation, network operation, PCI / USB)?
I added a serial interface to the VM as well, but connecting with qm terminal didn't show anything useful (to me).
And also in case it's relevant the PCI device mentioned above is: 00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
This started happening to me roughly at the beginning of the month after I ran though apt upgrade / dist-upgrade, which included updating to the newest kernel so I'm wondering if it's a bug introduced by the update (since it would correlate with OP's issues starting).
Before then I've been using this same VM in this same config since September last year with no issues at all.
Any help debugging / insight would be amazing and much appreciated, and if I get to the bottom of my issue I'll report back here in case it's similar to anyone else's
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.