At the office I'm deploying some new servers using Xen domains running under RHEL 5.0. We use RHEL 4.4 for our systems, and so re-deploying some of them as RHEL 4.5 (the Xen-kernel enabled version) Domains saves hardware space, money and keeps the server room cooler. Many dev servers are not utilized like production systems and so will benefit from the Xen virtualization.
Setting up the domains is pretty straight forward, RedHat has a nice guide using their virt-manager GUI tool. There are also excellent guides at the Centos wiki.
Two things were not obvious to me, and I'm posting my findings here to help others.
Issue 1 Multiple networks
After building the domain, the first thing that stopped me was that I needed multiple networks. The virtual hosts need to be on three networks, and so I needed three virtual devices. The RedHat guide has a nice section on how to create the necessary br0 (network bridge devices) devices, so modifying the scripts to go from one br0 to three (br0, br2, br3) each corresponding to a real NIC on the host was straightforward. However, how to get the virtual devices to recognize and use these new bridges? There is only one config file for your domain, and it looks like this:
# Automatically generated xen config file name = "myVirtualPony" memory = "1024" disk = [ 'phy:/dev/virt_vg/some_virtdisk,xvda,w', ] vif = [ 'mac=00:16:3e:3d:11:f7, bridge=xenbr0', ] vfb = ["type=vnc,vncunused=1"] uuid = "fff0f6c0-60e2-xxxx-xxxx-xxxxxxxxxx" bootloader="/usr/bin/pygrub" vcpus=1 on_reboot = 'restart' on_crash = 'restart'
It should be obvious to any Python programmer, but it wasn't to me initially. Eventually I realized you had to add some new attributes to the vif list. The Redhat guide has a nice python snippet to generate new MAC addresses for you. I used that to generate two more MACs, then added them in:
# Automatically generated xen config file name = "myVirtualPony" memory = "1024" disk = [ 'phy:/dev/virt_vg/some_virtdisk,xvda,w', ] vif = [ 'mac=00:16:3e:3d:11:f7, bridge=xenbr0', 'mac=00:16:3e:19:11:ed, bridge=xenbr2', 'mac=00:16:3e:49:11:40, bridge=xenbr3', ] vfb = ["type=vnc,vncunused=1"] uuid = "fff0f6c0-60e2-xxxx-xxxx-xxxxxxxxxx" bootloader="/usr/bin/pygrub" vcpus=1 on_reboot = 'restart' on_crash = 'restart'
Now just reboot the domain with a quick
$ xm reboot myVirtualPony
and loginto the domain. Copy the /etc/sysconfig/network-scripts/ifcfg-eth0 to ifcfg-eth1, ifcfg-eth2 and edit them, using the new MAC addresses you created and the proper TCP/IP info.
There is an excellent Page on Xen Networking at Xensource Wiki. I wish I had found this when I was banging my head on this problem.
Issue 2 - Virtual Console
After my domains were setup most Xen docs talk about using the virtual console to login to your domain from the host, similar to what you can do with Solaris Zones.
On the master host you should be able to login to the virtual console of the local domains. However, when you build your domains with RedHat's virt-manger they don't setup the virtual console correctly. They attach serial output to the virtual-framebuffer. So if you try and use the virtual tty, you only get the output of the kernel booting, then it stops and your terminal is stuck.
To fix this, you can follow the directions Xen Centos Tips and Tricks page:
You just need to add
co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav
to the file /etc/securetty. Then do a @ telinit q to re-load the /etc/inittab and you should be able to use the virtual console from a tty.
Now with that out of the way I can do this to login into my domain:
xm console myVirtualPony
Xen is fun.
Nokia must be responding internally to the iPhone mania. The question is, will it be a more advanced smartphone, or a phone enabled internet tablet? Scoble asked around and only got some smiles. Can Nokia really continue to push the Internet Tablet line, sans phone, now that the iPhone has set the bar so high? Nokia has some cool devices, good technology, mature development infrastructure and a lot of community based support and coding efforts. But relying only on wi-fi will not enable a truly mobile communications device. They have something ready to replace the N800. Will they strap a phone onto it? Will they dump Opera for Mozilla or build-out their Webkit browser? That would certainly be in the arena for an iPhone competitor.
For all the committed Nokia users out there, hating the iPhone buzz-- if you haven't seen this page yet, give it a look. Why? 'cause someone thinks that The iPhone is a piece of shit, and so is your face. Perhaps Nokia's answer to the iPhone is already here, it's just losing marketing game.
N800 has dual SD cards for more Flash, iPhone has no way to extend the 8Gb. N800 has a bigger screen, higher DPI but doesn't have the light-touch touch-screen like the iPhone. I'd still consider getting a N800 to replace my 770 if the price drops. I'd like to use ITOS2007 and have Flash 9 available for browsing-- especially now since Mozilla has just been released for ITOS2007. We'll probally never see Flash in the iPhone, but who knows. I just don't think Apple will do it.
Here are some more detailed instructions on getting Open Einstein built on MacOSX Intel, using the JAM complier and targeting the Nokia 770. I also built it for MacOSX, to run locally on my macbook.
The published directions are here, and you should read them first and familiarize yourself with them.
Open a terminal and then use macports to install the following packages:
$ sudo port install gettext $ sudo port installlibffi $ sudo port install jam $ sudo port install arm-none-linux-gnueabi-gcc
Then you must add
to your $PATH on the Mac (edit .bash_login in your home directory), then restart your terminal or read in the new bash_profile.
Pull down Klibs and Build
K is located at SourceForge (http://sourceforge.net/projects/KLibs/)
$ cvs -d:pserver:email@example.com:/cvsroot/klibs login [Enter] for password $ cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/klibs co -P K $ cd $PATH_TO_KLibs/_Build_/Jam $ jam -starget=nokia2006
Klibs should build with out problems. If you want to build for the Mac, just leave off the -starget parameter.
Pull down Open Einstein and Build
$ svn checkout http://einstein.googlecode.com/svn/trunk/ einstein $ cd einstein/Einstein/_Build_/Jam $ jam -sK=$PATH_TO_KLibs -starget=nokia2006 -sjittarget=GENERIC
Now there is a new folder in the /_Build_/Jam directory called build.ARM-LINUX-Nokia2006. This folder will contain the einstein binary for the Nokia 770.
Move files over to 770
You need three files:
[You should set up sshd on 770, change password of 'user' to something you know, change the ip address below to match your 770 local ip. Use ifconfig -a to check the local 770 ip.]
Now copy the files:
$ scp $PATH_TO_EINSTEIN/_Build_/Jam/build.ARM-LINUX-Nokia2006/einstein email@example.com: $ scp $PATH_TO_EINSTEIN/_Data_/Einstein.rex firstname.lastname@example.org: $ scp $NEWTON_ROM email@example.com:
Once they are copied over, you can start Open Einstein like this:
/home/user # ./einstein -l log2 -m 737041 . Welcome to Einstein console. This is Einstein Platform 2007. Creating image... Max units count = 986 Max units count = 1026 Booting... Type help for help on available commands. einstein> power
And you should see the Newton Start up on your device. Below is a screen shot of the Newton running on my MacBook, in Xwindows: