It's been a while since I worked full-time on Solaris, but some things never change, it seems. If you become
root, you'll still get a
/bin/sh. If you call up
vi, that's what you get, even though there's a
vim included. Yes, the defaults are set to hurt.
And some of them are a tad unexpected.
So, net didn't work out of the box. Or so it seemed, given that browsing didn't work (
Control-T,
new tab
in Firefox 2 rather reliably breaks the session for me, taking 100 % CPU on the host with the guest and VirtualBox both going unresponsive), and
ping also didn't seem to work. Apparently, this is not the best method to verify your net — that would be something like trying to
ssh to a numeric address —, and this is why: first,
ping is noted in the
VirtualBox
docs as only semi-supported with VirtualBox's default networking-setup ("NAT"). And then second, the Solaris' default
nsswitch.conf disables DNS requests. Oh, there's a plethora of fine example files, and one of them,
nsswitch.dns, does just what you need, namely directly host-queries the right way, but the default once more is set to hurt.
I still need to use
Control-N for
new window
instead of tabs, though …
Now,
VirtualBox
. In theory and if you use the
Open Source Edition
, there will be packages for required kernel-modules in your distribution. Since I somehow ended up with a kernel and no matching modules (and the VirtualBox's
compile the modules for the current kernel
refuses on the grounds that you should use the packages — probably just an extra
echo and an
exit somewhere in the script, but I didn't bother to look), and since the modules tend to compile with no hassle at all, I opted for Sun's RPMs. (Which is more than I can say for
vmplayer player with current kernels; I had to patch with
anyany
and then add selected lines from two other patches to get
VMWare
's modules to compile with a recent compiler, for a recent kernel. I've adored VMWare for years, but that whole
"the modules almost never build on recent kernels"
bit is beginning to irk me something fierce. Don't take my word for it, you have reason to expect for me to be biased, so google it.) So I got the
VirtualBox 1.6
packages, figuring that if Sun put in any extra work for Solaris guests after acquiring innotek, the safest bet would be the very recent versions. And sure enough things work splendidly for me so far, although according to the docs
shared folder
is supported for Windows and Linux guests only, so if you wish to exchange files between the host and a Solaris guest, you're stuck with using an NFS server (which you may or may not have running already) or possibly SMB (which you really really want if you also have
Windows
guests — compiling in emulated Windows on an emulated disk takes roundabout forever, while having the win-guest use the hosts file-system via Samba is surprisingly snappy).
If your NFS-mount fails and the syslogs shows messages of the form
mountd: NFS mount of /home attempted from 1.2.3.4
mountd: NFS request from your.machine.com originated on insecure port, psychoanalysis suggested
mountd: Blocked attempt of 1.2.3.4 to mount /home
Solaris tried mounting from a non-privileged port. One way to heal that is to allow that sort of thing in the Linux host's
/etc/exports by adding the
insecure option to that filesystem:
/my/fs 1.2.3.4/255.255.255.255(rw,insecure)
Also, if you have trouble with your locking (as evidenced by apps, well, locking up), you may wish to to make sure that you are using the kernel-space NFS server rather than the user-space one on the Linux host. (If you change over now and the
mount on the solaris guest fails afterwards, try passing
-overs=3 to downgrade to protocol version 3.)
On a semi-related note, if you wish to run
VirtualBox
on a server, an analog of this incantation may be for you:
VBoxHeadless -startvm "Solaris Developer" — then use
rdesktop-vrdp with the server's name or address to pick up the session, possibly also passing
-k fr or some such to the latter to get the keyboard right. (In theory, this should also support seamless mode when passing
-A to the client, but that won't work for me, while seamless works when not using RDP. Also, GNOME offers me 1024x768 as maximum resolution for the Solaris even with installed VBoxAdditions (if not on RDP I get it too, but it can easily be fixed by just resizing the window to anything I like). No answer on
#VirtualBox yet …)
Mind that the default build on Solaris 10+ x86 uses
gcc, not Sun's
forte
cc. To build with
forte
all the same, use
BUILD/compile-solaris-amd64-forte-debug (depending on your environment, you may have to put a
# in front of
EXTRA_64_BIT="-xarch=amd64"). Otherwise,
pkg-get -i gcc3 (or later, but
gcc3 is what our reference build uses).