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 5use a pre-made VirtualBox appliance, it is available at [the downloads 6page](https://nixos.org/nixos/download.html). If you want to set up a 7VirtualBox guest manually, follow these instructions: 8 91. Add a New Machine in VirtualBox with OS Type "Linux / Other Linux" 10 111. Base Memory Size: 768 MB or higher. 12 131. New Hard Disk of 8 GB or higher. 14 151. Mount the CD-ROM with the NixOS ISO (by clicking on CD/DVD-ROM) 16 171. Click on Settings / System / Processor and enable PAE/NX 18 191. Click on Settings / System / Acceleration and enable "VT-x/AMD-V" 20 acceleration 21 221. Click on Settings / Display / Screen and select VMSVGA as Graphics 23 Controller 24 251. Save the settings, start the virtual machine, and continue 26 installation like normal 27 28There are a few modifications you should make in configuration.nix. 29Enable booting: 30 31```nix 32boot.loader.grub.device = "/dev/sda"; 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 39boot.initrd.checkJournalingFS = false; 40``` 41 42Shared folders can be given a name and a path in the host system in the 43VirtualBox settings (Machine / Settings / Shared Folders, then click on 44the "Add" icon). Add the following to the 45`/etc/nixos/configuration.nix` to auto-mount them. If you do not add 46`"nofail"`, the system will not boot properly. 47 48```nix 49{ config, pkgs, ...} : 50{ 51 fileSystems."/virtualboxshare" = { 52 fsType = "vboxsf"; 53 device = "nameofthesharedfolder"; 54 options = [ "rw" "nofail" ]; 55 }; 56} 57``` 58 59The folder will be available directly under the root directory.