1# Installing in a VirtualBox guest {#sec-installing-virtualbox-guest} 2 3Installing NixOS into a VirtualBox guest is convenient for users who 4want to try NixOS without installing it on bare metal. If you want to set 5up a VirtualBox guest, follow these instructions: 6 71. Add a New Machine in VirtualBox with OS Type "Linux / Other Linux" 8 91. Base Memory Size: 768 MB or higher. 10 111. New Hard Disk of 10 GB or higher. 12 131. Mount the CD-ROM with the NixOS ISO (by clicking on CD/DVD-ROM) 14 151. Click on Settings / System / Processor and enable PAE/NX 16 171. Click on Settings / System / Acceleration and enable "VT-x/AMD-V" 18 acceleration 19 201. Click on Settings / Display / Screen and select VMSVGA as Graphics 21 Controller 22 231. Save the settings, start the virtual machine, and continue 24 installation like normal 25 26There are a few modifications you should make in configuration.nix. 27Enable booting: 28 29```nix 30{ 31 boot.loader.grub.device = "/dev/sda"; 32} 33``` 34 35Also remove the fsck that runs at startup. It will always fail to run, 36stopping your boot until you press `*`. 37 38```nix 39{ 40 boot.initrd.checkJournalingFS = false; 41} 42``` 43 44Shared folders can be given a name and a path in the host system in the 45VirtualBox settings (Machine / Settings / Shared Folders, then click on 46the "Add" icon). Add the following to the 47`/etc/nixos/configuration.nix` to auto-mount them. If you do not add 48`"nofail"`, the system will not boot properly. 49 50```nix 51{ config, pkgs, ...} : 52{ 53 fileSystems."/virtualboxshare" = { 54 fsType = "vboxsf"; 55 device = "nameofthesharedfolder"; 56 options = [ "rw" "nofail" ]; 57 }; 58} 59``` 60 61The folder will be available directly under the root directory.