VirtualBox Instructions Revised

Whereas 'old/vbox' is an archive of my original e-mail on running 9front in Virtualbox with drawterm access, I believe the instructions can be reduced:

Virtualbox Config

To the desired VM:

  1. Add a NAT network card
  2. Add a host-only network card

In this case, if the NAT is the first card and the host-only the second card, the NAT card will be under #l0 and the host-only card will be under #l1. If you reverse the order, the device ID swaps as well.

Notes

Terminal with Drawterm

A temporary setup that should work on a new install:

bind -b '#l1' /net
ip/ipconfig ether /net/ether1
dlisten

You should be able to log in as glenda

Permanent

For a more permanent setup:

  1. Add the bind -b '#l1' /net somewhere, such as $home/lib/profile
  2. ip/ipconfig ether /net/ether1
  3. cat /net/ipselftab

Typically the 192.168.56.X IP is the one for your 9front VM, you can verify this as per the above Host-Only adapter menu.

Run dlisten or similar for drawterm access.

CPU Server with Drawterm

Add network configuration somewhere, I typically use /cfg/$sysname/cpustart:

mkdir /cfg/$sysname
touch /cfg/$sysname/cpustart

Add the following to /cfg/$sysname/cpustart:

#!/bin/rc
bind -b '#l1' /net
ip/ipconfig ether /net/ether1

If properly configured and connected to the network, drawterm access should work for sufficiently configured users.

Debugging

Notes

Some extra steps for running a headless cpu/auth server (See: FQA 7.3.1):

Ensure service=cpu in your plan9.ini

Run the following to setup glenda for remote access (or any $user):

auth/keyfs
auth/changeuser glenda
auth/enable glenda

Mounting the Host Filesystem from the Guest

The recommended method if you have SSH running is to use sshfs(4).

If you aren't running ssh on the host, you can share an authless u9fs serve as per sharenix. Such a serve is convenient since you can do 9fs $HOSTIP.

To verify your host IP address on the host-only adapter network, check the DHCP settings in the Host Network Manager dialogue.

To verify your guest IP address, cat /net/ipselftab and compare the IP's listed to the host-only adapter network range.

Adding Custom Screen Resolutions

You can add custom resolutions that should just work™ on 9front from the host.

Example:

$ VBoxManage setextradata "9front PORTSDEV" "CustomVideoMode1" "1280x960x16"

Where 9front PORTSDEV should be your VM's full name and CustomVideoMode1 is the format CustomVideoModeN where N is a positive integer [1-16].

Then, from inside 9front:

% 9fs 9fat
% ed /n/9fat/plan9.ini
a
vgasize=1280x960x16
.
w
q
% fshalt -r

You should see your new resolution being used after reboot.