EDIT: To save some scrolling it is possible but it isn’t practical because your mixing usermode binaries (qemu-nbd) with kernel modules (lio + targetcli-fb) and the performance is miserable even on bleeding edge fast machines with 10g ethernet.
–Oriiginal Post–
Anyone think it’s possible to make a linked-clone qcow2 as an iscsi target?
I want to plop a customers pc on the counter and pxe boot it into a working updated windows 10 os. Example:
Client boots. ipxe uses client mac address in variable to sanhook iscsi target. Iscsi target host sees it doesn’t have a matching file. Takes existing windows 10 sysprep’d qcow2 and creates a linked-clone matching the requested file. Iscsi host creates iscsi target to match request. Client finally successfully sanhook’s requested iscsi target and does oobe first boot of windows 10. Linked image retains drivers and software through reboots. If customer decides to go for OS reinstall use iscsi target as image source. After, delete linked-image
Can’t tell you how much I like the idea. If any problems rebuilding the customer’s OS you run into them on your image before you commit it to the drive.
And PC shop owners, what’s your method of working on customer computers. If they won’t sign the Liability Waiver I tell them to take it somewhere else. Heard of more than a few small shops getting ruined over lost data. SSDs are cheap. OS loading over a 1GB lan has decent speed. But good lawyer is expensive and our courts are slow.
I’m an old hat with pxe, tftp, nfs, and samba os deployment methods. I’ve got a bit more to learn about iscsi and ipxe to make this work together but I think it’s doable. I could see tail of iscsi log, sed out the requested image to qemu-img -b . Then qcow mount linked-clone to local machine. iscsi target point to new mount point. restart iscsi service. Bet that would make it take two runs of sanhook to work properly for first boot… this method lacks elegance. But I think it would work. Possible workaround is the server could be the dhcp server using dnsmasq, that way it could generate the iscsi target in advance of the sanhook request… better.
Please post thoughts and comments.