import type { Metadata } from "next"
import { Steps } from "@/components/ui/steps"
export const metadata: Metadata = {
title: "Disk Passthrough to a VM | ProxMenux Documentation",
description: "Learn how to set up disk passthrough to a virtual machine in Proxmox VE.",
}
export default function DiskPassthroughVM() {
return (
Disk Passthrough to a VM
This script automates the process of setting up disk passthrough to a virtual machine (VM) in Proxmox VE. Disk
passthrough allows a VM to have direct access to a physical disk or partition, which can be useful for certain
applications that require low-level disk access or for maximizing storage performance.
What Does This Script Do?
When executed, this script performs the following actions:
- Lists available disks on the Proxmox host
- Allows you to select a disk for passthrough
- Lists available VMs
- Allows you to select a VM to receive the disk passthrough
- Configures the selected disk for passthrough
- Adds the disk to the chosen VM's configuration
Key Steps
The script will display a list of available disks on your Proxmox host. You'll be prompted to select the
disk you want to pass through to a VM.
After selecting a disk, you'll be presented with a list of available VMs. Choose the VM that should receive
the passed-through disk.
The script will configure the selected disk for passthrough. This involves:
- Unmounting the disk if it's currently mounted
- Removing any existing partitions or logical volumes
- Clearing the partition table
The script will modify the chosen VM's configuration to include the passed-through disk. This includes:
- Adding the disk to the VM's configuration file
- Setting up the appropriate SCSI controller if necessary
What to Expect
- The script will guide you through the process with clear prompts.
- You'll need to make selections for both the disk and the target VM.
- The process is typically quick, but it may take a few moments to configure larger disks.
- After completion, the selected disk will be available to the chosen VM as a raw device.
- You may need to restart the VM to recognize the new disk.
Important Notes
- Disk passthrough gives the VM direct access to the physical disk. Use this feature with caution.
-
All data on the selected disk will be erased during the process. Make sure to backup any important data before
proceeding.
-
The disk will be exclusively used by the selected VM and will not be available to the host or other VMs.
- Ensure that the VM is shut down before running this script to avoid potential data corruption.
- Some features like live migration may be limited or unavailable for VMs with passed-through disks.
- This script requires root or sudo privileges to execute.
This script simplifies the process of setting up disk passthrough in Proxmox VE, allowing you to easily assign
physical disks to specific VMs. This can be particularly useful for applications that require direct disk access
or for maximizing storage performance in certain scenarios.
)
}