How to Install VM OS on iSCSI Disks in VirtualBox

Installing the Guest OS on iSCSI disks in VirtualBox is a good idea to keep the virtual machines in a centralized location. Also, it is one of the requirements to do live migration between VirtualBox hosts using teleportation. This post illustrates how to connect iSCSI disks in the Virtual Media manager and install OS on iSCSI disks.

In this example, I have two physical computers with VirtualBox. I’m using FreeNAS as an iSCSI storage server in one of the host computers. The FreeNAS OS is installed as a virtual machine in one of the hosts, and iSCSI disks are created. Read more here about installing and creating FreeNAS iSCSI disks in VirtualBox.

We will install Windows 7 as a virtual machine (Guest OS) on another host on an iSCSI disk. My second host computer communicates with FreeNAS virtual machine, which runs on the first host. This ensures the network communication is working fine between the two computers.

Steps to Connect iSCSI disks in VirtualBox Virtual Media Manager

1) Confirm the working network communication between the host computer and the iSCSI server. Set up the virtual network adapters and firewall policies accordingly.

2) Get the correct iSCSI disk target name address. Below is the FreeNAS iSCSI disk target I created for this example.

Connect iSCSI disks to Virtualbox

3) Open the command prompt and type the following command.

vboxmanage addiscsidisk –server 10.10.11.250 –target iqn.2007-09.jp.ne.peach.istgt:vbos

* 10.10.11.250FreeNAS iSCSI server IP configured on another host.

* iqn.2007-09.jp.ne.peach.istgt:vbosTarget name (shown in 2nd step)

is a double dash ( – )

Attaching command

4) Successful execution returns a message like the one below with a new UUID for the disk.

Successfully added iSCSI disk

5) Newly added iSCSI disk can be found under the virtual media manager in Oracle VirtualBox, as shown below.

VirtualBox iSCSI Disk

6) With the above steps, we successfully added a FreeNAS iSCSI disk to the VirtualBox media manager. This disk can be used to create virtual machines on this computer. As you are aware, this iSCSI disk is located on a network, and we can use it on any host to install Operating System or attach it to an existing virtual machine in VirtualBox.

7) Let’s create a new Windows guest virtual machine on this disk. Instead of creating the new hard disk, select the existing disk option and choose this iSCSI disk we attached earlier.

VM Settings

8) Adjust the other settings and start the virtual machine. The installation will go smoothly. I created two partitions and installed Windows 7 successfully on the network iSCSI disk.

Recap the Main Steps

  • Two Windows physical computers are involved in this example. Installed FreeNAS as a virtual machine on one host computer and configured iSCSI disks, so this virtual machine works as an iSCSI server.
  • Connected iSCSI disk with Virtual Box media manager from another host. Then used this disk to install Windows OS as a guest virtual machine.

Currently, the Windows guest OS runs on network storage (iSCSI disk). If you have a high-speed network (say 10G or 40G), then this method will help keep virtual machines in a centralized network location. These types of central storage can easily do maintenance, backup, and live migration of virtual machines in VirtualBox among different hosts.

You can use this setup on any physical computer OS, including Windows 10, Windows 11, Linux, and macOS, to utilize VirtualBox iSCSI to manage centralized storage.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

2 thoughts on “How to Install VM OS on iSCSI Disks in VirtualBox”

  1. Respected Sir/Madam,
    I try to teleport the OS from one source machine to destnation machine. What are the requirements in target system.
    Thanking you,
    Karthik.M

    Reply

Leave a Comment