ctl.conf:
```
portal-group pg0 {
discovery-auth-group no-authentication
listen 0.0.0.0
listen [::]
}
target iqn.2012-06.com.example:target0 {
auth-group no-authentication
portal-group pg0
port ioctl/5/3
lun 0 {
path /z/test.img
size 8G
}
lun 1 {
path /z/test1.img
size 8G
}
}
```
bhyve:
```
bhyve -A -W -H -P -c 6 -m 8098M -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm1A -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd
-s 29,fbuf,tcp=10.20.21.40:6032,w=800,h=600,, -s 30,xhci,tablet -s 3,virtio-blk,/z/disk.img -s 4,virtio-scsi,dev=/dev/cam/ctl5.3,iid=0 -
s 5,virtio-net,tap0,mac=00:a0:98:2c:d5:9f FreeBSD```
Note: The virtio-blk is the bootable disk, the virtio-scsi are the additional disks.
From inside the guest:
```
root@:~ # zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
test 15G 789M 14.2G - - 0% 5% 1.00x ONLINE -
zroot 5.50G 778M 4.74G - - 0% 13% 1.00x ONLINE -
```
```
root@:~ # zpool status test
pool: test
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
da0 ONLINE 0 0 0
da1 ONLINE 0 0 0
```
dmesg:
```
da0 at vtscsi0 bus 0 scbus0 target 0 lun 0
da0: <FREEBSD CTLDISK 0001> Fixed Direct Access SPC-5 SCSI device
da0: Serial Number MYSERIAL0000
da0: 300.000MB/s transfers
da0: Command Queueing enabled
da0: 8192MB (16777216 512 byte sectors)
da1 at vtscsi0 bus 0 scbus0 target 0 lun 1
da1: <FREEBSD CTLDISK 0001> Fixed Direct Access SPC-5 SCSI device
da1: Serial Number MYSERIAL0001
da1: 300.000MB/s transfers
da1: Command Queueing enabled
da1: 8192MB (16777216 512 byte sectors)
```