Proxmox Arch VM install
For security I wanted to expose a VM on Proxmox to the web rather than a container. Ubuntu is rather heavy, so I settled on an Arch Linux VM.
Easiest way to install Arch - a prebuilt qcow2 file!
This takes a just a couple minutes and requires minimal thought and effort... but the hard drive will be 40GB. If that's a dealbreaker see below on how to install your own instance of Arch.
- Download the basic qcow2 image from https://gitlab.archlinux.org/archlinux/arch-boxes/-/jobs/106936/artifacts/browse/output to your Proxmox server
e.g.,wget https://gitlab.archlinux.org/archlinux/arch-boxes/-/jobs/106936/artifacts/raw/output/Arch-Linux-x86_64-basic-20221201.106936.qcow2?inline=false
- In the PRoxmox GUS Click
Create: VM
- On the OS Selection page choose "Do not use any media"
- Continue the VM creation flow
- Once complete, go to the Hardware tab and select the hard drive - remove it!
- From the terminal run (where 134 is the appropriate instance id and local-zfs the location you want the virtual drive stored).
qm importdisk 134 Arch-Linux-x86_64-basic-20221105.99990.qcow2 local-zfs
- Start the VM and log in with the username/password arch/arch
Harder but more flexible: Install your own instance of Arch
Download the Arch installable iso
Create: VM
- Select a disk size of whatever you want (but at the very least
2
GiB - I'd suggest something like6
GiB so you have some flexibility if you don't expect to need a lot of space. - Select at least
750
MB ram (while 512M should work, I receive an error "Waiting 30 seconds for device....device did not show up..." - Select the Arch iso as an attached disk
- Once the bootable iso boots run:
cfdisk /dev/sda
then run the following commands (note we're installing a Bootable
6. to confirm, you can run lsblk
to see your partitions
7. update package lists
8. Install needed packages to your new virtual hard drive
9. Create the fstab
10. Change root to /mnt so you can configure your new system
11. Configure and install grub (again, this is WITHIN chroot session)
12. Set the root password and create your own user (if you want)
13. Enable NetworkManager so you have internet access once you reboot
13. Exit chroot and shutdown
14. Remove the arch install CD (iso) and start up the new VM!
After install you might be able to lower memory to even 300MB!