If you’re like me and prefer the command line to the GUI, here’s a trick and script to help you manage your Solaris VMs.
Enable a serial port for the VM.
Enable Port 1
Port Number COM1
Port Mode: Host Pipe
Port/File Path: /tmp/vb-VM-NAME-console
Perform a reconfiguration boot on the VM.
Install socat on the host system
sudo apt-get install socat
Change the eeprom console device for the VM:
Change the /boot/grub/menu.lst for the VM:
# To enable grub serial console to ttya uncomment the following lines
# and comment out the splashimage line below
# WARNING: don't enable grub serial console when BIOS console serial
# redirection is active!!!
serial --unit=0 --speed=9600
# Uncomment the following line to enable GRUB splashimage on console
# To chainload another OS
Bring down the VM:
Once this is done, we can now tell VirtualBox to boot the VM headless and connect with socat
VBoxManage startvm node1 --type headless && socat -,raw,echo=0 /tmp/vb-node1-console
I wrote a perl script to handle booting and connecting the console. Feel free to download: vb.pl
$ vb.pl -h
vb.pl -n VM -b
vb.pl -n VM -p
-l : list VirtualBox machines
-n : name of the VirtualBox machine
-b : power on and boot machine
-p : power off machine
-h : this message.
If your virtualized cluster panics with the following:
Sep 8 09:18:10 node1 genunix: [ID 898738 kern.notice] Aborting node because pm_tick delay of 5492 ms exceeds 5050 ms
This is common when using Solaris Cluster in a virtual machine. The following may help the issue:
root@node1 # scconf -cw heartbeat_timeout=60000
root@node1 # scconf -cw heartbeat_quantum=10000
If the first node fails a reboot after scinstall completes with the following errors, read on for the fix:
Jan 27 11:52:50 node1 genunix: WARNING: CCR: Invalid CCR table : rgm_rt_SUNW.LogicalHostname:4 cluster global.
Jan 27 11:52:50 node1 genunix: WARNING: CCR: Invalid CCR table : rgm_rt_SUNW.SharedAddress:2 cluster global.
Jan 27 11:53:55 node1 Cluster.RGM.global.rgmd: [ID 349049 daemon.alert] CCR reported invalid table rgm_rt_SUNW.LogicalHostname:4; halting node
Jan 27 11:53:55 node1 Cluster.RGM.global.rgmd: [ID 349049 daemon.alert] CCR reported invalid table rgm_rt_SUNW.SharedAddress:2; halting node
The fix is to boot the node outside of cluster and repair the directory table:
You want to remove these two lines:
Save the file and bless it:
ccradm recover -o directory
Reboot back into cluster and proceed. After both nodes have rebooted and are in cluster mode, register these two resource types:
clresourcetype register SUNW.LogicalHostname
clresourcetype register SUNW.SharedAddress
I recently decided to try out the OpenZFS implementation of ZFS on my mac desktop and so far, I’m impressed. In this post, I’ll cover some of the issues encountered along the way. Let me start by describing my configuration. My desktop is a hack(intosh) with Mavericks installed on two internal 1TB drives. The primary boot drive is partitioned into one big slice and I use CarbonCopy to clone this disk to the second disk. My goal is to migrate my home directories, /Users, to a ZFS mirror and keep OSX on it’s own partition. This is pretty simple with two disks but I thought I would cover the steps here and hopefully help others down the ZFS path. Continue reading
Open Disk Utility and make sure any volumes on the USB stick (not the disk) are unmounted.
Use dd select the target disk:
dd if=/path/to/your/downloaded.img of=/dev/disk5 bs=1024
My desktop system is a Mac and I use VMware Fusion to test operating systems and cluster configurations. Oracle sometimes delivers the Oracle Solaris Cluster software in a tarball so here’s how to burn it to an ISO image which can then be mounted inside the virtual machine:
hdiutil makehybrid -iso -udf -joliet -o solaris-cluster-3_3u1-ga-x86.iso solaris-cluster-3_3u1-ga-x86