Memory Limit with PCIE GPU Passthrough

simonw

New Member
Mar 20, 2023
9
2
3
Hello!

I use Proxmox 7.3.6 and have a strange problem with a memory limit of 32 GB for a vm in combination with PCIE. If I use more memory e.g. 64 GB or 128 GB the VM is not able to start with:

Mar 20 23:18:32 pcl1 pvestatd[12324]: VM 222 qmp command failed - VM 222 qmp command 'query-proxmox-support' failed - unable to connect to VM 222 qmp socket - Connection refused

Any hints for this?

Best regards

Simon
 
I had a similar problem with 22GiB. Maybe this answer can help you?
@leesteken Thank you for your hint. I will try this after the working hour.
I had that problem because of memory hotplug. If you are not using memory hotplug, then probably it's something different.

I use Proxmox 7.3.6 and have a strange problem with a memory limit of 32 GB for a vm in combination with PCIE. If I use more memory e.g. 64 GB or 128 GB the VM is not able to start with:
If there are no related error messages in the journalctl then it's most likely that there is not enough free memory. Note that because of possible device-initiated DMA, all VM memory must be pinned into actual host memory (and ballooning and KSM don't work). Therefore a VM with passthrough needs all memory all the time.
 
I did not use memory hot plug or something like this, but your hint saved me. Thanks it works now :)

Check the following file:
cat /sys/module/vhost/parameters/max_mem_regions which had 64
--------------------------------------------------------------------------------------------------
Make following changes on all nodes of the cluster
Add/edit file: /etc/modprobe.d/vhost.conf
options vhost max_mem_regions=509
--------------------------------------------------------------------------------------------------
Reboot each node after the changes.
Verify the changes:
cat /sys/module/vhost/parameters/max_mem_regions
--------------------------------------------------------------------------------------------------
Start VM which was throwing the error.
 
  • Like
Reactions: leesteken

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!