Memory Usage Stuck at 99% - memtest86+?

CryptoVibe

Member
Mar 26, 2023
40
0
11
I was trying to get PCIe Passthrough to work, watching a YouTube video. I ran these two commands below & now the memory in this VM is stuck running at 99% now. I have tried rebooting, but that did not work. Does anyone know how to fix this?

Thank you in advance for anyones help,

nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream,multifunction video=efifb:off"

View attachment 48450

View attachment 48451
 
Last edited:
Because of possible device-initiated DMA, all VM memory must be pinned into actual host memory when using passthrough. Ballooning and KSM therfore don't work for VMs with PCI(e) passthrough. You can use memory hotplug if you configure the operating system inside the VM for it.

Also, video=efifb:off does nothing anymore for recent Proxmox versions and you need this work-around when doing passthrough of the boot GPU.
And please note that pcie_acs_override=downstream,multifunction breaks security isolation (IOMMU groups are there for a reason) and allows the VM to read all of the memory of other VMs and the Proxmox host. Don't use it lightly.
 
  • Like
Reactions: Neobin
Thank you for your reply. I know that all the host allocates 100% of the VM's memory, if you set a static amount of RAM for the VM. The memory INSIDE the VM was at 99%+ utilization though. That started when I tried these commands:

nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream,multifunction video=efifb:off"

update-grub

I confirmed IOMMU was enabled using this:
dmesg | grep -e DMAR -e IOMMU

I then did these commands:
nano /etc/modules

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

lspci -n -s 04:00
10de:1c30,10de:10f1

lspci -n -s 05:00
10de:1c30
10de:10f1

echo "options vfio-pci ids=10de:1c30,10de:10f1 disable_vga=1"> /etc/modprobe.d/vfio.conf

update-initramfs -u

Once I finished those, the memory utilization dropped from 99%+ down to 1% or so, which was normal. BUT, now when I try this command - dmesg | grep -e DMAR -e IOMMU - The IOMMU is not enabled. I am going to look more at the post you linked to, thank you very much.
 
Before the QEMU Guest Agent is started and/or a balloon driver is loaded (even when not using active ballooning) the memory usage is sort of guessed by memory pages that have been loaded (which is about 100% with passthrough). More precise memory usage reports (with or without filesystem cache) depends on software from within the VM.
If your VM does not start properly (because the passed through device is not working), then the memory usage appears to stay high because it does not get to the stage where QEMU Guest Agent and/or the driver for the balloon device is loaded.
If your VM was not starting properly (did it?), maybe it was because you passthrough the boot GPU without the proper work-around.
 
I went through that entire tutorial & checked my settings. If I change the BIOS back to SeaBIOS, this Win 10 VM will start up.

SSH - MEMORY-03.jpgSSH - MEMORY-04.jpgSSH - MEMORY-05.jpg
 
Windows doesn't allow switch SeaBIOS/OVMF(UEFI) once it's installed.
easiest to reinstall Windows and loose vm data when you switch.
fixing boot loader manually is possible if it's mandatory but it's an another thread.
 
Hmmmm, this is actually a VM that I had running in Hyper V. I uploaded it to Proxmox using FileZilla & then ran this command to convert it:
qemu-img convert -O qcow2 /var/lib/vz/images/701/CHIA-VM01.vhdx /var/lib/vz/images/701/vm-701-disk-0.qcow2

I'm going to delete this Hard Disk, upload a fresh copy & then try converting this .vhdx into .qcow2 with the BIOS set to UEFI this time.

Thank you everyone for your help
 
I'm going to delete this Hard Disk, upload a fresh copy & then try converting this .vhdx into .qcow2 with the BIOS set to UEFI this time.
That won't help. It's about how you initially installed Windows and not what BIOS the VM used when importing the exported virtual disk. If you installed it with a system using a BIOS or UEFI with CSM it needs that to boot. It won't run on a machine using UEFI without CSM.
 
  • Like
Reactions: _gabriel
OK. I am going to create a totally new VM then, with a fresh install of Win 10 using UEFI. Thank you very much!
 
I finally got this working, with GPU passthrough working finally! Thank you everyone for your help! For anyone completely new to ProxMox & setting up CHIA to farm with GPU's for plotting, these are the two resources that helped me the most (Besides the help in this forum):

https://www.youtube.com/watch?v=X_VwQpJSXIQ&t=7s
This guy lists all the commands in his Reddit:
https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/

https://www.youtube.com/watch?v=S6jQx4AJlFw&t=792s

The memory being pegged near 100% also went back to normal, so the pass through is working. Thank you leesteken for your help. Now onto adding a JBOD for some CHIA farming!
 

Attachments

  • SUCCESS.jpg
    SUCCESS.jpg
    446.8 KB · Views: 2
Last edited: