Table of Contents

Set up a Windows Server iSCSI target

This guide sets up Windows Server to hold the disks your PCs will boot from.

Before you start

Windows

Use the newest Windows Server you can. It can be a real server or a virtual machine.

Hardware

iSCSI puts a lot of load on the network and the disks. When you choose a server, put network speed first, then disk speed. Fast disks do not help if the network is full.

PCs should have a 2.5 Gb network card or faster. Even then, a PC gets about 312 MB/s at most. That is about the same as a normal hard drive, and much slower than an NVMe drive inside a PC.

On your switches, turning off spanning tree on the iSCSI ports can help, most of all if PCs have trouble getting an address from DHCP.

Disk files

You need the disk files ready to add. Windows Server iSCSI only works with VHD and VHDX files. If your disks are in another format, you need to convert them first. The qemu-img tool works well for this.

Optional

Turn on jumbo packets can make iSCSI faster, but every device on the network must support it.

Install iSCSI

1. Add the iSCSI Target role

Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeManagementTools

2. Turn off power saving on the network cards

iSCSI needs the network to stay on all the time.

Get-NetAdapter -Physical | Where-Object Status -eq "Up" | Disable-NetAdapterPowerManagement

3. Restart the iSCSI service

Stop-Service -Name "WinTarget" -Force
Start-Service -Name "WinTarget"

Set up a target

You can do this in Server Manager or in PowerShell. These steps use PowerShell.

1. Make a target

A target is what PCs connect to.

New-IscsiServerTarget -TargetName "MyTarget" -InitiatorIds @("IQN:iqn.2026-01.com.example:deploy01")
  • MyTarget is a name you choose for the target.
  • 2026-01.com.example is a year and month, then your domain name back to front. You can use anything, but keep this format.
  • deploy01 can be anything, but it must be unique.

2. Add a disk to the target

Add-IscsiVirtualDiskTargetMapping -TargetName "MyTarget" -Path "D:\iSCSIVirtualDisks\Disk1.vhdx"
  • MyTarget is the name from step 1.
  • D:\iSCSIVirtualDisks\Disk1.vhdx is the full path to the disk file.

3. Find the disk's LUN number

You will need the LUN number later. It is a small number that says which disk in the target to use.

Get-IscsiVirtualDiskTargetMapping -TargetName "MyTarget"

Useful commands

Check that iSCSI is listening on its usual port (3260):

netstat -an | findstr :3260

Make a dynamic disk file smaller. This does nothing to fixed size disks.

Optimize-VHD -Path "D:\iSCSIVirtualDisks\Disk1.vhdx" -Mode Full