-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure: Fixed size vhd file necessary to create Azure VM images #361
Comments
And if possible: offer it on the Azure marketplace, please. This would make things so much easier. |
xref: openshift/installer#3033 (comment) Could we change cc'ing @dustymabe and @darkmuggle who I believe have worked in that cmd in the past. |
@jomeier Looks like you've already figured out the magic Would be good too to sanity check that the compressed image size indeed isn't affected much. |
This is tracked already at #148. Let's keep it out of this ticket here.
I feel like there is some piece that I'm missing. |
This might be relevant here, too: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image |
Ahh, I think I see it. So presumably, the installer could vendor that package too and use that API. Not against just having it fixed in the first place in cosa though if the size difference is indeed negligeable. |
File an issue against COSA. We can look. |
Possibly relevant here, from https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image#convert-the-virtual-disk-to-a-fixed-size-and-to-vhd: Regarding the size of the VHD:
|
@jlebon: The advantage of azure-vhd-utils is that it only transfers the data which is necessary. Because the conversion to fixed size means, that the VHD file is also expanded in size, efficiency plays a big role. @LorbusChris: I made my first OKD tests on Azure with fcos and azure-vhd-utils. It does the job. |
Maybe it's absolutely sufficient to use azure-vhd-utils also with fcos in the fedora coreos ci/cd pipeline. |
I fetched the latest
|
@lucab:
Its absolutely important to use '-o subformat=fixed,force_size'. qemu-img needs this to create the fixed size for Azure. |
Ouch. Hmm, I guess the |
We changed this behaviour during the refactor. There's quite a bit of history here on why do this. But a major one at least is that we want to be able to just `rename(2)` the final build artifacts into place. This saves a bunch of time and I/O. I noticed this due to the fact that we were losing sparsity from the output of `qemu-img convert` because `shutil.move` doesn't do the equivalent of `cp --sparse=auto`. This patch fixes that, though I think we should also be able to change that call to a simple `os.rename()` in a follow-up to make it explicit. Related: coreos/fedora-coreos-tracker#361
OK, so the image
(The |
@darkmuggle There is a known incompatibility in qemu regarding Azure VMs. The conversion should look like this IMHO:
https://possiblelossofprecision.net/?p=2452 Greetings, Josef |
We changed this behaviour during the refactor. There's quite a bit of history here on why do this. But a major one at least is that we want to be able to just `rename(2)` the final build artifacts into place. This saves a bunch of time and I/O. I noticed this due to the fact that we were losing sparsity from the output of `qemu-img convert` because `shutil.move` doesn't do the equivalent of `cp --sparse=auto`. This patch fixes that, though I think we should also be able to change that call to a simple `os.rename()` in a follow-up to make it explicit. Related: coreos/fedora-coreos-tracker#361
I'm hitting a problem where |
Is this a bug we should raise at https://bugs.launchpad.net/qemu/ ? |
@darkmuggle: |
Can someone verify whether the latest Azure images still suffer from this? It should be fixed already by coreos/coreos-assembler#1131. |
@jlebon:
|
@Lebon @LorbusChris Uploading the expanded VHD file from my PC takes forever (max (!) 5MByte/s). As always I used a helper VM on Azure. It's much faster to download/upload the VHD file to Azure if you already are on Azure :-) I think we can close this issue. Thanks a lot ! |
🎉 |
Hi,
currently I try to get OpenShift OKD working with the Azure fcos image.
The OKD installer downloads the xz compressed VHD file, decompresses it and uploads it into an Azure storage blob.
If we want to create an Azure VM image out of this VHD file Azure complains about that it is not fixed size but dynamic size.
Thats a problem because the common tools for converting VHD files from dynamic to fixed size are mostly written in Powershell or similar languages.
Is it possible that you offer fcos as a compressed fixed size VHD image so we don't have to convert it on our own which is not trivial but required for Azure ?
Because the image will be blown up mostly with zeroes, the compression should being able to take care about it.
Greetings,
Josef
The text was updated successfully, but these errors were encountered: