How to Configure Hyper-V SCSI Controllers and Virtual DVD Drives in Windows 11 Using PowerShell

In modern virtual machine architectures running on Windows 11 Hyper-V, Generation 2 virtual machines eliminate legacy IDE controllers entirely, relying exclusively on synthetic Small Computer System Interface (SCSI) controllers. Synthetic SCSI controllers provide high-throughput disk I/O, support online hot-adding and hot-removing of virtual hard disks, and provide the connection bus for virtual optical media (DVD drives).

When automating virtual machine deployments, installing guest operating systems from ISO images, or provisioning high-capacity multi-disk storage tiers, systems administrators use PowerShell to script SCSI bus configurations. This guide explains how to inspect existing virtual storage controllers, add secondary SCSI controllers, attach virtual DVD drives, mount installation ISO files, and manage controller device numbers.

Understanding Hyper-V Storage Architecture in Generation 2 VMs

Hyper-V Generation 2 virtual machines run on modern UEFI firmware and synthetic VMBus device drivers:

  • Controller Capacity: Each virtual machine supports up to four synthetic SCSI controllers (Controller Numbers 0 to 3).
  • Device Slots: Each SCSI controller supports up to 64 device locations (Location Numbers 0 to 63), enabling a single virtual machine to address up to 256 virtual disks or DVD drives.
  • Hot-Plug Capabilities: On Generation 2 virtual machines, virtual hard disks and virtual DVD drives attached to SCSI controllers can be attached and detached while the guest operating system is running.

Inspecting Current Storage Controllers on a Virtual Machine

Open an elevated PowerShell prompt on Windows 11 and query the storage controllers attached to a target virtual machine (such as “Database-VM”):

Get-VMScsiController -VMName "Database-VM"

The command returns details on all existing SCSI controllers:

VMName      ControllerNumber AttachedDriveCount
------      ---------------- ------------------
Database-VM 0                2

To inspect all drives (hard disks and DVD drives) attached across all controllers on the virtual machine:

Get-VMDrive -VMName "Database-VM" | Select-Object VMName, ControllerType, ControllerNumber, ControllerLocation, Path

Adding a Secondary SCSI Controller

If you need to segregate storage traffic—such as separating database transaction logs, data volumes, and temporary scratch disks onto discrete controllers—add an additional SCSI controller using Add-VMScsiController:

Add-VMScsiController -VMName "Database-VM"

Verify that the new controller has been created:

Get-VMScsiController -VMName "Database-VM"

Hyper-V automatically increments the controller index, creating Controller Number 1.

Attaching a Virtual DVD Drive to a SCSI Controller

By default, Generation 2 virtual machines often create only a virtual hard disk on Controller 0. To attach a virtual DVD drive (for mounting operating system installation media or utility ISOs), use Add-VMDvdDrive:

Add-VMDvdDrive -VMName "Database-VM" -ControllerNumber 0 -ControllerLocation 1

To immediately attach a virtual DVD drive with an ISO image already mounted:

Add-VMDvdDrive -VMName "Database-VM" -ControllerNumber 0 -Path "C:\ISORepository\Ubuntu-Server-24.04.iso"

If -ControllerLocation is omitted, PowerShell automatically assigns the next available device slot on the specified controller.

Mounting and Ejecting ISO Images via PowerShell

To change or mount an ISO image in an existing virtual DVD drive on a running virtual machine, use the Set-VMDvdDrive cmdlet:

Set-VMDvdDrive -VMName "Database-VM" -ControllerNumber 0 -ControllerLocation 1 -Path "C:\ISORepository\WindowsServer2025.iso"

To eject an ISO image and leave the virtual optical drive empty (preventing guest OS boot delays or lockouts):

Set-VMDvdDrive -VMName "Database-VM" -ControllerNumber 0 -ControllerLocation 1 -Path $null

Verify that the virtual DVD drive is currently unmounted:

Get-VMDvdDrive -VMName "Database-VM" | Format-List ControllerNumber, ControllerLocation, Path

The Path field will display blank.

Removing Virtual DVD Drives and SCSI Controllers

To remove a virtual DVD drive from a virtual machine when it is no longer required for administrative maintenance:

Remove-VMDvdDrive -VMName "Database-VM" -ControllerNumber 0 -ControllerLocation 1

To remove an unused secondary SCSI controller, ensure that all attached drives on that controller have been detached first, then run:

Remove-VMScsiController -VMName "Database-VM" -ControllerNumber 1

Operational Verification and Boot Order Considerations

If you plan to boot the virtual machine from the attached virtual DVD drive, verify that the DVD drive is positioned at the top of the UEFI firmware boot sequence:

$dvd = Get-VMDvdDrive -VMName "Database-VM"
Set-VMFirmware -VMName "Database-VM" -FirstBootDevice $dvd

Confirm the updated firmware boot list:

(Get-VMFirmware -VMName "Database-VM").BootOrder

By scripting SCSI controller creation and DVD drive management in PowerShell, administrators can automate end-to-end VM provisioning, OS bootstrapping, and high-performance multi-tier storage configurations in Windows 11 Hyper-V.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.