By mprove on Nov 04, 2009
This is a recipe how to export a VirtualBox desktop out of VDI 3 to a destination Solaris VirtualBox host. It is based on Dirk’s procedure and contains some modifications to make it work for me.
1. Tell the iSCSI initiator on the destination VitualBox host to accept static iSCSI connections:
iscsiadm modify discovery --static enable
2. Find out the IQN of the iSCSI target of the desktop to export. The easiest way is to look at the desktop as it is registered on the VirtualBox host. Here you can use the command:
VBoxManage list -l vms
It will show also the IQN and the host of the connected LUN. An IQN looks like this:
3. Mount the LUN into your destination VirtualBox host:
iscsiadm add static-config <IQN>,<IP>
The IP is the IP of the storage server – it is not its host name.
4. List the new target
iscsiadm list target -S
The last line contains the important output: OS Device Name, e.g.:
5. Make a raw copy of the content:
dd if=/dev/rdsk/c2t600144F04AD2FA0C0000144FEDF91800d0p0 of=/var/tmp/image.out
Note, replace the
s2 at the end of the raw disk name with
p0. Don’t ask why. And you will have a lot of time not to ask why because the copy operation takes quite some time.
6. Convert the raw image into a VDI file:
VBoxManage convertfromraw /var/tmp/image.out /var/tmp/image.vdi --format VDI --variant Standard
convertdd was not available on my Solaris machine, but
VBoxManage convertfromraw does the same.
Last but not least it should be mentioned that all this is obsolete for VDI 3.1. We have added a function to export a VirtualBox desktop directly from the Sun VDI administration: