VMware yet again, wins over Parallels…

They did it once with the Apple Mac – Fusion over Parallels. Now again in Linux.
Full details here: http://www.techthrob.com/tech/linux_virtualization.php

Virtualization in Linux: A Review of Four Software Choices
Introduction
This week Canonical, the company behind Ubuntu Linux, announced a partnership with Parallels, maker of the Virtualization products Parallels Workstation and Parallels Desktop for Mac. Consequently, the Parallels Workstation virtualization software is now available to download and install in Ubuntu Linux, completely supported by Canonical, and done entirely through the Add/Remove programs interface. This makes four different virtualization programs — three of which are installable via the package repositories — that run on Ubuntu Linux. (See the Correction: in the Installing VirtualBox section for more information)

This article compares four virtualization products available for Ubuntu Linux: the free, open source x86 emulator Qemu; the closed-but-free versions of VirtualBox and VMware-Server, and the commercial Parallels Workstation.

Installation
Installing Qemu
Installing Qemu is simple, with a twist: Qemu supports the KVM, or the Kernel Virtualization Machine, which enables it to use certain acceleration techniques that the other programs don’t use. As a result, we’re going to install a few extra packages along with the Qemu package itself: sudo apt-get install qemu qemu-launcher kvm kqemu-commonThe qemu-launcher is a graphical front-end to Qemu which we will see later; kvm and kqemu-common are the packages that allow Qemu to work with the Kernel’s Virtualization Machine. As a side note, the KVM will be installed by default and be fully supported in the next version of Ubuntu, Hardy Heron.

Installing Parallels
Installing any of these products is easy, but you may need to enable some extra repositories to install Parallels. To do this, go to your System Menu, and in the Administration submenu select “Software Sources.” Click on the “Third-Party Software” tab, and make sure that the line for “partner” software, “http://archive.canonical.com/ubuntu gusty partner” is selected:

Saving those changes, the package manager will update its lists, and you can now install Parallels, which comes in the logically named “parallels” package: sudo apt-get install parallelsInstalling Parallels will be a fun reminder of the Windows world for those who have become accustomed to Linux licencing – there’s a EULA (End User License Agreement) that must be clicked-past before you can install the program. Finally, once installed, you need to run Parallels and sign up for a 15-day free trial key — or purchase a key — assuming you don’t already have one.

Registration is quick and easy, requiring just a username and an email address; but it is another additional step you must take because of the software’s proprietary and commercial nature.

Installing VMware
To install VMware in Ubuntu, you’ll need to enable the “partner” repositories, just as you do for Parallels. Like Parallels, you’ll need to get a key from the VMware website, which you will be prompted for during installation. You’re required to submit a slew of personal information, but the key is given to you immediately (you don’t have to check your email for it, if you understand what I’m getting at). Unlike Parallels, this key is free for personal use, and does not expire.

Installing vmware can be done either through the graphical package manager (in the Third-Party section), or with the command: sudo apt-get install vmware-serverThe install is a bit lengthy compared to the other programs here, and the files are rather large (on the order of a hundred or so Megabytes), but all-in-all it’s a breeze as long as you have a fast connection.

Installing VirtualBox
Correction: The Open Source Edition (OSE) of VirtualBox is, in fact, available through the Ubuntu repositories, but that is not the version used here. Thanks to Daniel of ibeentoubuntu.blogspot.com for pointing this out!

VirtualBox is the one program that isn’t available via the Ubuntu repositories, but that doesn’t mean that installation is difficult. In fact, it’s as simple as going to the VirtualBox downloads page and downloading the appropriate package for your system. The menu for VirtualBox binaries is extensive, including multiple versions of Ubuntu, Debian, and Fedora, as well as some other distributions. For Ubuntu, select your version and architecture, and open it with the gdebi installer:

The package is a light-weight (compared to VMware) 17MB, and installs, thankfully, like any typical Ubuntu package: without prompting for any registration keys or personal information. This article will be looking the closed (but free) binary version of VirtualBox, not the Open Source Edition copy also available from the downloads page.

One caveat with VirtualBox: it requires that any users who will use the program be added to a special “vboxusers” group, so you’ll probably want to add yourself; and then you’ll have to logout and login for these changes to take affect. A minor annoyance, but an annoyance all the same.

User Interface – Creating and running virtual machines
VMware Server
Upon startup, the VMware Server Console will ask whether you want to connect to a local or remote server; in this test, I am using server on my local machine, but VMware can also be run over a network. Creating a new virtual machine is done via a wizard, which is simple enough for a beginner to use, but has enough customization options that an advanced user won’t feel restricted.

One problem I encountered, however, was that even after selecting Windows 2000 as my guest operating system, the wizard still recommended I use an emulated SCSI drive instead of IDE. I followed its advice, and the Windows 2000 install program wasn’t able to recognize any hard drives; it took me a while, but with the help of some kind people in the Ubuntu IRC chats I was able to correct the problem. Still, I was surprised that VMware made this mistake.

Running a Virtual Machine inside VMware is as simple as selecting the machine you want from the “Inventory” column, and clicking the “power on” button. Unlike its competitors, the Virtual Machine runs inside the VMware Server Console, instead of in a separate window. The Console also has the ability to run in a Kiosk-like mode called “Quick Switch”, which could be useful if you are using a dedicated machine for virtualization.

Adding additional hardware, or editing existing hardware, is simple and easy to do in VMware, and in my case the program auto-detected all of my physical devices correctly, and was able to map them to the guest OS without any problems.

VirtualBox
VirtualBox’s interface is written in QT, so it may look and feel a little out of place on a Gnome desktop. Anyone who’s ever used a KDE application in Gnome knows that it will function perfectly fine, however, even if it doesn’t quite look exactly right. VirtualBox doesn’t add itself to the Gnome menus by default, however, unlike the other three applications here (Parallels and VMware add themselves to the System Tools menu, while Qemu-Launcher places itself in Applications), so I loaded it up using the terminal command “VirtualBox”.

The VirtualBox user interface is the cleanest of all the applications I’ve looked at. Its wizard for adding a new Virtual Machine is elegant and effective, while its menu for editing an existing machine is the most user-friendly of all four programs.

VirtualBox’s own Preferences window is the most minimal of the bunch, allowing you to configure certain basic options such as the key combinations for focus grab/release, and the default language; unlike Parallels and VMware, it does not allow you to set a maximum amount of memory to allocate for the entire application as a whole.

Parallels
Like the other Virtualization clients, Parallels’ interface is sleek, polished, and user-friendly. Like VirtualBox, it’s written in QT, so it will feel at home on KDE, while working just fine in a Gnome environment.

Like the applications we’ve seen already, Parallels comes with a Virtual Machine Wizard which will take you through all the steps to create a new Virtual Machine, from the type of operating system you plan on running, to the amount of memory to allocate, to the size of the virtual hard disk you want to use. Modifying an already existing hardware configuration is as simple and straight-forward as in VMware.

Qemu-Launcher
Note: After writing this review I was told about the Qemulator program, which behaves similarly to the other applications’ interfaces. I will be adding a section on this program soon.

In contrast to the Virtual Machine Wizards and the sleek interfaces of the other programs, the Qemu-Launcher, which is your best chance at a GUI when it comes to using Qemu (another option, especially for KDE users is qtemu), is sorely lacking any user-friendly features, and will surely intimidate the beginner. The Qemu Launcher is divided into five main tabs. The main tab is where you select your Virtual Machine, its hard drive, how much memory to allocate to it, and whether you want to boot off the CD-ROM (for installation of an operating system). The Hardware tab allows you to select things like the type and number of processors to use, what kind of video to emulate, and whether you want to use full-screen or windowed mode.

In the Emulator tab you can enable logging, but most importantly you can enable Acceleration. With the additional packages installed, you want to select “Full Acceleration” for the best performance. You can also set the process priority, which will “nice” the process to give other programs priority (or, optionally, to give the virtual machine priority over other processes). A higher number here means a lower priority, the highest being 19.

Aside from the difficulties in configuring a new virtual machine in Qemu, I’ve found the launcher to be somewhat of a hindrance. Since it is simply a front-end for Qemu’s command-line interface, and it is incomplete at best, there are times when it doesn’t work as expected. For example, if you set amount of RAM to be dedicated to the virtual machine too high and Qemu can’t allocate enough memory, clicking the “Launch” button will do absolutely nothing. It won’t give you an error, but instead, will do nothing at all. The only way to figure out the problem is to launch qemu-launcher in a terminal, and look for the error to be written there.

Performance
Once your virtual machine is setup, the aspect of virtualization that really matters is how well things run. I tested Windows 2000 Professional, using 360MB of RAM and 2GB hard drive files, on a Pentium 4 2.6Ghz host system. To make things as fair as possible, I restarted my computer after each trial, and didn’t use any other functions while testing the virtualizers.

VMware Server
VMware was incredibly impressive in its performance; installing Windows 2000 Professional took only 15 minutes, and booting into the new operating system after a fresh install took under a minute.

Once inside Windows 2000, I found applications to be as quick and responsive as if they were running natively on real hardware. Not once did I hit swap, which would have really slowed things down.

VirtualBox
VirtualBox proved itself as strong a contender as its heavyweight challenger, VMware. Installation took exactly the same time (15 minutes) from start to finish, with a few seconds margin of error for user-interaction.

Once booted, Windows performed like a champion inside VirtualBox, and felt even snappier than in VMware. I did notice some flickering inside the virtualization that wasn’t present in VMware, especially when maximizing/minimizing windows, or doing anything involving transparency (for example, dragging an icon about the desktop), but nothing that would hinder the user experience. VirtualBox is the only application reviewed that allowed me to set a size for video memory, so I left this at its default of 8MB.

Parallels
Surprisingly, the commercial Parallels application did not do as well as its contenders in this part of the test. From beginning to end, installing Windows took twenty-seven minutes, or 180% of the time it took in VirtualBox or VMware. This was surprising and disappointing, and once inside Windows I found its performance to be lacking, as well.

Booting up took considerably longer than in either of the other applications – to be sure, I ran this test several times. Unlike VirtaulBox and VMware, applications were not as responsive one would expect on real hardware; it was obvious that the operating system was running within a virtualized environment. Along with maxing out my CPU, Parallels inexplicably began using my swap partition although there were several hundred megabytes of real memory free on my system. While I can’t necessarily attribute this to a problem in Parallels, it does greatly slow things down, and is rather unexpected. Video performance was lack-luster; menus flicker as they scroll, and there is a noticeable delay when drawing windows. Overall, Parallels wasn’t impressive in its performance, to the point that I wonder if there is a bug in its default configuration on Ubuntu.

Qemu
Note: A few people have mentioned in forums that you should start your Qemu virtual machine (or you can just start the launcher itself) in a terminal, in order to make sure that full KVM support is working. I did that in these tests, and didn’t get any errors from KVM/kqemu so I am assuming that it acceleration was working correctly (set to “Full”).

Qemu was interesting in that, instead of using my physical processor as the processor for the Virtual Machine, it emulated a Pentium II. This may have something to do with the fact that Qemu, unlike the other applications here, is not a true Virtualization platform; it is an x86 emulation platform, capable of full virtualization.

Qemu took just under 25 minutes to install Windows 2000, coming in well behind VirtualBox and VMware, but beating out Parallels. While video performance was acceptable, there was a noticeable lag in opening applications inside the virtualized Windows platform. Qemu also was the only application in which I wasn’t able to get sound to work inside the guest operating system (the other applications set this up out of the box). Lastly, my biggest complaint by far is that Qemu continued to eat up CPU time even when the virtual machine was idle; I didn’t experience this problem with any of the other applications. These problems severely hinder Qemu’s ability to compete.

Conclusions
This article looked at four different products for virtualization in Linux, specifically Ubuntu Linux. The findings were interesting – the only product that requires the purchase of a licence for personal use, Parallels, actually performed the worst of the group. Qemu did well for a completely free-as-in-speech application, although VMware and VirtualBox blew the competition away in terms of performance.

Of these applications, VMware and VirtualBox definitely come out the clear winners. For individual use, where the ability to run a single Windows desktop inside of Linux is all that is needed, VirtualBox turns out to be my preference. It’s much smaller than VMware, which comes packed with extra features that aren’t necesary for the end-user. If your needs are different, however, you’ll probably want to give VMware a closer look. Overall, the maturaty and stability of all four applications was impressive enough to call virtualization on the Linux desktop “complete.” So they should start promoting that big time with buy followers.

[ad#ad-1]

UPnP Problems?

For some reason, on my home LAN, I have trouble playing Age of Empires. I know, it’s an old game, but I still like to play it. I’m connected at home via a Linksys WRT54G-L. I’ve also connected up a Netgear MR814 used as a hub, but I don’t think that’s the issue. I’m not using dhcp on either of those boxes – I have a separate machine as a dhcp server. Anyways, clicking “Show games” would never work! I thought initially it was some software issue, so I reinstalled Windows and it still didn’t work. I swapped out the WRT54G-L for a switch and then it worked! After some googling, I found that it might be the UPnP. Hopefully, this fixes it. It works now, but then again, it used to work before too. We’ll see.

Ash Wednesday or Chinese New Year?

Hmmm… tough question. I’m not supposed to eat meat on Ash Wednesday and am supposed to go to church and have ashes put on my forehead. Problem is, if I don’t eat meat at home, it’s Chinese New Year’s Eve. I’d probably never hear the end of it from my parents! I think I’d rather the Lord punish me later than be punished now. 🙂

DHCP server with DDNS

authoritative;
include “/etc/bind/rndc.key”;
server-identifier chunli.shocknetwork.com.;
ddns-domainname “shocknetwork.com.”;
ddns-rev-domainname “in-addr.arpa.”;
ddns-update-style interim;
ddns-updates on;
ignore client-updates;
zone shocknetwork.com. {
primary 127.0.0.1;
key rndc-key;
}
default-lease-time 21600; # 6 hours
max-lease-time 43200; # 12 hours
option domain-name “shocknetwork.com”;
option domain-name-servers chunli.shocknetwork.com, resolver1.opendns.com;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers chunli.shocknetwork.com, resolver1.opendns.com;
option domain-name “shocknetwork.com”;
option routers 192.168.0.1;
option broadcast-address 192.168.0.3;
default-lease-time 600;
max-lease-time 7200;
zone 0.168.192.in-addr.arpa. {
primary 192.168.0.3;
key rndc-key;
}
zone localdomain. {
primary 192.168.0.3;
key rndc-key;
}
}
/etc/named.conf –> I’m using Ubuntu 6, so it’s actually /etc/bind/named.conf and named.options, etc, but for the sake of simplicity, I’ll put them all together.
options {
directory “/var/cache/bind”;
auth-nxdomain no; # conform to RFC1035
};
zone “.” {
type hint;
file “/etc/bind/db.root”;
};
zone “localhost” {
type master;
file “/etc/bind/db.local”;
};
zone “127.in-addr.arpa” {
type master;
file “/etc/bind/db.127”;
};
zone “0.in-addr.arpa” {
type master;
file “/etc/bind/db.0”;
};
zone “255.in-addr.arpa” {
type master;
file “/etc/bind/db.255”;
};
controls {
inet 127.0.0.1 allow {localhost; } keys { “rndc-key”; };
};
// Add local zone definitions here.
zone “shocknetwork.com” {
type master;
file “/etc/bind/shocknetwork.com.zone”;
allow-update { key “rndc-key”; };
notify yes;
};
zone “0.168.192.in-addr.arpa” {
type master;
file “/etc/bind/0.168.192.in-addr.arpa.zone”;
allow-update { key “rndc-key”; };
notify yes;
};
include “/etc/bind/rndc.key”; Some troubleshooting tips: 1) turn on logging for DNS:
logging {
category “default” { “debug”; };
file “/tmp/nameddbg” versions 2 size 50m;
print-time yes;
print-category yes;
}; That’s about it – it should give you all you need.]]>

iSCSI naming

Both targets and initiators require names for the purpose of
identification, so that iSCSI storage resources can be managed
regardless of location (address). Note that this means iSCSI names
are independent of location.

Furthermore, iSCSI names are associated with iSCSI nodes instead of
with network adapter cards to ensure the free movement of network
HBAs between hosts without loss of SCSI state information
(reservations, mode page settings etc) and authorization
configuration. An iSCSI node also has one or more addresses.
An iSCSI address specifies a single path to an iSCSI node and consists
of the iSCSI name, plus a transport (TCP) address which uses the following format: [: ] If the is not specified, the
default port 3260, assigned by IANA, will be assumed. For iSCSI
initiators, the is omitted.

The concepts of names and addresses have been carefully separated in
iSCSI:

– An iSCSI Name is a location-independent, permanent identifier for
an iSCSI node. An iSCSI node has one iSCSI name, which stays
constant for the life of the node.

– An iSCSI Address specifies not only the iSCSI name of an iSCSI
node, but also a location of that node. The address consists of a
host name or IP address, a TCP port number (for the target), and
the iSCSI Name of the node. An iSCSI node can have any number of
addresses, which can change at any time.

To assist in providing a more human-readable user interface for
devices that contain iSCSI targets and initiators, a target or
initiator may also provide an alias. The alias strings are communicated
between the initiator and target at login, and can be displayed by a user interface on either end, helping the user tell at a glance whether the
initiators and/or targets at the other end appear to be correct.
The alias is a variable length string, between 0 and 255 characters.

Constructing iSCSI names using the iqn. format.

– The string “iqn.”

– A date code specifying the year and month in which the
organization registered the domain or sub-domain name used as the
naming authority string.

– The organizational naming authority string, which consists of a
valid, reversed domain or subdomain name.

– Optionally, a ‘:’, followed by a string of the assigning
organization’s choosing, which must make each assigned iSCSI name
unique.

The following is an example of an iSCSI qualified name from an
equipment vendor:

Organizational Subgroup Naming Authority
Naming and/or string Defined by
Type Date Auth Org. or Local Naming Authority
+–++—–+ +———+ +——————————–+
| || | | | | |

iqn.2001-04.com.example:diskarrays-sn-a8675309

The following is an example of an iSCSI name string from a storage
service provider:

Organization String
Naming Defined by Org.
Type Date Authority Naming Authority
+-+ +—–+ +————-+ +———————-+
| | | | | | | |
iqn.1995-11.com.example.ssp:customers.4567.disks.107

Note that when reversing these domain names, the first component
(after the “iqn.”) will always be a top-level domain name, which
includes “com”, “edu”, “gov”, “org”, “net”, “mil”, or one of the
two-letter country codes. The use of anything else as the first
component of these names is not allowed.

Constructing iSCSI names using the eui. format

The iSCSI eui. naming format allows a naming authority to use IEEE
EUI-64 identifiers in constructing iSCSI names. The details of
constructing EUI-64 identifiers are specified by the IEEE
Registration Authority (see [EUI64]).

Example iSCSI name:

Type EUI-64 identifier (ASCII-encoded hexadecimal)
+–++————–+
| || |
eui.02004567A425678D

iSCSI Discovery

The goal of iSCSI discovery is to allow an initiator to find the
targets to which it has access, and at least one address at which
each target may be accessed. This should generally be done using as
little configuration as possible. The iSCSI discovery mechanisms
listed here only deal with target discovery and one still needs
to use the SCSI protocol for LUN discovery. In order for an iSCSI
initiator to establish an iSCSI session with an iSCSI target, the
initiator needs the IP address, TCP port number and iSCSI target name information.

iSCSI supports the following discovery mechanisms:

a. Static Configuration: This mechanism assumes that the IP address,
TCP port and the iSCSI target name information are already
available to the initiator. The initiators need to perform no
discovery in this approach. The initiator uses the IP address and
the TCP port information to establish a TCP connection, and it
uses the iSCSI target name information to establish an iSCSI
session. This discovery option is convenient for small iSCSI
setups.

b. SendTargets: This mechanism assumes that the target’s IP address
and TCP port information are already available to the initiator.
The initiator then uses this information to establish a discovery
session to the Network Entity (IP address). The initiator then subsequently issues the SendTargets text command to query
information about the iSCSI targets available at the particular
Network Entity (IP address).

c. Zero-Configuration: This mechanism assumes that the initiator does
not have any information about the target. In this option, the
initiator can either multicast discovery messages directly to the
targets or it can send discovery messages to storage name servers.
Currently, the main discovery frameworks available are
SLP and iSNS. (Not supported in the first release of ESX 3.)]]>

Windows Offline Update is AWESOME!

It’s downloadable here: http://www.heise.de/ct/projekte/offlineupdate/

It’s so cool! It’s also very useful. You don’t need to be on the network when you do the updating. If you use Windows and get on a public network, you most certainly will get a virus before you even get fully updated! This software has saved me so much time! Almost like downloading a service pack and installing it, it pulls all of the Windows updates from Microsoft’s website and puts them into a big folder or iso for you so that you can just install an OS, pop in the cd that you made with this and just install all of the patches in one fell swoop. Awesome! … and FREE!

[ad#ad-1]

BASIC dhcp server – piece of cake!

Wanted to set up dhcp so that I had more granular control since my router kept screwing up and giving the same IP to different hosts.

On Ubuntu 6, I just installed it:
apt-get install dhcp3-server

Then edited the /etc/dhcp3/dhcpd.conf (ddns-update-style was initially set to none):

ddns-update-style interim;
option domain-name “shocknetwork.com”;
option domain-name-servers chunli.shocknetwork.com, resolver1.opendns.com;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers chunli.shocknetwork.com, resolver1.opendns.com;
option domain-name “shocknetwork.com”;
option routers 192.168.0.1;
option broadcast-address 192.168.0.3;
default-lease-time 600;
max-lease-time 7200;
}

[ad#ad-1]

Bind 9 DNS logging of just queries

Recently, set up logging on the DNS server so I can see which hosts clients are resolving. Pretty cool. i commented out a bunch of stuff that I didn’t need.

This is the stuff that goes into the named.conf file or in my case for Ubuntu 6, /etc/bind/named.conf.options

logging {
// category “default” { “debug”; };
// category “general” { “debug”; };
// category “database” { “debug”; };
// category “security” { “debug”; };
// category “config” { “debug”; };
// category “resolver” { “debug”; };
// category “xfer-in” { “debug”; };
// category “xfer-out” { “debug”; };
// category “notify” { “debug”; };
// category “client” { “debug”; };
// category “unmatched” { “debug”; };
// category “network” { “debug”; };
// category “update” { “debug”; };
category “queries” { “debug”; };
// category “dispatch” { “debug”; };
// category “dnssec” { “debug”; };
// category “lame-servers” { “debug”; };
channel “debug” {
file “/tmp/nameddbg” versions 2 size 50m;
print-time yes;
print-category yes;
};

[ad#ad-1]

iptables notes

iptables -A INPUT -p tcp -m tcp -s –dport 389 -j ACCEPT
iptables -A INPUT -p TCP –dport 389 -j REJECT To allow ssh from anyone in the 192.168.x.x network:
iptables -A INPUT -p tcp -m tcp -s 192.168.0.0/16 –dport 22 -j ACCEPT Things I did to set up sshdfilter:
iptables -N SSHD
iptables -A INPUT -p tcp -m tcp –dport 22 -j SSHD sshdfilter automatically sets up the drop if they try too many times to log in and fail.]]>

How to get tcpdump from Virtual Switches in ESX 3

1) Install VMware-esx-supptools-3.0.0-1.i386.rpm from the ESX 3 cd.

2) You can then run “/usr/lib/vmware/support/esxnet-support man” and learn how to use the tool, but …

3) To get a trace from the portgroup, you’ll need to run:

/usr/lib/vmware/support/esxnet-support trace -z -p Network0

Network0 of course will need to change to your portgroup name.

Another thing you can do is create a portgroup and put it in promiscuous mode. Then, run tcpdump in that guest that’s in that portgroup.