A story of supporting XenServer Images in cinder – converting a vhd chain to a raw volume.

In tempest test suite, there are some test cases around creating a volume from an image. On the Cinder side this basically means to get the image, ask qemu-img to recognise its format, and to convert it to raw, and write the raw bytes to the volume.

With XenServer, this works out of the box with raw images, but if you are using XenServer type images, you will get unexpected results, when you expect to see the bytes of your image on the volume. Basically the image file will be written to the volume, without any conversion, because qemu-img recognise the targz file as raw.

dd -ing a targz of vhd chains to a disk is hardly usable.

We decided to eliminate this gap, and implement XenServer image to volume functionality. Having this feature will enable us to run boot from volume exercise as well.

About XenServer Images

As a first thing, let’s get familiar with XenServer type images in OpenStack. If you are using XenServer with OpenStack, the images used are vhd chains inside a targz archive file. You might wonder why the chain is needed, but it will be clear in a second, once we get to snapshots. For now, let’s say that there could be more than one vhd inside the targz, forming a chain.

The above mentioned format could be best learned by looking at the XenAPI plugins. Those plugins live in nova at the moment.

The conclusion is that a XenServer image is a tgz with vhd files inside. The naming convention of those files are:

[[code]]czoyNjpcIjAudmhkDQoxLnZoZA0KLi4uDQpuLnZoZA0KXCI7e1smKiZdfQ==[[/code]]

And they form a chain, 0.vhd being the latest difference, and n.vhd being the base image.

Converting a XenServer Image to raw

To start with something, let’s create a simple cirros image for start. This should be a tgz containing one base image, 0.vhd. See this blog entry on how to accomplish this. If you don’t want to spend time with creating the initial image, feel free to download it from here. If you are using devstack to install your OpenStack, you could specify the above url in your localrc file, and your initial stack will be populated with the image:

[[code]]czoxNTA6XCJJTUFHRV9VUkxTPVwiaHR0cHM6Ly9naXRodWIuY29tL2Rvd25sb2Fkcy9jaXRyaXgtb3BlbnN0YWNrL3dhcmVob3VzZS9je1smKiZdfWlycm9zLTAuMy4wLXg4Nl82NC1kaXNrLnZoZC50Z3pcIg0KREVGQVVMVF9JTUFHRV9OQU1FPVwiY2lycm9zLTAuMy4wLXg4Nl82NC1kaXtbJiomXX1za1wiDQpcIjt7WyYqJl19[[/code]]

DEFAULT_IMAGE_NAME is required by various tests to find the image for the tests.

Enter to your stack:

[[code]]czozNDpcIiQgY2QgZGV2c3RhY2svDQokIC4gb3BlbnJjIGFkbWluDQpcIjt7WyYqJl19[[/code]]

So let’s say, we have this image uploaded to our cloud:

[[code]]czo0NzI6XCIkIGdsYW5jZSBpbWFnZS1saXN0DQorLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS17WyYqJl19Ky0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0rLS0tLS0tLS0rDQp8IElEICAgfCBOYW1lICAgICAgICAgICAgICAgICAgICAgfHtbJiomXX0gRGlzayBGb3JtYXQgfCBDb250YWluZXIgRm9ybWF0IHwgU2l6ZSAgICB8IFN0YXR1cyB8DQorLS0tLS0tKy0tLS0tLS0tLS0tLS0te1smKiZdfS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0rLS0tLS0tLS0rDQp8ICZsdDtpZCZ7WyYqJl19Z3Q7IHwgY2lycm9zLTAuMy4wLXg4Nl82NC1kaXNrIHwgdmhkICAgICAgICAgfCBvdmYgICAgICAgICAgICAgIHwgOTIyMDAxOCB8IHtbJiomXX1hY3RpdmUgfA0KKy0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0te1smKiZdfS0rLS0tLS0tLS0tKy0tLS0tLS0tKw0KXCI7e1smKiZdfQ==[[/code]]

Good stuff. Let’s download it:

[[code]]czo1NDpcIiQgZ2xhbmNlIGltYWdlLWRvd25sb2FkICZsdDtpZCZndDsgLS1maWxlIG9yaWdpbi50Z3oNClwiO3tbJiomXX0=[[/code]]

Look into it:

[[code]]czo3ODpcIiQgbWtkaXIgb3JpZ2luICZhbXA7JmFtcDsgdGFyIC14emYgb3JpZ2luLnRneiAtQyBvcmlnaW4NCiQgbHMgb3JpZ2luLw17WyYqJl19CjAudmhkDQpcIjt7WyYqJl19[[/code]]

Now install the vhd-util to gather some information on the vhd file:

[[code]]czozNzpcIiQgc3VkbyBhcHQtZ2V0IGluc3RhbGwgYmxrdGFwLXV0aWxzDQpcIjt7WyYqJl19[[/code]]

And take a closer look at 0.vhd:

[[code]]czoxNzk6XCIkIHZoZC11dGlsIHJlYWQgLW4gb3JpZ2luLzAudmhkIC1wDQouLi4NCk9yaWdpbmFsIGRpc2sgc2l6ZSAgOiA0MCBNQiB7WyYqJl19KDQxOTQzMDQwIEJ5dGVzKQ0KQ3VycmVudCBkaXNrIHNpemUgICA6IDQwIE1CICg0MTk0MzA0MCBCeXRlcykNCi4uLg0KRGlzayB0eXtbJiomXX1wZSAgICAgICAgICAgOiBEeW5hbWljIGhhcmQgZGlzaw0KXCI7e1smKiZdfQ==[[/code]]

Now, get back to OpenStack, and launch an instance based on this image with the m1.tiny flavor:

[[code]]czo2MTpcIiQgbm92YSBib290IC0tZmxhdm9yPW0xLnRpbnkgLS1pbWFnZT0mbHQ7aWQmZ3Q7IGRlbW9tYWNoaW5lDQpcIjt7WyYqJl19[[/code]]

After some time, the instance will get an IP address, use nova list to get its IP, and ssh to the instance. This is a standard cirros image, so username sould be cirros and password is cubswin:).

Now, inside the instance, see, that the disk has been resized according to the requested flavor:

[[code]]czo2NzpcIiQgc3VkbyBmZGlzayAtbA0KDQpEaXNrIC9kZXYveHZkYTogMTA3MyBNQiwgMTA3Mzc0MTgyNCBieXRlcw0KLi4uDQpcIjt7WyYqJl19[[/code]]

Now, write some data to the disk with dd:

[[code]]czoxMDY6XCIkIHN1ZG8gZGQgaWY9L2Rldi94dmRhIG9mPXNvbWVmaWxlIGJzPTEwMjQgY291bnQ9MTAwMDANCiQgc3VkbyBtZDVzdW17WyYqJl19IHNvbWVmaWxlICZndDsgc29tZWZpbGUubWQ1DQokIHN5bmMNClwiO3tbJiomXX0=[[/code]]

Now, I am logging out of the instance (back to my devstack), and creating a backup of this instance to glance:

[[code]]czo1MDQ6XCIkIG5vdmEgb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LS0te1smKiZdfS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0rLS17WyYqJl19LS0tLS0tKw0KfCAmbHQ7aWQmZ3Q7ICAgICAgfCBjaXJyb3MtMC4zLjAteDg2XzY0LWRpc2sgfCB2aGQgICAgICAgICB8IG92ZiAgIHtbJiomXX0gICAgICAgICAgIHwgOTIyMDAxOCAgfCBhY3RpdmUgfA0KfCAmbHQ7c25hcGlkJmd0OyAgfCBzbmFwICAgICAgICAgICAgICAgICAge1smKiZdfSAgIHwgdmhkICAgICAgICAgfCBvdmYgICAgICAgICAgICAgIHwgMTAxMTcxMjAgfCBhY3RpdmUgfA0KKy0tLS0tLS0tLS0tKy0tLS17WyYqJl19LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tKy0tLS0tLS0tK3tbJiomXX0NClwiO3tbJiomXX0=[[/code]]

Let’s download the new image for some investigation:

[[code]]czoxNDA6XCIkIGdsYW5jZSBpbWFnZS1kb3dubG9hZCAmbHQ7c25hcGlkJmd0OyAtLWZpbGUgc25hcC50Z3oNCiQgbWtkaXIgc25hcCB7WyYqJl19JmFtcDsmYW1wOyB0YXIgLXh6ZiBzbmFwLnRneiAtQyBzbmFwDQokIGxzIHNuYXAvDQowLnZoZCAgMS52aGQgIDIudmhkDQpcIjt7WyYqJl19[[/code]]

Oh, that’s how we get multiple vhd files per image! vhd-util can check a vhd, so let’s try that:

[[code]]czoxODg6XCIkIHZoZC11dGlsIGNoZWNrIC1uIHNuYXAvMC52aGQNCnBhcmVudCBsb2NhdG9yIDAgcG9pbnRzIHRvIG1pc3NpbmcgZml7WyYqJl19bGUgLi82NjA4M2E1Ni1mNWU4LTRkOGEtODQ3YS1hMWUyMzUyNjQ3MmMudmhkIChyZXNvbHZlZCB0byAobnVsbCkpDQpzbmFwLzAudntbJiomXX1oZCBhcHBlYXJzIGludmFsaWQ7IGR1bXBpbmcgbWV0YWRhdGENCi4uLg0KXCI7e1smKiZdfQ==[[/code]]

Let’s look at these vhd files, and see that the snapshots are differencing hard disks, and that the parent name refers to non-existing vhd files.

[[code]]czo3MzU6XCIkIHZoZC11dGlsIHJlYWQgLW4gc25hcC8wLnZoZCAtcA0KLi4uDQpPcmlnaW5hbCBkaXNrIHNpemUgIDogMTAyNCBNQiB7WyYqJl19KDEwNzM3NDE4MjQgQnl0ZXMpDQpDdXJyZW50IGRpc2sgc2l6ZSAgIDogMTAyNCBNQiAoMTA3Mzc0MTgyNCBCeXRlcykNCi4uLg0KRHtbJiomXX1pc2sgdHlwZSAgICAgICAgICAgOiBEaWZmZXJlbmNpbmcgaGFyZCBkaXNrDQouLi4NClBhcmVudCBuYW1lICAgICAgICAgOiA2NjA4e1smKiZdfTNhNTYtZjVlOC00ZDhhLTg0N2EtYTFlMjM1MjY0NzJjLnZoZA0KLi4uDQokIHZoZC11dGlsIHJlYWQgLW4gc25hcC8xLnZoZCAtcA17WyYqJl19Ci4uLg0KT3JpZ2luYWwgZGlzayBzaXplICA6IDQwIE1CICg0MTk0MzA0MCBCeXRlcykNCkN1cnJlbnQgZGlzayBzaXplICAgOiAxMHtbJiomXX0yNCBNQiAoMTA3Mzc0MTgyNCBCeXRlcykNCi4uLg0KRGlzayB0eXBlICAgICAgICAgICA6IERpZmZlcmVuY2luZyBoYXJkIGRpc2sNe1smKiZdfQouLi4NClBhcmVudCBuYW1lICAgICAgICAgOiA1MGNhNDM4NC1mNGUzLTRiN2ItYmE3OS1iMTc1ZTVkYTJlNGIudmhkDQouLi4NCiR7WyYqJl19IHZoZC11dGlsIHJlYWQgLW4gc25hcC8yLnZoZCAtcA0KLi4uDQpPcmlnaW5hbCBkaXNrIHNpemUgIDogNDAgTUIgKDQxOTQzMDQwIHtbJiomXX1CeXRlcykNCkN1cnJlbnQgZGlzayBzaXplICAgOiA0MCBNQiAoNDE5NDMwNDAgQnl0ZXMpDQouLi4NCkRpc2sgdHlwZSAgICAgICAge1smKiZdfSAgIDogRHluYW1pYyBoYXJkIGRpc2sNCi4uLg0KUGFyZW50IG5hbWUgICAgICAgICA6IA0KLi4uDQpcIjt7WyYqJl19[[/code]]

It’s time to fix the chain:

[[code]]czo5NDpcIiQgdmhkLXV0aWwgbW9kaWZ5IC1uIHNuYXAvMC52aGQgLXAgc25hcC8xLnZoZA0KJCB2aGQtdXRpbCBtb2RpZnkgLW4gc257WyYqJl19YXAvMS52aGQgLXAgc25hcC8yLnZoZA0KXCI7e1smKiZdfQ==[[/code]]

And the check should be fine:

[[code]]czo1NDpcIiQgdmhkLXV0aWwgY2hlY2sgLW4gc25hcC8wLnZoZCANCnNuYXAvMC52aGQgaXMgdmFsaWQNClwiO3tbJiomXX0=[[/code]]

Now we just need to convert them to a raw disk:

[[code]]czo0NjpcIiQgcWVtdS1pbWcgY29udmVydCBzbmFwLzAudmhkIC1PIHJhdyB6ZXJvdmhkDQpcIjt7WyYqJl19[[/code]]

And look at the partition table:

[[code]]czo3OTpcIiQgZmRpc2sgLWwgemVyb3ZoZA0KLi4uDQpEaXNrIHplcm92aGQgZG9lc25cJ3QgY29udGFpbiBhIHZhbGlkIHBhcnRpdGlve1smKiZdfW4gdGFibGUNClwiO3tbJiomXX0=[[/code]]

That’s bad, we were expecting a partition table. The issue here seems to be, that qemu-img does not look at the whole chain, just this item. So let’s coalesce all the devices back to the base image:

[[code]]czo3MDpcIiQgdmhkLXV0aWwgY29hbGVzY2UgLW4gc25hcC8wLnZoZA0KJCB2aGQtdXRpbCBjb2FsZXNjZSAtbiBzbmFwLzEudmhkDQp7WyYqJl19XCI7e1smKiZdfQ==[[/code]]

And convert the coalesced base image:

[[code]]czoyNjg6XCIkIHFlbXUtaW1nIGNvbnZlcnQgc25hcC8yLnZoZCAtTyByYXcgY29hbGVzY2VkLnJhdw0KJCBmZGlzayAtbCBjb2FsZXN7WyYqJl19Y2VkLnJhdw0KLi4uDQpEaXNrIGNvYWxlc2NlZC5yYXc6IDQxIE1CLCA0MTkwOTc2MCBieXRlcw0KLi4uDQogICAgICAgIERldmljZXtbJiomXX0gQm9vdCAgICAgIFN0YXJ0ICAgICAgICAgRW5kICAgICAgQmxvY2tzICAgSWQgIFN5c3RlbQ0KY29hbGVzY2VkLnJhdzEgICAqICAge1smKiZdfSAgICAxNjA2NSAgICAgMjA4ODQ0OSAgICAgMTAzNjE5MisgIDgzICBMaW51eA0KXCI7e1smKiZdfQ==[[/code]]

Looks better, although the size does not look good. I would expect it to be a 1G disk. In order to fix this issue, I will include a resize step as well, so that my conversion looks like this:

[[code]]czo0NDE6XCIkIG1rZGlyIHNuYXAgJmFtcDsmYW1wOyB0YXIgLXh6ZiBzbmFwLnRneiAtQyBzbmFwDQokIHZoZC11dGlsIG1vZGlmeSB7WyYqJl19LW4gc25hcC8wLnZoZCAtcCBzbmFwLzEudmhkDQokIHZoZC11dGlsIHJlc2l6ZSAtbiBzbmFwLzEudmhkIC1zICQodmhkLXV0aWwgcXtbJiomXX11ZXJ5IC1uIHNuYXAvMC52aGQgLXYpIC1qIHJlc2l6ZTEuam91cm5hbA0KJCB2aGQtdXRpbCBjb2FsZXNjZSAtbiBzbmFwLzAudmhke1smKiZdfQ0KJCB2aGQtdXRpbCBtb2RpZnkgLW4gc25hcC8xLnZoZCAtcCBzbmFwLzIudmhkDQokIHZoZC11dGlsIHJlc2l6ZSAtbiBzbmFwLzJ7WyYqJl19LnZoZCAtcyAkKHZoZC11dGlsIHF1ZXJ5IC1uIHNuYXAvMS52aGQgLXYpIC1qIHJlc2l6ZTIuam91cm5hbA0KJCB2aGQtdXRpbCBjb3tbJiomXX1hbGVzY2UgLW4gc25hcC8xLnZoZA0KJCBxZW11LWltZyBjb252ZXJ0IHNuYXAvMi52aGQgLU8gcmF3IHJhd2Rpc2sNClwiO3tbJiomXX0=[[/code]]

Now, as we have rawdisk, let’s mount it:

[[code]]czoxMjU6XCIkIHN1ZG8ga3BhcnR4IC1hdiByYXdkaXNrDQphZGQgbWFwIGxvb3AxcDEgKDI1MjowKTogMCA2NDI2MCBsaW5lYXIgL2R7WyYqJl19ZXYvbG9vcDEgMTYwNjUNCiQgc3VkbyBtb3VudCAvZGV2L21hcHBlci9sb29wMXAxIC9tbnQvDQpcIjt7WyYqJl19[[/code]]

And check, if the checksum of the file is the same

[[code]]czo4MTpcIiQgKCBjZCAvbW50L2hvbWUvY2lycm9zLyAmYW1wOyZhbXA7IHN1ZG8gbWQ1c3VtIC1jIHNvbWVmaWxlLm1kNSApDQpzb217WyYqJl19ZWZpbGU6IE9LDQpcIjt7WyYqJl19[[/code]]

Also, fdisk should give the expected results:

[[code]]czo2ODpcIiQgZmRpc2sgLWwgcmF3ZGlzaw0KDQpEaXNrIHJhd2Rpc2s6IDEwNzMgTUIsIDEwNzM0Nzk2ODAgYnl0ZXMNCi4uLg0KXCI7e1smKiZdfQ==[[/code]]

So, this is the story on how to convert a XenServer Image manually to a raw disk with some userspace tools.

Cinder

The cinder patch, that adds these changes to cinder, could be found here , so if you have any questions or suggestion on it, please comment on it.

My local devstack installation already has this patch, so I can easily create an instance from that image:

[[code]]czo1MDE6XCIkIGNpbmRlciBjcmVhdGUgLS1pbWFnZS1pZCAmbHQ7c25hcGlkJmd0OyAxDQouLi4NCiQgY2luZGVyIGxpc3QNCistLS17WyYqJl19LS0tLS0tKy0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tKy0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0rLS0tLS0tLS0tLXtbJiomXX0tLS0rDQp8ICAgICAgSUQgfCAgIFN0YXR1cyAgfCBEaXNwbGF5IE5hbWUgfCBTaXplIHwgVm9sdW1lIFR5cGUgfCBCb290YWJsZSB8e1smKiZdfSBBdHRhY2hlZCB0byB8DQorLS0tLS0tLS0tKy0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tKy0tLS0tLSstLS0tLS0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5vbmUgICAgICAgfCBSdW5uaW5nICAgICB8IHB7WyYqJl19cml2YXRlPTEwLjAuMC4zIHwNCistLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tKy0tLS0tLS0tLS0tLSstLS0tLXtbJiomXX0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0rDQpcIjt7WyYqJl19[[/code]]

And check the checksum:

[[code]]czo5NTpcIiQgc3NoIGNpcnJvc0AxMC4wLjAuMyBzdWRvIG1kNXN1bSAtYyBzb21lZmlsZS5tZDUNCmNpcnJvc0AxMC4wLjAuM1wncyBwe1smKiZdfWFzc3dvcmQ6IA0Kc29tZWZpbGU6IE9LDQpcIjt7WyYqJl19[[/code]]

This clearly illustrates, that I was able to create a volume from a XenServer type OpenStack image.