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!!
 

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!