about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2018-10-28 00:53:54 +0200
committerGitHub <noreply@github.com>2018-10-28 00:53:54 +0200
commit7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d (patch)
tree1088183d0d465c730bcacd6fd4c3c90863fc9935
parenta3e367ff4bbe479eb269b31f1eaf28fd4c1158c3 (diff)
downloadnixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.tar
nixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.tar.gz
nixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.tar.bz2
nixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.tar.lz
nixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.tar.xz
nixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.tar.zst
nixlib-7ab76cc5e82b461de4af96dfdbafa3eb9ea7265d.zip
nixos/virtualbox-image: increase disk to 50G
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
-rw-r--r--nixos/modules/virtualisation/virtualbox-image.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
index 60048911658c..037c0d2f0d82 100644
--- a/nixos/modules/virtualisation/virtualbox-image.nix
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -12,7 +12,7 @@ in {
     virtualbox = {
       baseImageSize = mkOption {
         type = types.int;
-        default = 10 * 1024;
+        default = 50 * 1024;
         description = ''
           The size of the VirtualBox base image in MiB.
         '';
@@ -61,7 +61,7 @@ in {
           export HOME=$PWD
           export PATH=${pkgs.virtualbox}/bin:$PATH
 
-          echo "creating VirtualBox pass-through disk wrapper (no copying invovled)..."
+          echo "creating VirtualBox pass-through disk wrapper (no copying involved)..."
           VBoxManage internalcommands createrawvmdk -filename disk.vmdk -rawdisk $diskImage
 
           echo "creating VirtualBox VM..."
@@ -72,9 +72,9 @@ in {
             --memory ${toString cfg.memorySize} --acpi on --vram 32 \
             ${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \
             --nictype1 virtio --nic1 nat \
-            --audiocontroller ac97 --audio alsa \
+            --audiocontroller ac97 --audio alsa --audioout on \
             --rtcuseutc on \
-            --usb on --mouse usbtablet
+            --usb on --usbehci on --mouse usbtablet
           VBoxManage storagectl "$vmName" --name SATA --add sata --portcount 4 --bootable on --hostiocache on
           VBoxManage storageattach "$vmName" --storagectl SATA --port 0 --device 0 --type hdd \
             --medium disk.vmdk
@@ -82,7 +82,7 @@ in {
           echo "exporting VirtualBox VM..."
           mkdir -p $out
           fn="$out/${cfg.vmFileName}"
-          VBoxManage export "$vmName" --output "$fn"
+          VBoxManage export "$vmName" --output "$fn" --options manifest
 
           rm -v $diskImage