Machine/template-focal

From Sugar Labs
Jump to navigation Jump to search

VM Creation (host part)

virt-install -v --accelerate --nographics -x console=ttyS0,115200 \
--name template-focal --vcpus=3 --ram $((1 * 1024)) \
--os-type=linux --os-variant=ubuntu18.04 --network bridge:br0 \
--disk path=/var/lib/libvirt/images/boot/template-focal-boot.img,bus=virtio,size=0.25,format=raw \
--disk path=/dev/justice/template-focal-root,bus=virtio,size=10 \
--location http://ubuntu.media.mit.edu/ubuntu/dists/focal/main/installer-amd64/


Obs: format=raw is mandatory, otherwise qcow2 format will be used by default. raw format allows us to easily create device mappings for the image.


The new VM will boot into the installer. Answer all questions with the defaults, except:

  1. Hostname: template-focal
  2. Mirror: enter information manually
  3. Mirror hostname: ubuntu.media.mit.edu
  4. (create your user with a strong password and no encrypted home)
  5. Partitioning: manual (see Partitioning below)
  6. Automatically install security updates
  7. Software selection:
    • Basic Ubuntu Server
    • OpenSSH server
  8. GRUB: let the installer setup grub on /dev/vba (which contains /boot)