Skip to content
Setup Arch Linux as a Virtual Machine

Setup Arch Linux as a Virtual Machine

Published: at 07:14 PM

Table of contents

Open Table of contents

Intro

On this Post You will see how to setup Arch Linux as a Virtual Machine in VMWare.

Goal: Make it work.

Setup

VMWare Settings

Other linux 6.x kernel 64-bit, RAM 1, Disk 10.

Additionally, choose UEFI under Advanced in Settings/Options of the machine.

to ssh

you may need to change password of root:

passwd root
# root

Installation Process

timedatectl set-ntp true # time
lsblk # see disks
cfdisk /dev/sda # partition

NEW -> 500M with TYPE -> EFI System

NEW -> 8.5G with TYPE -> Linux FIlesystem

NEW -> 1G with TYPE -> Linux Swap

WRITE then QUIT

# assigning roles to partitions
mkswap /dev/sda3
swapon /dev/sda3
mkfs.ext4 /dev/sda2
mkfs.fat -F32 /dev/sda1
# mounting
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
# installing some packacges
pacstrap /mnt base linux linux-firmware

# for mount after boot
genfstab -U /mnt >> /mnt/etc/fstab
# change root dir
arch-chroot /mnt

# timezone, locale smth, hostname
ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime
pacman -S vim
vim /etc/locale.gen # uncomment en_US ones
locale-gen
vim /etc/locale.conf # LANG=en_US.UTF-8
vim /etc/hostname
# somehost

# Network services
systemctl enable systemd-networkd
systemctl enable systemd-resolved
vim /etc/systemd/network/20-wired.network # but first ip a
[Match]
Name=ens33

[Network]
DHCP=yes

# root user password
passwd

# if intel
pacman -S intel-ucode

# bootloader
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

# at the end
exit
umount -R /mnt
reboot

Installation complete.

to ssh again

pacman -S openssh
systemctl status sshd
systemctl enable sshd
systemctl start sshd

add a user and enable sudo

useradd -m -G wheel hannibal
passwd hannibal # hannibal

pacman -S sudo vi vim
usermod -aG wheel hannibal
visudo # Uncomment %wheel ALL=(ALL:ALL) ALL

GUI

Here, we will install xfce. (You may install any other GUI!)

sudo pacman -S --needed xorg
sudo pacman -S --needed xfce4 mousepad parole ristretto thunar-archive-plugin thunar-media-tags-plugin xfce4-battery-plugin xfce4-datetime-plugin xfce4-mount-plugin xfce4-netload-plugin xfce4-notifyd xfce4-pulseaudio-plugin xfce4-screensaver xfce4-taskmanager xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin file-roller network-manager-applet leafpad galculator lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings capitaine-cursors arc-gtk-theme xdg-user-dirs-gtk
sudo pacman -S --needed virtualbox-guest-utils xf86-video-vmware

systemctl enable lightdm
systemctl enable NetworkManager

reboot

Voila GUI!

Result

[hannibal@127 ~]$ neofetch
                   -`                    [email protected]
                  .o+`                   ---------------------------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Host: VMware20,1 None
               `+oooooo:                 Kernel: 6.8.1-arch1-1
               -+oooooo+:                Uptime: 5 mins
             `/:-:++oooo+:               Packages: 455 (pacman)
            `/++++/+++++++:              Shell: bash 5.2.26
           `/++++++++++++++:             Resolution: 1280x800
          `/+++ooooooooooooo/`           Terminal: /dev/pts/1
         ./ooosssso++osssssso+`          CPU: 11th Gen Intel i3-1115G4 (2) @ 2.995GHz
        .oossssso-````/ossssss+`         GPU: 00:0f.0 VMware SVGA II Adapter
       -osssssso.      :ssssssso.        Memory: 461MiB / 927MiB
      :osssssss/        osssso+++.
     /ossssssss/        +ssssooo/-
   `/ossssso+/:-        -:/+osssso+-
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/
 .`                                 `/

Sources