Next: , Previous: , Up: System Installation   [Contents][Index]


3.8 Installing Guix in a Virtual Machine

If you’d like to install Guix System in a virtual machine (VM) or on a virtual private server (VPS) rather than on your beloved machine, this section is for you.

To boot a QEMU VM for installing Guix System in a disk image, follow these steps:

  1. First, retrieve and decompress the Guix system installation image as described previously (see USB Stick and DVD Installation).
  2. Create a disk image that will hold the installed system. To make a qcow2-formatted disk image, use the qemu-img command:
    qemu-img create -f qcow2 guix-system.img 50G
    

    The resulting file will be much smaller than 50 GB (typically less than 1 MB), but it will grow as the virtualized storage device is filled up.

  3. Boot the USB installation image in an VM:
    qemu-system-x86_64 -m 1024 -smp 1 -enable-kvm \
      -nic user,model=virtio-net-pci -boot menu=on,order=d \
      -drive file=guix-system.img \
      -drive media=cdrom,file=guix-system-install-1.3.0.17171-a1632.system.iso
    

    -enable-kvm is optional, but significantly improves performance, see Running Guix in a VM.

  4. You’re now root in the VM, proceed with the installation process. See Preparing for Installation, and follow the instructions.

Once installation is complete, you can boot the system that’s on your guix-system.img image. See Running Guix in a VM, for how to do that.