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:
[email protected]:~$ sudo iscsiadm -m discovery -t sendtargets -p freenas.local freenas.local:3260,-1 iqn.2005-10.org.freenas.ctl:omr1-vm1 [email protected]:~$
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:
[email protected]:~$ VBoxManage storageattach omr1 --storagectl "SATA" --port 0 --device 0 --type hdd --medium iscsi --server freenas.local --target "iqn.2005-10.org.freenas.ctl:omr1-vm1" --tport 3260 iSCSI disk created. UUID: e97eb93d-c6be-4e29-829a-1169b1b9b1f6
Now we are good to perform the OS installation on ISCSI disk.