#ubuntu-s390x 2017-11-15
<xnox> cpaelzer, can i fake an ECKD drive with like file loop mounts?
<xnox> cpaelzer, to lift raw track data... even though the underlying is just a loop mount.
<xnox> in a QEMU kvm, not a z/vm
<cpaelzer> xnox: ah you have a raw track image and want to load that
<cpaelzer> xnox: how about dd it onto a spare dasd and providing that to the guest then?
<cpaelzer> so on host dd to disk
<cpaelzer> and then add the dasd to the guest
<cpaelzer> that is kind of a loop mount, but with a spare dasd instead of /dev/loop
<xnox> cpaelzer, i have no dasd at all.
<xnox> cpaelzer, i'm in kvm, need to create a raw track data dump. somehow =)
<xnox> cpaelzer, because for a z/vm cloud; i need to ship raw track data dump, not a tarball.
<cpaelzer> oh "inside" kvm
<cpaelzer> not on the host
<cpaelzer> I actually don't know
<cpaelzer> borntraeger: ^^
<cpaelzer> hca: ^^
<borntraeger> xnox, cpaelzer, not sure what you are trying to achieve.
<borntraeger> what kind of system do you have and what do you want to do
<cpaelzer> borntraeger: being inside a KVM guest and having a raw image of track data
<cpaelzer> borntraeger: being abel to mount it
<cpaelzer> that is the case xnox has if I got it right
 * cpaelzer feels there is an answer of the "you should know" kind coming
<borntraeger> what raw track image is this? How was it created?
<cpaelzer> xnox: what was the source ?
<xnox> cpaelzer, borntraeger, for normal ubuntu cloud images, we create a empty file, kparxt connect it, create partition table, debootstrap things on it, run zipl, unmount. and that ends up being a cloud image in qcow2 format that is bootable in s390x Ubuntu Openstack.
<xnox> cpaelzer, borntraeger - now, for the L1CC (original) / z/VM cloud connector / nova-zvm it needs raw track data. Thus in the past i would ssh into a z/VM
<borntraeger> So its an image file for z/VM guests?
<borntraeger> xnox, still do not get what kind of raw track file you have and how it was created
<xnox> and then i would qemu-nbd mount this qcow2 image, dd it onto a dasd drive, re-run zipl, switch the drive into raw track access mode, package that as a file and ship it to glance
<xnox> from where nova-zvm-driver takes that raw track data file, blasts it onto ECKD dasd drive to provision new z/vms
<xnox> however, currently launchpad builds everything in containers, and we create qcow2 image statically. And ideally, I should be able to create a raw track data of an eckd drive, without having a physical dasd drive to mangle.
<borntraeger> so you use a Linux under z/VM with the dasd driver in raw access mode to access the raw tracks after you have filled it with "normal means"
<xnox> borntraeger, can nova-zvm-driver use a non-raw-track-data image? but like a regular qcow2/raw iamge?
<borntraeger> xnox, I have no clue whatsoever about the z/Vm openstack driver
<cpaelzer> xnox: borntraeger knows everything but likely wants to stay away from nova-zvm things :-)
<xnox> borntraeger, currently yes; but ideally i do not want to =/ because my stock build environment has no dasd drives that i can abuse.
<xnox> borntraeger, i'm after to qemu-img convert -> raw track data; because surely it should be possible for the linux kernel, and/or userspace construct track data, which when dd'ed onto a dasd drive in raw track mode just "magically works"
<xnox> borntraeger, is there a defined data format of what raw track data is?
<borntraeger> xnox, I am sure that there is some way to construct the track data out of block data
<borntraeger> xnox, but I do not know
<borntraeger> xnox, maybe somewhere in the zdsfs fuse tool you find information about the track format
<borntraeger> xnox, s390tools/libzds/
<cpaelzer> borntraeger: do you think it would make sense to write to linux-s390 mailing list with that
<cpaelzer> borntraeger: for the other devs around you to check their toolboxes if one has something that achieves that?
<borntraeger> cpaelzer, yes  maybe.
<borntraeger> xnox, cpaelzer, wouldnt it be better if z/VM openstack would support a raw image?
<cpaelzer> oh yes of course
<borntraeger> the openstack thing uses xcat, which uses a Linux
<xnox> borntraeger, as long as i can force zipl to create the right boot code which would be bootable off dasd....
<borntraeger> so I would assume that this is possible
<borntraeger> xnox, you can force all kind of things with zipl
<xnox> borntraeger, my understand was that blasting raw image onto dasd, wouldn't end up with the right bootcode. I should test it.
<borntraeger> zipl.conf has targettype (e.g. CDL)
<borntraeger> and targetgeometry
<xnox> borntraeger, who can i talk to about image formats that the newly rewritten cloud connector supports.
<borntraeger> and targetblocksize
<borntraeger> xnox, no idea. its not us in Boeblingen
 * xnox somehow thought that zipl for CDL ends up on stuff outside of raw image and somewhere before it in the raw track data, but i guess not.
<borntraeger> xnox, its on the first track which is smaller than the usual 4k
<borntraeger> but when you write it the dasd driver ignores the additional bytes and fakes 4k
<xnox> borntraeger, right but the first track is "accesible" by dd when basting things to /dev/dasda which is in non-raw mode. ack.
<borntraeger> yes
<xnox> cool.
<borntraeger> xnox, "newly rewritten cloud connector" refers to whatever is on z/VM I guess?
<borntraeger> xnox, for the kvm openstack mpavone should be able to tell you everything
<xnox> borntraeger, i believe it refers to the "old xcat thing stuff to do openstack instances in z/vm" but rewritten / renamed / upgraded for newer openstack.
<xnox> borntraeger, kvm openstack is all good. we ship cloud images that are usable directly - just add a config drive, and voila.
