From e2191ee0c96f57929d640cd77226e95f121f22e9 Mon Sep 17 00:00:00 2001 From: Laksith Date: Thu, 17 Feb 2022 19:18:51 -0800 Subject: [PATCH] Updates to a3 --- labs/a3.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/labs/a3.md b/labs/a3.md index 36e0ac52..c0981ea4 100644 --- a/labs/a3.md +++ b/labs/a3.md @@ -91,7 +91,7 @@ some packages that will allow us to create our nested Arch Linux VM. Run ```sh -sudo apt install --no-install-recommends qemu-kvm qemu-utils libvirt-daemon-system libvirt-clients virtinst ovmf +sudo apt install --no-install-recommends qemu-kvm qemu-utils libvirt-daemon-system libvirt-clients virtinst ovmf dnsmasq ```
@@ -119,11 +119,11 @@ https://mirrors.ocf.berkeley.edu/archlinux/iso/latest/ to find the latest Arch release. Using the `wget` command within your VM, download the `.iso` file found within this directory as well as the `.iso.sig` signature file that we will use to verify the authenticity of the `.iso` file. For example, the current release -at the time of writing is `2021.09.01`, so you would run the following commands:\ - +at the time of writing is `2022.02.01`, so you would run the following commands:\ +**OCF Mirrors are down at the moment so we'll be using an alternate mirror** ```sh -wget 'https://mirrors.ocf.io/archlinux/iso/latest/archlinux-2022.02.01-x86_64.iso' -wget 'https://mirrors.ocf.io/archlinux/iso/latest/archlinux-2022.02.01-x86_64.iso.sig' +wget 'http://mirrors.edge.kernel.org/archlinux/iso/2022.02.01/archlinux-2022.02.01-x86_64.iso' +wget 'http://mirrors.edge.kernel.org/archlinux/iso/2022.02.01/archlinux-2022.02.01-x86_64.iso.sig' ``` Note that Arch is a ["rolling release"](https://en.wikipedia.org/wiki/Rolling_release) distribution (as @@ -178,13 +178,26 @@ what is their key's fingerprint? > you say you are?"
+### Create Swap File + +As, we only have 1G of ram on our host machine, we need to create a swap file that will act as a ram overflow on our hardisk. + +```sh +sudo fallocate -l 2G /swapfile +sudo chmod 600 /swapfile +sudo mkswap /swapfile +sudo swapon /swapfile +echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab +``` + ### Create VM Now, we need to actually create our VM. **_(Don't run this command until you've read the next paragraph!)_** To do this, you will run ```sh -sudo virt-install --name archvm --memory 575 --cpu host --vcpus 1 --disk size=5 --network network=default --boot uefi --graphics none --cdrom archlinux-2021.09.01-x86_64.iso +sudo virsh net-start default +sudo virt-install --name archvm --memory 800 --cpu host --vcpus 1 --disk size=5 --network network=default --boot uefi --graphics none --cdrom archlinux-2022.02.01-x86_64.iso ``` This will do some initial setup, and then drop us into a virtual @@ -542,6 +555,7 @@ packages. Go ahead and just put the OCF mirror at the top! Edit `/etc/pacman.d/mirrorlist` using `vim`/`emacs`/`nano` and put the following line at the top: +**Skip this step as OCF mirrors are down at the moment** ``` Server = https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch ```