Comment 34 for bug 1805920

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

[1] seems reasonable, I'll give it a try with and without the PPA of Andres.
It needs a slight modification, to not conflict with the default portal.

Install libvirt with all else it usually brings (for the bridge and dhcp on the bridge):
$ sudo install libvirt-daemon-system

So use these commands:
 $ curl -O http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
 $ qemu-img convert -O raw cirros-0.3.4-x86_64-disk.img cirros.raw
 $ sudo targetcli /backstores/fileio/ create cirros $PWD/cirros.raw 100M false
 $ sudo targetcli /iscsi create iqn.2016-01.com.example:cirros
 $ sudo targetcli /iscsi/iqn.2016-01.com.example:cirros/tpg1/luns create /backstores/fileio/cirros
 $ sudo targetcli /iscsi/iqn.2016-01.com.example:cirros/tpg1/portals delete 0.0.0.0 ip_port=3260
 $ sudo targetcli /iscsi/iqn.2016-01.com.example:cirros/tpg1/portals create 192.168.122.1

If you do that you'll end up with a targetcli config like this:
$ sudo targetcli
targetcli shell version 2.1.fb43
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 1]
  | | o- cirros ........................................................... [/home/ubuntu/cirros.raw (39.2MiB) write-thru activated]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2016-01.com.example:cirros .................................................................................... [TPGs: 1]
  | o- tpg1 .................................................................................................. [gen-acls, no-auth]
  | o- acls .......................................................................................................... [ACLs: 0]
  | o- luns .......................................................................................................... [LUNs: 1]
  | | o- lun0 ........................................................................ [fileio/cirros (/home/ubuntu/cirros.raw)]
  | o- portals .................................................................................................... [Portals: 1]
  | o- 192.168.122.1:3260 ............................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- srpt ............................................................................................................. [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]

Do that and then on qemu start attach to the console early.
To get that easier, instead of VNC use a local curses console with:
  $ sudo qemu-system-x86_64 -smp cpus=2 -curses -boot order=n -netdev bridge,br=virbr0,id=virtio0 -device virtio-net-pci,netdev=virtio

Hit CTRL+B early on boot for ipxe commands

With out virtbr0 default setup having the host on 192.168.122.1 that would be

iPXE> ifopen net0
iPXE> dhcp
iPXE> sanboot iscsi:192.168.122.1::::iqn.2016-01.com.example:cirros

Retested with 1.0.0+git-20180124.fbe8c52d-0ubuntu2.2~18.04.1 from the PPA.
Boot just as much - so while no perfect test (what if that would be in a VLAN tagged network?) it is better than nothing.

That said - together with all that was discussed before - I think Andres could go on uploading it to Disco.
For the SRUs we will need some extra for [2], but one thing at a time.

Or is the assumption that I drive it from here and you only do verifications on the case?

[1]: https://medium.com/oracledevs/kvm-iscsi-part-i-iscsi-boot-with-ipxe-f533f2666075
[2]: https://packages.ubuntu.com/bionic/ipxe-qemu-256k-compat-efi-roms