Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/virtualbox-image: increase disk to 50G #49317

Merged
merged 1 commit into from Oct 28, 2018

Conversation

c0bw3b
Copy link
Contributor

@c0bw3b c0bw3b commented Oct 27, 2018

Motivation for this change

Follow-up to #46649 and #48151
The official demo VM needs to offer more space for practical usage.

This PR extends the max possible disk size from 10GB to 50GB.
The generated OVA size does not change and since the VM has dynamic provisioning it still takes the same size (around 4GB) the first time the VM is imported and launched.

100GB breaks cptofs but 50GB is fine and benchmarks shows it takes the same time as building the demo VBox VM with a 10GB disk. See below.

Also done:

  • enabled VM sound output (was muted by default)
  • set USB controller in USB2.0 mode (was in default USB1.1)
  • add manifest file in the OVA as it allows integrity checking on imports

/cc @brainrape @bjornfor @matthewbauer

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

I've run many OVA builds over the last days using time nix-build -I nixpkgs=. -A ova '<nixpkgs/nixos/release.nix>' --option max-silent-time 7200 for some basic benchmarking.
TL;DR; --> with 10GB / 25GB / 50GB all builds took around 16minutes on my machine.

I did one try with 100GB and I had to abort the build after more than one hour... cptofs was taking 100% of one core but was not going anywhere... I'm not able to troubleshoot cptofs so let's stick to 50GB for now. 馃樇


100GB breaks cptofs but 50GB is fine and benchmarks shows it takes the same time as building the demo VBox VM with a 10GB disk

+ enabled VM sound output by default
+ set USB controller in USB2.0 mode
+ add manifest file in the OVA as it allows integrity checking on imports
@c0bw3b
Copy link
Contributor Author

c0bw3b commented Oct 27, 2018

There is a warning raised by qemu at every build which does not prevent it but not ideal nonetheless:

WARNING: Image format was not specified for 'nixos.raw' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.

The problem lies in qemuCommandLinux
It should state format=raw,file=$diskImage but only for raw images obviously...
If I think of a good way to do that I'll add a commit here.

@infinisil
Copy link
Member

Very informative PR description, nice!

@infinisil infinisil merged commit 7485426 into NixOS:master Oct 28, 2018
@c0bw3b
Copy link
Contributor Author

c0bw3b commented Oct 28, 2018

Thanks.
(it's also sort of a worklog for myself if I ever want to retry something similar :p )

@c0bw3b
Copy link
Contributor Author

c0bw3b commented Oct 31, 2018

馃帀 first OVA with some real estate available on Hydra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants