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{ boot.loader.grub.device = "/dev/sda"; } 31``` 32 33Also remove the fsck that runs at startup. It will always fail to run, 34stopping your boot until you press `*`. 35 36```nix 37{ boot.initrd.checkJournalingFS = false; } 38``` 39 40Shared folders can be given a name and a path in the host system in the 41VirtualBox settings (Machine / Settings / Shared Folders, then click on 42the "Add" icon). Add the following to the 43`/etc/nixos/configuration.nix` to auto-mount them. If you do not add 44`"nofail"`, the system will not boot properly. 45 46```nix 47{ config, pkgs, ... }: 48{ 49 fileSystems."/virtualboxshare" = { 50 fsType = "vboxsf"; 51 device = "nameofthesharedfolder"; 52 options = [ 53 "rw" 54 "nofail" 55 ]; 56 }; 57} 58``` 59 60The folder will be available directly under the root directory.