import { Steps } from "@/components/ui/steps"
import CopyableCode from "@/components/CopyableCode"
export const metadata = {
title: "Disk Passthrough to a VM | ProxMenux Documentation",
description: "Step-by-step guide to configure disk passthrough to a virtual machine in Proxmox VE using ProxMenux.",
}
export default function DiskPassthroughVM() {
return (
Disk Passthrough to a VM
This guide explains how to assign physical disks to virtual machines (VMs) in Proxmox VE using ProxMenux.
Disk passthrough allows a VM to have direct access to a physical disk, providing improved performance and compatibility for certain applications.
Overview
The script automates the following steps:
- Lists available physical disks on the Proxmox host, excluding the system disk.
- Displays a list of available virtual machines (VMs) for selection.
- Allows the user to select multiple disks to assign to a VM.
- Ensures selected disks are not already in use by another VM.
- Configures the selected disks for passthrough to the chosen VM.
Implementation Steps
The script scans the system and displays a list of available physical disks, excluding the system disk.
The user selects the virtual machine (VM) to which the disk(s) will be assigned.
The script performs the following actions:
- Ensures the selected disk is not in use by another VM.
- Provides an interface choice (SATA, SCSI, VirtIO, or IDE).
- Automatically configures the disk passthrough and assigns it to the VM.
The script verifies the operation and confirms the successful disk passthrough.
Expected Results
- The selected physical disk(s) are successfully assigned to the specified VM.
- Users are provided with a confirmation of the disk assignment.
- The VM is configured to recognize the disk(s) upon startup.
Important Considerations
- The script requires root privileges to execute.
- Ensure the selected disk is not already in use by another VM.
- VMs must be powered off before adding disks to prevent data corruption.
- Using disk passthrough limits certain VM features, such as live migration.
)
}