On Mar 25, 2020, at 3:32 AM, Mark Everett <evere...@gmail.com> wrote:
> 
> Does anyone know of a virtual machine running on current Mac OS that hosts 
> plan9?  Preferably one that isn’t too difficult to set up….

Hi Mark,

I run both 9front and 9legacy on macOS with Qemu. The installation of qemu 
4.2.0 was a breeze via Homebrew:

Mac % brew install qemu

The Plan 9 file server VM boots off a virtual disk image that has 9fat, nvram, 
and fossil. I launch it with the following command:

Mac % cd $HOME/plan9/fs &&
qemu-system-x86_64 -m 512 -name 'file server' \
-nographic \
-no-reboot \
-drive 'if=none,id=hd,file=fossil.raw,format=raw' \
-device 'virtio-scsi-pci,id=scsi' -device 'scsi-hd,drive=hd' \
-device virtio-net-pci,netdev=n0,mac=52:54:00:09:09:02 \
-netdev user,id=n0,hostfwd=tcp::564-:564

The Plan 9 terminal boots directly off a 9front kernel supplied on the command 
line. I launch the VM with this command:

Mac % cd $HOME/plan9/terminal &&
qemu-system-x86_64 -m 1024 -kernel 9pc64 -initrd plan9.ini \
-name terminal \
-no-reboot \
-device virtio-net-pci,netdev=n0,mac=52:54:00:09:09:09 \
-netdev user,id=n0,hostfwd=tcp::8080-:80 2>&1 | grep -v 'multiboot knows VBE'

I was testing a simple web server written in Go on the terminal and that’s why 
I am forwarding tcp port 8080 into it. 

It took quite a lot of iterations to get these commands right. Hope this helps.

Kim


------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Ta7f245368d4d10b8-M8bab0704a25927fd5adeee93
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to