How to revert PCI passthrough via CLI

ickam

New Member
Dec 4, 2021
3
0
1
35
Hi,
I made a school boy error of passing wrong ethernet to a vm, and now I cannot log into the node over network. I need to know how I can stop the passthrough to that VM via CLI.
All help will be appreciated
 
Look for the configuration file in the directory /etc/pve/qemu-server/. Is is named VM-NUMBER.conf. And edit it with, for example, nano and remove the lines that start with hostpci or put a # in front of those lines. You can also change the onboot setting and restart the host.
You can also restart the host and press the e-key and set intel_iommu or amd_iommu to off (or disable IOMMU in the host system BIOS), which should prevent any VM that uses passthrough from starting.

PS: You can reboot the host system with shutdown -r now or simply run reboot (as root).
 
Last edited:
Look for the configuration file in the directory /etc/pve/qemu-server/. Is is named VM-NUMBER.conf. And edit it with, for example, nano and remove the lines that start with hostpci or put a # in front of those lines. You can also change the onboot setting and restart the host.
You can also restart the host and press the e-key and set intel_iommu or amd_iommu to off (or disable IOMMU in the host system BIOS), which should prevent any VM that uses passthrough from starting.

PS: You can reboot the host system with shutdown -r now or simply run reboot (as root).

Exactly what I needed, Thank you!!