Booting VM causes other VM to stop

Scotty

Member
Jul 15, 2021
25
2
8
54
UK
Hi All,

I've recently had to try and recreate two VM's and in doing so have managed to get each running perfectly own their own. If I try to start the second while the first is running, the first will crash. Restarting the failed VM will exit saying efidevice not available.

Both have their own thinlvm volumes but I have noticed that both have the same smbios1 uuid and vmgenid numbers. Could this be the cause?

root@Proxy:~# qm config 100
bios: ovmf
boot: order=scsi1
cores: 2
cpu: host
hostpci0: 0000:04:00.0
memory: 24576
name: TrueNas
net0: virtio=9E:00:9A:73:AD:F9,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi1: SSDthinlvm:vm-100-disk-0,size=60G
scsihw: virtio-scsi-pci
smbios1: uuid=780e3029-b287-40af-8abc-f6624fc3d1a2
sockets: 4
vmgenid: 5b10995d-3015-4e5d-9b3f-6c5a50876232



root@Proxy:~# qm config 101
boot: order=scsi1
cores: 2
cpu: host
machine: q35
memory: 8192
name: Win10
net0: virtio=9E:00:9A:73:AD:F9,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi1: SSDthinlvm:vm-101-disk-0,size=100G
scsihw: virtio-scsi-pci
smbios1: uuid=780e3029-b287-40af-8abc-f6624fc3d1a2
sockets: 1
vmgenid: 5b10995d-3015-4e5d-9b3f-6c5a50876232



Regards,

Scott
 
Last edited:
Your first VM has 'OVMF' configured but no efidisk. Please add one and try again. ("Hardware -> Add -> EFI Disk")
 
Thanks for the fast response.

I've added an efi disk and that has stopped the error about the efi disk not being present. Unfortunately starting up the second vm still halts the first. It still won't restart but now only says "TASK ERROR: start failed: QEMU exited with code 1".

Shutting down 2, allows 1 to start.
 
Anything in the logs? (journalctl -e)
 
Yep....feel a bit foolish now...although a little surprised


Sep 06 16:29:33 Proxy kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/qemu.slice/100.scope,task=kvm,pid=9390,uid=0
Sep 06 16:29:33 Proxy kernel: Out of memory: Killed process 9390 (kvm) total-vm:26140264kB, anon-rss:22621392kB, file-rss:1688kB, shmem-rss:0kB, UID:0 pgtables:44536kB oom_score_adj:0

I adjusted VM 101 to use 4GB rather than 8GB and it's all working.

Seems a bit harsh to halt a running VM just because you start up another that would (could) cause some swapping.

VM 100 is set to 24GB and 101 is now set to 4GB. Host shows 29.96GB (of 31.3GB) used.

Thanks for your help...first class as always.
 
VM 100 cannot swap because it uses PCI passthrough. This is because you are passing real devices that can initiate Direct Memory Access (DMA) to any part of the VM memory at any time. If the VM memory is not pinned into actual memory, such a DMA could read or overwrite the memory of the Proxmox host or other VMs.
You could consider giving it less pysical memory and let FreeBSD use its swap inside the VM.

EDIT: It's the same for ballooning: it cannot return memory to the host (to distribute it over other VMs) for the same reason.
 
Last edited:
VM 100 cannot swap because it uses PCI passthrough. This is because you are passing real devices that can initiate Direct Memory Access (DMA) to any part of the VM memory at any time. If the VM memory is not pinned into actual memory, such a DMA could read or overwrite the memory of the Proxmox host or other VMs.
You could consider giving it less pysical memory and let FreeBSD use its swap inside the VM.

EDIT: It's the same for ballooning: it cannot return memory to the host (to distribute it over other VMs) for the same reason.
Now that makes perfect sense.

I hadn't considered that. Although the VM is using a none-passed through device as it's OS etc, I have passed the LSI controller and it's 8 disks directly to it. As it's running TrueNas which in turn is providing a ZFS volume...less memory is not an option :-( The other VM is rarely used so I'm happy keeping it limited to 4GB. I was just concerned that every time I started up the other VM, it took out the TrueNas VM...not a good idea.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!