How to attach a iscsi to a Virtualbox VM

I got a freenas server where I’m putting all my VMs and I wanted this time to use a ISCSI share to perform the OS installation. This is how I discover my ISCSI targets:

marius@laptop1:~$ sudo iscsiadm -m discovery -t sendtargets -p freenas.local

I have created a VM on Virtualbox but I haven’t created any disks.
The following command will attache a ISCSI target to my VM:

marius@laptop1:~$ VBoxManage storageattach omr1 --storagectl "SATA" --port 0 --device 0 --type hdd --medium iscsi --server freenas.local --target "" --tport 3260
iSCSI disk created. UUID: e97eb93d-c6be-4e29-829a-1169b1b9b1f6

Now we are good to perform the OS installation on ISCSI disk.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.