Usually, virtual disks are used on Proxmox VE virtual machines. The virtual disks are partitioned and operating systems are installed. If you have a lot of virtual machines on your Proxmox VE server, you will be storing the virtual disks of multiple virtual machines on the same storage device, which will limit the storage bandwidth for the virtual machines. Usually, that’s how virtual machines are supposed to run and you will not have any problems with it.
For many reasons, you will want to passthrough physical storage devices on Proxmox VE virtual machines and make use of the full bandwidth of the storage devices on the virtual machines.
For example:
In this article, I am going to show you how to passthrough a physical storage device (SATA HDD/SSD or NVME SSD) to a Proxmox VE virtual machine.
To passthrough a storage device on a Proxmox VE virtual machine, you need to find the device name of the storage device.
To find the device name of the storage device, navigate to the Proxmox VE shell and run the following command:
All the storage devices installed on your Proxmox VE server should be listed. You will find the name, size, and other information on the storage devices here.
To passthrough a storage device on a Proxmox VE virtual machine, you need to find the unique ID of the storage device. The unique ID of the storage device won’t change even if you install the storage device on a different SATA or NVME port of your Proxmox VE server. That’s why I recommend you to use the unique ID of the storage device to passthrough the storage device on a Proxmox VE virtual machine.
Let’s say, you want to passthrough the storage device sdb on a Proxmox VE virtual machine. To find the unique ID of the storage device sdb, run the following command:
The available unique IDs of the storage device should be printed.
In my case, the storage device sdb has 2 unique IDs:
You can access the storage devices using the unique ID in the format:
For example:
Once you find the unique ID of the storage device that you want to add to a Proxmox VE virtual machine, you need to find the first unoccupied SATA/SCSI slot of the Proxmox VE virtual machine in which you can add the physical storage device.
First, find all the occupied SATA or SCSI slot of your desired Proxmox VE virtual machine (Proxmox VE virtual machine ID 101 in this example) with the following command:
As you can see, the Proxmox VE virtual machine 101 occupied SATA slot 0, and SCSI slot 0 and 1. So, we can add a new storage device on either SATA slot 1 or SCSI slot 2.
To add the physical storage device ata-Samsung_SSD_860_EVO_500GB_S3Z3ND0NC01243J to the SCSI slot 2 of the Proxmox VE virtual machine 101, run the following command:
To add the physical storage device ata-Samsung_SSD_860_EVO_500GB_S3Z3ND0NC01243J to the SATA slot 1 of the Proxmox VE virtual machine 101, run the following command:
The physical storage device should be added to your desired Proxmox VE virtual machine.
The newly added storage device should also show up in the Hardware section of the Proxmox VE virtual machine.
Once the physical storage device is added to the Proxmox VE virtual machine, just start the virtual machine and you should be able to access it from the operating system installed on the virtual machine.
To remove the physical storage device from the Proxmox VE virtual machine, navigate to the Hardware section of the virtual machine, select the storage device[1] and click on Detach[2].
Click on Yes.
The physical storage device should be removed from the Proxmox VE virtual machine.
In this article, I have shown you how to find the unique ID of the SATA HDDs/SSDs and NVME SSDs installed on your Proxmox VE server. I have also shown you how to passthrough physical storage devices on your Proxmox VE virtual machines. I have shown you how to remove a physical storage device from your Proxmox VE virtual machine as well.
Источник: linuxhint.com
Наш сайт является информационным посредником. Сообщить о нарушении авторских прав.
Proxmox device-passthrough kvm-qemu libvirt storage