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:

  1. Lists available disks on the Proxmox host
  2. Allows you to select a disk for passthrough
  3. Lists available VMs
  4. Allows you to select a VM to receive the disk passthrough
  5. Configures the selected disk for passthrough
  6. 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

Important Notes

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.

) }