remarks - vm will not have autostart - storage req: 40GB - root size: 10GB (x2 for raid 1) - storage size: 5GB (x4 for raid-z2) install (debian) $ apt install qemu-kvm libvirt virt-install virt-viewer install (arch) $ pacman -S qemu libvirt virt-install virt-viewer start and set autostart libvirtd $ systemctl enable --now libvirtd $ virsh troubleshooting: try to load the kvm module with `modprobe kvm_intel` create storage pool for mirror > pool-define-as mirror dir --target="~/.local/mirror/images" > pool-build mirror > pool-start mirror > pool-autostart mirror create virtual disks > vol-create-as mirror mirror_root1.qcow2 10G > vol-create-as mirror mirror_root2.qcow2 10G > vol-create-as mirror mirror_disk1.qcow2 5G > vol-create-as mirror mirror_disk2.qcow2 5G > vol-create-as mirror mirror_disk3.qcow2 5G > vol-create-as mirror mirror_disk4.qcow2 5G (exit virsh shell) get ubuntu iso $ curl -O https://releases.ubuntu.com/20.04/ubuntu-20.04.2-live-server-amd64.iso create the vm $ virt-install \ --name=mirror \ --memory=2048 \ --vcpus=1 \ --boot uefi \ --location="./ubuntu-20.04.2-live-server-amd64.iso" \ --disk vol=mirror/mirror_root1.qcow2 \ --disk vol=mirror/mirror_root2.qcow2 \ --disk vol=mirror/mirror_disk1.qcow2 \ --disk vol=mirror/mirror_disk2.qcow2 \ --disk vol=mirror/mirror_disk3.qcow2 \ --disk vol=mirror/mirror_disk4.qcow2 \ interface should automatically come up but can also use $ virt-viewer --domain-name mirror if vm is on a remote machine $ virt-viewer --connect qemu+ssh://user@host.example.com/system vmnamehere for now just have a folder of screenshots - change name of lvm volume from "lv0-root" to just "root" troubleshooting: ignore "failed to unmount /cdrom" and just ctrl+c in viewer login into your created user (from install), change to root, and create password for root $ sudo su type in your password $ passwd create root password create zpool (use /dev/disk/by-id/.. instead) $ apt update $ apt install zfsutils-linux nginx rsync $ mkdir -p /mirror/root/.cscmirror $ zpool create -f -m /mirror/root/.cscmirror cscmirror raidz2 /dev/vdc /dev/vdd /dev/vde /dev/vdf may already be mounted but just to be sure $ zfs mount -a TODO - configure symlinking from /mirror/root/.cscmirror to /mirror/root - configure ssh for push sync - configure nginx - configure rsync - set motd? - configure FTP (using proftpd) - Merlin in ~mirror/merlin -> /home/mirror/merlin - ~mirror/merlin/arthur.py status - ~mirror/merlin/arthur.py sync:PROJECT_NAME - Sync Scripts in ~mirror/bin (and repo, but repo has less) - take params local_dir rsync_host rsync_dir - check out csclub wiki mirror administration for adding a new project and project sync - ask if can ignore /mirror/newroot - mirror hosts - http://mirror.csclub.uwaterloo.ca (the mirror) - http://ca.releases.ubuntu.com (ubuntu releases) - http://ca.ceph.com (ceph releases) - http://debian.csclub.uwaterloo.ca (csclub's debian packages)