Category Archives: Ubuntu

ACPI Shutdown on Virtual Ubuntu

5.00 avg. rating (94% score) - 2 votes

If your virtual machine does not shut down when asked by the hypervisor, install the package acpi-support.

Works at least with KVM, but I see no reason why it would not work as well in other virtualization platforms, if they just send the ACPI shutdown signal to VM.

Thanks:

Cloning Ubuntu 10.04 Server KVM guests efficiently

0.00 avg. rating (0% score) - 0 votes

If you need to create lots of similar virtual machine guests running on QEMU/KVM, it is a very good idea to prepare a template guest image from which to clone the other guests. You should do whatever customizations you like before cloning. For instance I like to configure LVM and file systems to my liking, install openssh-server, install nfs-common and configure NFS mounts, install all available updates, add users or set up authentication, copy ssh keys, and do many other things so that they will be working out-of-the-box after cloning a number of guests from the template.

After you have installed and set-up your template virtual server to your liking, and would want to start cloning multiple instances of it, some tricks are needed to make things work more automatically after cloning and starting up the final copy.

If you simply clone a vanilla Ubuntu server installation multiple times, you will face some problems:
Continue reading Cloning Ubuntu 10.04 Server KVM guests efficiently

Serial console for Ubuntu server 10.04 KVM guests

0.00 avg. rating (0% score) - 0 votes

The virt-manager VNC screen is fine for LAN connections, and good for running graphical sessions. X is not installed on Ubuntu server by default, and VNC is really bad over slow links even for text console. I like to configure serial console for all my virtualized guests, because with it, I can simply ssh into the virtual machine host, and run “virsh console <guest-name>” to get a working console. Very nice for fixing broken network connections or file systems, or any kind of boot problems. And I can do it using just my cell phone, ssh over 3G connection from anywhere!

Continue reading Serial console for Ubuntu server 10.04 KVM guests

Redundant iSCSI storage for Linux

5.00 avg. rating (91% score) - 1 vote

Here’s how to set up relatively cheap redundant iSCSI storage on Linux. The redundancy is achieved using LVM mirroring, and the storage servers consist of commodity hardware, running the OpenFiler Linux distribution, which expose their disks to the clients using iSCSI over Ethernet. The servers are completely separate entities, and the purpose of this mirroring is to keep the logical volumes available, even while one of the storage servers is down for maintenance or due to hardware failure.

Ultimately the disks of the iSCSI target servers will show up as normal SCSI disks on the client (/dev/sdb, /dev/sdc, …). The data will be moved across the network transparently. It is preferable to use multiple gigabit network interface cards on both the initiator and the target, and bond them together for reliability and speed gain (or use Device Mapper Multipath). A separate VLAN for iSCSI traffic is recommended for security and speed. By default, the traffic is not encrypted so your disk blocks can easily be sniffed using tcpdump.

Continue reading Redundant iSCSI storage for Linux

Ubuntu 8.10 on Thinkpad X300

0.00 avg. rating (0% score) - 0 votes

I upgraded my Lenovo Thinkpad X300 to Ubuntu 8.10 Intrepid Ibex today. My original installation notes for Hardy are here.

After the upgrade, sound was working without compiling an ALSA snapshot by hand. Also, 3G connections worked straight out of the NetworkManager applet, which is very nice. But WiFi was broken, as the nm-applet refused to connect to any SSID, encrypted or open. That seemed to be due to myself using the development networkmanager packages with Hardy. They were not upgraded correctly. The remedy was to remove all network-manager packages and reinstall them. Continue reading Ubuntu 8.10 on Thinkpad X300

Lenovo ThinkPad X300 Ubuntu 8.04 Installation Notes

3.00 avg. rating (65% score) - 3 votes

First, let me tell you some first impressions about the machine. The keyboard is very good. It feels even a bit better than the one in my old T60. The display is very bright and sharp, but viewing angles could be better. WLAN worked right out of the box, as did the webcam.

The solid state drive is incredibly fast. I will never switch back to a hard disk after experiencing an SSD. Everything loads up in an instance. OpenOffice starts in about 5 seconds, which is very good compared to my T60. And the machine boots up and shuts down really fast (I haven’t timed those operations, though).

There are also a couple of annoyances which I hope will soon be fixed. Continue reading Lenovo ThinkPad X300 Ubuntu 8.04 Installation Notes

Limiting the bandwidth of incoming traffic

0.00 avg. rating (0% score) - 0 votes

A backup server was saturating the DSL links of remote offices every time the backups were running. To prevent this, I had to limit the incoming bandwidth of the TCP-connections that were used to back up the remote hosts, but not touch the ones that were used to connect to the servers in the local network. Here’s how to do it.

Continue reading Limiting the bandwidth of incoming traffic

Scratchbox installation under 32-bit chroot on 64-bit Ubuntu

0.00 avg. rating (0% score) - 0 votes

I wanted to try out the Maemo SDK for Nokia 770, N800 and N810 devices (for some reason I happen to own one of every generation), but found out that there are no prebuilt packages for the 64-bit environment. The quick (?) remedy for this is the chroot jail, because a guest i386 environment can pretty easily be bootstrapped inside a 64-bit one. Here are the step-by-step instructions for doing it.

Continue reading Scratchbox installation under 32-bit chroot on 64-bit Ubuntu

Bootstrapping an Ubuntu guest for Xen

0.00 avg. rating (0% score) - 0 votes

First, some empty disk space is needed. Let’s create a logical volume for our new virtual machine:

Create a filesystem on the new logical volume:

Continue reading Bootstrapping an Ubuntu guest for Xen

How to get VMware Server working with an unsupported kernel and the vmware-any-any patch

0.00 avg. rating (0% score) - 0 votes

VMware Server needs exactly two kernel modules running on the host system (there are separate modules for guest systems). These are the vmmon and the vmnet modules. Unfortunately, the vmmon and vmnet packages included in the VMware server distribution package don’t compile with the newest kernels. When I upgraded my laptop to Gutsy Gibbon a few weeks ago, I forgot to check if VMware server supports the new kernel. And, of course, it doesn’t yet. But luckily I found the vmware-any-any package, a patched version of the host kernel modules that works with newer kernel versions.

Continue reading How to get VMware Server working with an unsupported kernel and the vmware-any-any patch

Updated version of the flash64.sh script for Ubuntu 7.10 Gutsy Gibbon

0.00 avg. rating (0% score) - 0 votes

A few months ago I released a script to install a 32-bit Adobe Flash plugin to a 64-bit Firefox, but it doesn’t seem to work in Gutsy beta. Here’s an updated one. I upgraded my laptop to Gutsy and used this one to get Flash working.

Edit: I did a complete reinstall later and learned that Gutsy knows how to set this up by itself. So there’s no need for this script anymore. And that is a very positive thing!

Continue reading Updated version of the flash64.sh script for Ubuntu 7.10 Gutsy Gibbon

Creating a RAID array out of cheap USB disks

0.00 avg. rating (0% score) - 0 votes

A RAID array is a bunch of disks used together in co-operation to create a redundant storage facility. Hard drives are mechanical devices with moving parts, which makes them prone to failure. You can imagine what it means to spin the hard drive platters at 7200 rpm, for years without a pause in a typical server setup. Eventually, all disks die. A disk may run for a decade without a hinge, but another disk of the same type may die after a year. The problem is, there is reliable way to predict when a particular disk dies.

Continue reading Creating a RAID array out of cheap USB disks