Hyper-V 3.0 (WS 2012 R2) - Create a virtual machine by storing its hard disk on an iSCSI server

Page 1 / 1

As previously explained in our "Improve the storage performance of a virtual machine by using a physical hard disk" tutorial, it's possible to use a physical hard disk for the virtual hard disk of the virtual machine.

Since iSCSI hard disks are recognized by Windows Server as local hard disks, it's also possible to connect to an iSCSI server to directly use this type of storage.
So, with this tutorial, you can also exploit the storage of your NAS (Synology : for example) if it supports the iSCSI protocol.

  1. Configure the iSCSI server and client
  2. Create the virtual machine
  3. Install the guest operating system

1. Configure the iSCSI server and client

For the installation of the iSCSI server on Windows Server, refer to our tutorial : Windows Server 2012 - Install and configure an iSCSI server and an iSCSI client

Then, allow your Hyper-V server to access your iSCSI virtual disk on your iSCSI server.
In our case, our Hyper-V server has the IP address "". So, we allowed this IP address on our iSCSI server so that our Hyper-V server could connect to our iSCSI virtual disk.

At the moment, the status of our virtual disk is "Not connected".

On your Hyper-V server, run the "iSCSI Initiator" program (which is installed by default and corresponds to the Windows Server iSCSI client).
Then, go to the "Discovery" tab and click on "Discover Portal".

Enter the IP address of your iSCSI server.

If the connection is successful, you will see your iSCSI server displayed in the "Targets" tab.
If this is the case, select it and click : Connect.

If the connection succeeds, the iSCSI virtual disk will appear as a local hard disk in the computer management.
By default, the iSCSI disk (500 GB in our case) is "Offline" and must remain so to be attached to a virtual machine.

Note : on Windows Server, this console is accessible via the server manager (in this menu : Tools -> Computer Management).

On the iSCSI server, you will see that the status of your virtual disk is "Connected".

For the moment, our iSCSI virtual hard disk is empty and therefore has a size of 4 MB (4096 KB).

2. Create the virtual machine

For the creation of the virtual machine, it's the same as when you want to use a physical hard disk.

Select the "Attach a virtual hard disk later" option.

In the settings of your virtual machine :

  • select the IDE controller (or SCSI controller if this type of controller is supported by the guest OS)
  • select : Hard Drive
  • click Add

As expected, our 500 GB iSCSI virtual disk is available in the "Physical hard disk" list.

Remember to choose an iso file to install the operating system into the virtual machine.

3. Install the guest operating system

Since iSCSI disks are not partitioned by default, the Windows installer displays an unallocated space of 500 GB.
Create the desired partitions, and then click Next to install Windows on this iSCSI disk.

Wait while installing Windows 7.

Once Windows is installed, you will see that your virtual disk on your iSCSI server has grown.