-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
nixos/virtualisation/gcp: Use lib/make-disk-image for building Google… #23233
Conversation
@rickynils, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rbvermaa, @oconnorr and @Phreedom to be potential reviewers. |
PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]} | ||
pushd $out | ||
mv nixos.img disk.raw | ||
tar -Szcf "${diskImageBase}.tar.gz" disk.raw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you not using qcow2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nlewo Is it supported by Google Compute Engine? It is not really clearly stated, but it looks like only RAW
images are supported: https://cloud.google.com/compute/docs/images/import-existing-image. The tar.gz
container is explicitly required, though.
Feel free testing/investigating if qcow2
images work. If so, I think it should be part of a different PR/commit though, for easier debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks. They say raw image must be used. In fact, my question was really naive since i don't use gcp:/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a pity this wasn't/isn't merged yet. Is there a specific reason?
IMO, there is a dire need to refactor image building which is really convoluted. This is the logical first step and I use pretty much the same script to build my own images.
EDIT: I see that the similar changes were actually merged. At this moment this PR is obsolete and should be closed.
type = types.int; | ||
default = 100*1024; | ||
description = '' | ||
The size of the disk image built by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please specify the size unit.
Could someone close this as the similar refactoring was merged in 9fae0f3? EDIT: call @copumpkin who is the author of the above commit |
That commit is from #25165. |
Oh, sorry! I didn't realize this was already a thing or I'd have reused it. Thanks! |
… Compute images
Motivation for this change
Code re-use.
Things done