Install Plan 9 in qemu
In the previous post we booted the installation disk in qemu. But the installation disk was read-only. In this post we install Plan 9 to a new virtual disk so that it is writable. We will be able to save work on it.
- Create a writeable qcow2 disk:
qemu-img create -f qcow2 disk.qcow2 1024m. The installation may take up about 500 megabytes. - Start qemu with the Plan 9 installation disk
qemu-system-x86_64 -hda disk.qcow2 -cdrom plan9.iso -smp 2 -m 1g. As the default memory is quite small, we increase the number of CPU cores to 2 and memory to 1 gigabytes. - In Plan 9, type
inst/startto start the installation. Refer to https://www.youtube.com/watch?v=PjVpB3SpAfQ for the process. - After installation, use Plan 9 with
qemu-system-x86_64 -hda disk.qcow2 -smp 2 -m 1g.
As to the -hda and -cdrom, they will expand to -drive options. Refer to the qemu system invocation manual for notes on the -drive option.
When installing Plan 9 remotely (inside some cloud), add ‘-vnc’ option. Refer to the previous post for detail.
$ qemu-system-x86_64 -hda disk.qcow2 -smp 2 -m 1g -vnc 0.0.0.0:0,password=on -monitor stdio
QEMU 8.0.5 monitor - type 'help' for more information
(qemu) set_password vnc <password>
(qemu) q