Cymen Vig

Software Craftsman

Xen with Debian Dom0 and Open Solaris DomU (Guest)

Download “osol-0906-x86.iso” and mount it using loopback (mount -o loop -t iso9660 /root/osol-0906-x86.iso /tmp/MOUNT_POINT). Copy off two files required for the install. One site suggested /usr/lib/xen-solaris: ` mkdir /usr/lib/xen-solaris cp /tmp/MOUNT_POINT//mnt/tmp/platform/i86xpv/kernel/unix /usr/lib/xen-solaris/unix-0906 cp /mnt/MOUNT_POINT/boot/x86.microroot /usr/lib/xen-solaris/x86.microroot-0906 `

The Xen DomU configuration: ` name = ‘open-solaris’ memory = ‘512’ disk = [ ‘file:/root/osol-0906-x86.iso,6:cdrom,r’, ‘phy:/dev/thor/open-solaris,xvda,w’ ] vif = [ ‘’ ]`

kernel = ‘/usr/lib/xen-solaris/unix-0906’ ramdisk = ‘/usr/lib/xen-solaris/x86.microroot-0906’

on_shutdown = ‘destroy’ on_reboot = ‘destroy’ on_crash = ‘destroy’ extra = ‘/platform/i86xpv/kernel/unix - nowin -B install_media=cdrom’

Then kick off the VM: ` xm create -c open-solaris.cfg `

Now Open Solaris should boot up. These accounts are preconfigured: Username: jack Password: jack Root password: opensolaris

The installer is GUI-only. The installer appears to kick off a vnc instance (or Xen does, haven’t looked into who/what/where but xenstore has the VNC password but the guest has the vnc process?). To get the VNC password: ` xenstore-ls|grep password `

To get the IP of Open Solaris: ` ifconfig -a `

Now you can VNC to the IP address, use the VNC password and kick off the install.

Sites referenced:

http://www.tardis.ed.ac.uk/index.php/OpenSolaris_Xen_domU http://blogs.sun.com/levon/entry/opensolaris_2008_11_as_a http://blogs.sun.com/levon/entry/opensolaris_2008_11_guest_domain

Comments and Reactions

Shooting Yourself in the Foot with Perl

Returning Multiple Values

1
2
$error, $hash = function_a( ... );
if ( $error ) { error(); }    // never runs

Correction:

1
2
($error, $hash) = function_a( ... );
if ( $error ) { error(); }    // runs on error
Comments and Reactions

Abit Airpace and Windows Server 2008 64bit

To get the Abit Airpace wi-fi card to work with Windows Server 2008 64bit grab the generic Atheros drivers from with a file name similar to vista-7.6.0.126-whql.zip:

http://www.atheros.cz/

Then edit one of the two .inf files depending on:

32bit: netathr.inf 64bit: netathrx.inf

And add these two lines under [Atheros.NTX86] (or 64bit: [Atheros.NTamd64]):

Now reinstall the driver using the folder with the modified .inf file as the driver source. Note that these instructions will work for Windows Server 2008 32bit, Server 2008 64bit, Vista 32bit and Vista 64bit.

vista-760126-whql-airpace (locally-hosted modified version to support Abit Airpace)

Comments and Reactions

Power Usage: Q6600, P53G, 2 GB RAM, WD 640 GB SATA, Antec 430w...

Power usage:

  • Idle: 50 watts

  • Load: ?

System configuration:

  • CPU: Intel Q6600 (quad core, 2.4 Ghz, EIST enabled)

  • Motherboard: PC Chips P53G

  • Power Supply: Antec EarthWatts 430w

  • Hard Drive: Western Digital 640 GB SATA

  • RAM: 2 GB

  • OS: Debian Etch amd64 (2.6.25 for workable SATA driver)

Comments and Reactions

Linux - Securely redirecting console to virtual terminal for logging

I want to be able to log a ssh session to a unused virtual terminal (/dev/ttyX) so that I can leave something running yet not allow any intrusion into the ssh session by unauthorized users at the keyboard. This is what I ended up doing:

  1. Give user write access to /dev/tty devices.

  2. Install screen and script.

  3. Run screen with simple “screen”.

  4. Run script with output to virtual terminal and flushing option: “script -f /dev/ttyX”.

  5. Do regular ssh session and begin whatever it is you want to monitor.

  6. Disconnect from screen’ed session (CTRL-a d).

  7. Switch to virtual terminal script is dumping to.

This works out quite well in practice – I’m not noticing any issues and it is fairly simple to accomplish. On my debian etch install, I had to add my user to the root group (or I could have given all users write access to /dev/tty devices).

Comments and Reactions