Skip to content

Commit

Permalink
Updates to a3
Browse files Browse the repository at this point in the history
  • Loading branch information
laksith19 committed Feb 18, 2022
1 parent 48a9e1e commit e2191ee
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions labs/a3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<div class="code-example" markdown="1">

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -178,13 +178,26 @@ what is their key's fingerprint?
> you say you are?"
</div>
### 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
Expand Down Expand Up @@ -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
```
Expand Down

0 comments on commit e2191ee

Please sign in to comment.