Thursday, July 30, 2009

Fedora on MS Virtual PC 2007

Finally got a good load of Fedora running in MS Virtual PC 2007, on my Vista laptop. ended up with Fedora 9, simply because it was the most recent 32 bit version on had on my server. I load 32 rather than 64 bit, because HP was so rude as put 32 bit Vista on a 64 bit laptop. Theoretically, the AMD Turion64 X2 should be able to run a 64 bit guest in a 32 bit host OS, but we'll try that later.

A good reference for loading Fedora in VPC2007 can be found on Sean Earp's Blog. He suggested using a Grub option of noreplace-paravirt, which I didn't need. The options that I needed for Fedora 9 were:
clocksource=pit noapic vga=0x700
The vga= directive was a fun one. A value of 0x700 doesn't actually work. Instead, it kicks you to a text based menu that lets you select the mode at boot time. This will let me experiment, until I find the one I like. So far, I'm favoring 0x303.

Next step is to move the image to a USB key.

Wednesday, July 29, 2009

rPath Cloud Computing Video

I've been spending allot of time lately telling people at work not to talk about cloud computing while all the time focusing on it myself. (Don't tell them.) I found this video by rPath. Very informative and well done., Pt 3

The Windows guy is going to be jealous. Yesterday, I saved an image on the "small" server I set up at, then canceled the server. Today, I allocated an different model server, and applied the image. It worked. He suspected it would fail due to drivers. Ha!

An important detail I had misunderstood about their billing: You are billed while the server is allocated, not powered on. To check this, last evening, I issued a poweroff command just before starting the hour long walk, subway, bus, and car ride home. When I got home, I checked the invoice, and, just as expected, it had incremented another $.11. Once I did a Canceled Server, the billing stopped.

And that makes sense: If you have data on the drive, but power off the server, you are still costing them money. Once you de-allocate, they can hand it off to someone else.

As a side note, I found a couple other services to disable: lvm-monitor (they build everything in root) and hidd.

Tuesday, July 28, 2009, Pt 2

In response to a comment, I wanted to take a moment to wax philosophic on the concept of the Infrastructure as a Service (IaaS) business model.

I have a silly little website,, that is hosted on a virtual machine... Xen, of course. The VM does a few other small functions, but represents Platform as a Service (PaaS). To me, the physical machine is irrelevant, as long as I get a Linux platform.

From a business standpoint, the provider ( is paying for the hardware, rack space, power, and telecom. These are fixed costs for a system with fixed resources. As long as his pricing is such that at 30% resource utilization, he is covering his fixed costs, then any VMs over 30% are profit. The main thing to remember is that after a stable customer base of >30% is achieved, when an "extra" VM disappears, it costs nothing. Effectively, the top 50% of the server is free.

(Yes, I'm 10% short, but when that box is at 90%, its time to worry... You don't want to degrade the "good" customer's VMs.)

Now lets consider the model. In this case imagine ten machines all with the same fixed cost. When a physical server is allocated to a customer, you are offsetting the fixed cost of the server. When it is not allocated, you are "loosing money". Yet, we can never allow the server farm to reach even 80% capacity, since the core of our business model is spare capacity. No capacity, no elasticity, as Amazon might say. This means that we always need two machines empty, and as such "loosing money".

To further complicate things, with VMs, we can always cross that 90% mark. We can let some customers be degraded to get us over a surge. With physicals, however, there is no way to sell eleven boxes, if all we have is ten.

In the end, the whole thing boils down to good capacity planning and accounting. My hope is that as the pricing models mature, we'll see more of the IaaS clouds. As for, they've already saved me the cost of an HP DL380 G5 that I need for the next 60 days.

BTW: Thanks for the comment!

My $0.11 Computer:

Just for fun (and professional development) I leased a server from a company called that market themselves as a "bare metal cloud". Within 15 minutes, I had an account on a physical Dell 1955 machine running Linux. The funky part, is that they claim they only charge $0.11 per hour while the box is powered on. Oddly, this does not seem to be a VM. Here's what we got:
[root@server1868 ~]# cat /etc/redhat-release
CentOS release 5.3 (Final)
[root@server1868 ~]# head -1 /proc/meminfo
MemTotal: 1026612 kB
[root@server1868 ~]# grep "model name" /proc/cpuinfo
model name : Intel(R) Xeon(TM) CPU 2.80GHz
[root@server ~]# fdisk -l

Disk /dev/sda: 36.4 GB, 36420075008 bytes
255 heads, 63 sectors/track, 4427 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ 83 Linux
/dev/sda2 3825 4085 2096482+ 82 Linux swap / Solaris
[root@server ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 1.7G 26G 7% /
tmpfs 502M 0 502M 0% /dev/shm

It's a little bloated. Let's lighten the load:
[root@server rc3.d]# for J in kudzu portmap nfslock mdmonitor rpcidmapd rpcgssd bluetooth netfs pcscd autofs yum-cron cups gpm anacron atd yum-updatesd ; do chkconfig $J off; done

And start to secure this puppy:
[root@server ~]# sed -i "s/=disabled/=permissive/" /etc/sysconfig/selinux
[root@server ~]# touch /.autorelabel
[root@server ~]# vi /etc/hosts.deny     # ALL : ALL
[root@server ~]# vi /etc/hosts.allow     # sshd : safe.location
[root@server ~]# vi /etc/ssh/sshd_config     # PermitRootLogin no
[root@server ~]# useradd blah blah blah -G wheel     # unpriv user in wheel group
[root@server ~]# passwd yada yada yada     # strong password
[root@server ~]# visudo     # enable wheel

Cool. Now lets see where this takes us.

Friday, July 24, 2009

Converting a Xen Paravirt VM to Fullvirt

We had a VM that would occasionally try to load the wrong kernel at boot time. The machine has to load the para-virt ELxen kernel to successfully start, but it might try to load a PAE instead. As a result the VM would fail to boot.

It might seem that the solution would be to fix why it was loading the wrong kernel, but, for reasons we will not discuss at the moment, we needed to accept that it would load the wrong kernel occasionally. So, our mission became to move the VM from para-virt to full-virt. As it turns out, it was just a case of modifying the VM config file.

Comparing the two configs, we see some differences:
diff vm-para vm-full
< bootloader='/usr/bin/pygrub'
< vfb=['type=vnc,vncunused=1,keymap=en-us']
> builder = "hvm"
> kernel = "/usr/lib/xen/boot/hvmloader"
> boot = "c"
> pae = 1
> acpi = 1
> apic = 1
> localtime = 0
> device_model = "/usr/lib64/xen/bin/qemu-dm"
> sdl = 0
> vnc = 1
> vncunused = 1
> keymap = "en-us"
This tells us that the para-virt VM uses a different Grub and that it needs a set of variables to describe its connections to the outside world. The full-virt VM, has a much wider set of variables, and uses a different boot mechanism.

So, how do we convert?
1. With VM running, install a standard kernel, using rpm -ivh
    or yum install kernel.
2. Power off VM.
3. Edit config file, removing the two line specified by "<" above.
4. Add the lines specified by ">" above. Make sure to remove the leading greater-than (>) symbols!
5. Start VM.

Sunday, July 19, 2009

RDP on Vista Premium

I used Fransblog's termserv patch to enable RDP on my Vista Home Premium VM. Worked perfectly the first time. Thanks Frans!

Saturday, July 18, 2009

Fedora On Virtual PC 2007

While trying to install Fedora on Virtual PC 2007 running on my Vista Home Premium laptop, I was plagued by boot hangs. Usually, the CD would fail to boot on:
running /sbin/loader
It seems the way around this was to add a directive to the installer:
I'm going to blame this on my AMD Turion64 CPU, as few others had come across the same problem.

The problem that had gotten everyone else was the graphics levels between Linux and VPC are not compatible. The solution to that was to add:
This forced Linux into a 16 bit color mode. Once the install was complete, both options needed to be added to GRUB.

The next problem was the network. I had to attach the VM's network to the physical interface on the laptop. I had expected to be able to use a NAT interface, but I suspect this was my own fault for using my network install server rather than an DVD image.

Alas, my first successful install was Fedora Core 4, but when it booted up, I could not login. The clocksource was running so fast, PAM timed out the username and password within a matter of seconds. In all fairness, FC4 is eons old. I found a 32 bit DVD ISO for FC6 and F9 on my install server, so I'll give them a shot and see if they run any better.

Windows Virtual PC 2007

After building a Vista VM today, I needed a downloadable copy of SP1. That's when I stumbled upon Windows Virtual PC 2007. I knew of its existence, but must admit, I didn't realize it was free. Another thing about it astonished me:
Virtual PC 2007 runs on: Windows Vista™ Business; Windows Vista™ Enterprise; Windows Vista™ Ultimate...
Oh there were others, but no Vista Home or Home Premium. I guess I need to fork out a couple hundred dollars to upgrade.

Or, I could fire it up and see what happens. I grabbed the installer, launched it on my Home Premium laptop, and sure enough, it complained that it was not supported. It seems however, that "unsupported" does not mean "not allowed" I chose to continue, and the install finished.

I launched the program, and it immediately complained again. Yet... There is a checkbox: "Don't show this message again" Next thing you know, I'm in an installation wizard.

Now we get to find out what this thing will do. I launched the wizard to install a Fedora instance. When presented with the Operating System choices, I found the following list:
Windows 98
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows NT Server
Windows 2000 Server
Windows Server 2004
What! OS/2? You're kidding, right? I think I threw those disks away about 10 years ago. And what about Linux, damn you.

In the short wizard, I allocated 312 meg of RAM and 8 gig of disk. The VM appeared in the Virtual PC Console window, and I selected Start. Once the VM launched, I was able to click the CD menu item and select "Use Physical Drive", but it was already too late in the POST. I clicked the Action menu item, and selected "Reset". This time it launched the installer from CD.

Now, we get to see if it will install.

Vista /etc/hosts File

As we all know, each iteration of Windows gets more like Linux, and Vista is the most Linux-like so far... Except for the fact that it sucks, but then Microsoft does have to differentiate their product somehow.

Take for instance the /etc/hosts file. In Vista, it is at:
Local Disk (C:)
    System32 (Syswow64)
Unfortunately, you can't edit the file. You're not allowed... its not your OS, so you can't edit it. Its Microsoft's OS.

But we got a hack for that.

Click Start (even though it doesn't say "Start" any more.) In the Start Search box, type "command". Right click the displayed icon and select Run as administrator. This will give you a command prompt. Yeah-- just like Linux. Execute:
cd c:\windows\system32\drivers\etc
notepad hosts
Add the needed entries, save, close, then exit to discard the command prompt.

Monday, July 13, 2009

More Yahoo Silliness

I've seen this picture on Yahoo mail a few times promoting a video on the history of their mail service. If you a actually look at the picture, you may notice something funny... The machine in the picture is an IBM 3178C terminal designed to be connected, via coax, to an IBM mainframe. This device was capable of 80x25 green text. I could not be made to display color, nor could it be connected to a phone line.

The good news is that it could be connected to the internet using a text based browser, called Charlotte (as is Charlotte's Web). This was way before Yahoo... The only way we had to search the internet was with Gopher.

Friday, July 03, 2009

Yahoo Has Hacked Browser History

This is scary, but it is not the first time this has happened in the last few weeks. I'll search for an airfare, then have Yahoo Mail present me with a banner add advertising the exact destinations for which I searched.

As an experiment, I opened Yahoo Mail in a tab, and opened the inbox. Next, I opened another tab, and visited Expedia. There, I searched for an airfare. I returned to the Yahoo Mail tab, and clicked "Check Mail". I was presented with a Netflix ad.

Lets try again. This time Travelocity: search for airfare in a different tab, return to the Yahoo Mail tab, click "Check Mail", and here's what I got...

Theoretically, this should not be possible for security reason. One site should not be able to read another's cookies, and no one should be able to access a history. I tried the same process in IE7, same results. Even works on Linux. The only factor seems to be the site searched: Expedia does not work, Travelocity does. I've seen others (obviously Orbitz), but more travel sites than any. I guess that's what I use the web for most, except technical stuff... certainly not porn.

BTW, the trip to Reykjavik was too expensive. So much for given the bankrupt country money. Maybe I'll go to California.

Thursday, July 02, 2009

FC-6 VM On F11 Platform

I recently upgraded one of my virtualization platforms from F10 to F11. It is significantly more stable and refined. An odd thing happened, however. The target system is an AMD-64x2 with 5G. Its was hosting:
FC6 application server
F8 VNC server
WXP Pro with RDC (need it for my current contract)
F10 on 4 node cluster for clustering R&D
F8 on 2 node cluster for web development
F8 application server
Under F10, the box gave great VM performance while at an idle.

Under F11, the FC6 VM pegged the virt-manager's performance graph at 45% of the physical CPU cycles. Yet, within the VM, top saw nothing. Effectively an entire core spinning away on nothing! I re-imaged (via kickstart) the VM as FC8, and now that same machine sits at half a percentage point. I'm not sure I have an explanation other than a different kernel or virt drivers.

Big Prop

This was an odd thing to see on the ride home. Looks like a C-130 cargo plane propeller. It was being towed by a pickup truck.