Announcement

Collapse
No announcement yet.

How to Passthrough Physical Disks to Proxmox VE 8 Virtual Machines

Collapse
X
Collapse
  •  

  • How to Passthrough Physical Disks to Proxmox VE 8 Virtual Machines


    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:
    • If you want to set up a file server (i.e. TrueNAS server) on a Proxmox VE virtual machine, you may want to add a physical storage device to your Proxmox VE virtual machine.
    • If you want to set up a RAID array on a Proxmox VE virtual machine, that’s also a good reason to passthrough physical storage devices to your Proxmox VE virtual machine.
    • If you want to convert a real Windows 10/11 or Linux installation from a physical storage device to a Proxmox VE virtual machine, passing the physical storage device on your Proxmox VE virtual machine is an easy way to do so.

    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.



    Table of Contents

    1. Listing Installed Storage Devices of Proxmox VE Server
    2. Find the Unique ID of the Storage Device on Proxmox VE
    3. Passthrough a Physical Storage Device to a Proxmox VE Virtual Machine
    4. Checking if the Storage Device is Added to the Proxmox VE Virtual Machine
    5. Removing the Storage Device from the Proxmox VE Virtual Machine
    6. Conclusion
    7. References



    Listing Installed Storage Devices of Proxmox VE Server

    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:

    $ lsblk -d




    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.





    Find the Unique ID of the Storage Device on Proxmox VE

    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:

    $ ls -lh /dev/disk/by-id/ | grep --color sdb$









    The available unique IDs of the storage device should be printed.

    In my case, the storage device sdb has 2 unique IDs:
    • ata-Samsung_SSD_860_EVO_500GB_S3Z3ND0NC01243J
    • wwn-0x5002538ec0c09743





    You can access the storage devices using the unique ID in the format:

    /dev/disk/by-id/









    For example:
    • /dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S3Z3ND0NC01243J
    • /dev/disk/by-id/wwn-0x5002538ec0c09743








    Passthrough a Physical Storage Device to a Proxmox VE Virtual Machine

    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:

    $ qm config 101 | egrep --color -i "^(sata|scsi)"




    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:

    $ qm set 101 -scsi2 /dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S3Z3ND0NC01243J




    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:

    $ qm set 101 -sata1 /dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S3Z3ND0NC01243J







    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.










    Checking if the Storage Device is Added to 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.










    Removing the Storage Device from the Proxmox VE 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.










    Conclusion

    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.



    References






    More...
      Posting comments is disabled.

    Categories

    Collapse

    Article Tags

    Collapse

    There are no tags yet.

    Latest Articles

    Collapse

    • Using MAXQDA for Qualitative Data Analysis on Linux
      by Kasimba



      by George Whittaker


      Introduction

      Qualitative data analysis (QDA) is a cornerstone of research across various fields, from social sciences to marketing. It involves uncovering patterns, themes, and meanings within non-numerical data such as interviews, focus groups, and textual narratives. In this era of digital tools, MAXQDA stands out as a premier software solution for QDA, empowering researchers to organize...
      11-21-2024, 11:31 PM
    • HAProxy on Ubuntu: Load Balancing and Failover for Resilient Infrastructure
      by Kasimba



      by german.suarez


      Introduction

      In today’s fast-paced digital landscape, ensuring the availability and performance of applications is paramount. Modern infrastructures require robust solutions to distribute traffic efficiently and maintain service availability even in the face of server failures. Enter HAProxy, the de facto standard for high-performance load balancing and failover.


      This article...
      11-21-2024, 03:00 PM
    • Providing a license for package sources
      by Kasimba
      Arch Linux hasn't had a license for any package sources (such as PKGBUILD files) in the past, which is potentially problematic. Providing a license will preempt that uncertainty.

      In RFC 40 we agreed to change all package sources to be licensed under the very liberal 0BSD license. This change will not limit what you can do with package sources. Check out the RFC for more on the rationale and prior discussion.

      Before we make this change, we will provide contributors with...
      11-19-2024, 09:21 AM
    • Linux Binary Analysis for Reverse Engineering and Vulnerability Discovery
      by Kasimba



      by George Whittaker


      Introduction

      In the world of cybersecurity and software development, binary analysis holds a unique place. It is the art of examining compiled programs to understand their functionality, identify vulnerabilities, or debug issues—without access to the original source code. For Linux, which dominates servers, embedded systems, and even personal computing, the skill of binary analysis is...
      11-18-2024, 07:10 PM
    • Ubuntu vs Debian: Linux Distributions Compared Deep Dive
      by Kasimba
      Debian and Ubuntu are two popular Linux distributions. In this deep dive we will guide you on the key differences between them from perspective of both corporate enterprise and personal productivity or pleasure usage. After reading this blog post you should be in a better position to decide to select Ubuntu or Debian.
      Stewardship, Licensing, Community and Cost

      Where as Debian is 100% fully committed to free software as defined by the Debian Free Software Guidelines, Ubuntu is created...
      11-17-2024, 08:30 PM
    • Debian Backup and Recovery Solutions: Safeguard Your Data with Confidence
      by Kasimba



      by George Whittaker


      Introduction

      In the digital age, data loss is a critical concern, and effective backup and recovery systems are vital for any Debian system administrator or user. Debian, known for its stability and suitability in enterprise, server, and personal computing environments, offers a multitude of tools for creating robust backup and recovery solutions. This guide will explore these solutions,...
      11-13-2024, 05:30 PM
    Working...
    X