PengyOS / Docs / Install in a VM
Install PengyOS in a virtual machine
A VM is the quickest way to try PengyOS without touching a real disk. You give the VM the same two things a real computer gets: the installer, here an ISO attached as a CD, and a blank disk to install to.
What the VM needs
| Server | Desktop | |
|---|---|---|
| Firmware | UEFI (OVMF). PengyOS doesn't boot with legacy BIOS. | |
| Memory | 2 GB | 4 GB or more |
| Disk | A blank disk of at least 20 GB. The installer refuses anything under 18.25 GiB: two 8 GiB system slots, a boot partition, and your data. | |
| Graphics | anything (it's a console) | virtio-gpu. With 3D (virgl) it is faster; without it the Desktop draws in software. |
| Acceleration | KVM on a Linux host. Without it everything works, slowly. | |
Get the ISO
Download the edition's .iso from the download page. It is
the same file you would write to a USB stick, and it needs no unpacking. Its file name carries
the release number; <version> below stands for it.
truncate -s 40G pengyos-disk.raw # the blank disk to install to
cp /usr/share/OVMF/OVMF_VARS_4M.fd vars.fd # the VM's own UEFI settings
On Debian and Ubuntu the UEFI firmware is the ovmf package; Fedora calls it
edk2-ovmf (with the files under /usr/share/edk2/ovmf/).
Server in QEMU
The ISO goes in as a CD that boots first; the blank disk is second:
qemu-system-x86_64 -machine q35 -accel kvm -cpu host -m 2048 -smp 2 \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE_4M.fd \
-drive if=pflash,format=raw,file=vars.fd \
-drive if=none,id=cd,file=pengyos-server-<version>-x86_64.iso,media=cdrom,readonly=on \
-device ide-cd,drive=cd,bootindex=1 \
-drive if=none,id=disk,file=pengyos-disk.raw,format=raw \
-device virtio-blk-pci,drive=disk,bootindex=2 \
-nic user,hostfwd=tcp:127.0.0.1:2222-:22
The CD starts the console installer in the VM's window. It asks for the disk, a computer name, your user name and password, and
optionally an SSH public key (the Server's SSH accepts keys only), then wants you to type
erase before it touches the disk. The install takes under a minute. When it's done, power the VM off and start it again
without the CD: drop the two cd lines and give the disk
bootindex=1. The machine boots to a login prompt with your hostname.
The hostfwd forwards port 2222 on your machine to the VM's SSH:
ssh -p 2222 youruser@127.0.0.1, if you gave the installer a key.
Desktop in QEMU
The same layout, with more memory and a 3D-capable display (without one, use -vga virtio):
qemu-system-x86_64 -machine q35 -accel kvm -cpu host -m 4096 -smp 4 \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE_4M.fd \
-drive if=pflash,format=raw,file=vars.fd \
-device qemu-xhci,id=xhci -device usb-tablet \
-drive if=none,id=cd,file=pengyos-desktop-<version>-x86_64.iso,media=cdrom,readonly=on \
-device ide-cd,drive=cd,bootindex=1 \
-drive if=none,id=disk,file=pengyos-disk.raw,format=raw \
-device virtio-blk-pci,drive=disk,bootindex=2 \
-device virtio-vga-gl -display sdl,gl=on \
-nic user
The CD starts a live desktop with the installer open. Try PengyOS lets you look around first, and the installer stays in the dock. After installing, restart without the CD as above. The Desktop starts at its login screen unless you chose automatic login.
- If
gl=onfails to start (no 3D on the host), use-vga virtioand a plain display instead: the Desktop then draws in software, slower but complete.-display gtk,gl=onis an alternative to SDL. usb-tabletmakes the mouse follow your pointer instead of being captured.- Flatpak apps and updates need the network; the default
-nic useris enough.
Core
Core has no installer and no ISO: its image is the disk. Attach it as the VM's only disk (as a
virtio disk, without snapshot=on if you want to keep changes) and boot. It logs in
as root on the console. Grow the file first (truncate -s 8G) if you need room; the
partitions don't grow by themselves.
virt-manager and other tools
The pages above were tested with QEMU/KVM directly. A graphical tool needs the same pieces:
- firmware set to UEFI before the first start (in virt-manager: Customize configuration before install → Overview → Firmware);
- the downloaded
.isoattached as a CD-ROM, first in the boot order, and a new blank disk of 20 GB or more; - for the Desktop: Virtio video (3D acceleration makes it faster, but is not needed; the plain VGA/std display garbles it for now);
- after installing, remove the CD.
Proxmox VE, VirtualBox, VMware and Hyper-V: see the download page. VMware and Hyper-V work from 26.11.10, which added their disk drivers; they are not yet tried on a real host.