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]

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.]]>

Microsoft a "Thought Leader" in virtualization?

http://arstechnica.com/news.ars/post/20 … ifted.html The quote”

Quote:
Anytime I write about Microsoft and virtualization, someone e-mails me to remind me that Apple doesn’t allow the virtualization of its client OS, which would seem to make Microsoft a “thought leader” according to some of you. Others wonder if/when Cupertino would ever allow it.
What kind of bullshit is that!? The only time Microshaft ever got into Virtualization was when they bought the technology from Connectix back in the days! VMware was in the business way before that! Here’s the whole whole bullshit article:
Microsoft relents: Vista consumer virtualization ban lifted
By Ken Fisher | Published: January 21, 2008 – 01:39PM CT It only took them a year longer than it should have, but Microsoft has finally relented and approved the use of Windows Vista Basic and Premium Edition in virtualized environments, for both “consumers” and business users. Among other things, the change means that Mac and Linux users can now run Windows Vista in a VM without having to pay for the more expensive Business or Ultimate editions. This is a boon to anyone who needs virtualized environments for testing and development. Related StoriesMicrosoft ditches about-face on virtualization restrictions at 11th hour
Virtual Iron goes 4.0
Viridian beta and Virtual Server 2005 R2 SP1 will miss target dates
Microsoft’s anti-virtualization stance: forget DRM, think Apple
“For consumers, Windows Vista Home Basic and Windows Vista Home Premium are now licensed for use in a virtual machine environment,” the company said in a statement. An updated end-user license agreement will be posted later at this location. The move isn’t a total surprise, even if it is months late. The company came very close to repealing its ban last summer, only to inexplicably pull the plug at the last minute. On the record, Microsoft said that the ban stemmed from their view that virtualization “is not yet mature enough from a security perspective for broad consumer adoption.” To be frank, we never bought this excuse, because you could get the “maturity” needed to virtualize Vista for the $60+ premium that Business costs over and against Home Premium. That debate is history now. The announcement kicks off Microsoft’s Virtualization Deployment Summit, which begins in earnest tomorrow. The company is also expected to tout several other developments for business virtualization over the two-day summit, including the acquisition of Calista Technologies and an expanded partnership with Citrix. Microsoft is beating the virtualization drum hard, gearing up for what will likely be a protracted war with the perceived industry leader, VMWare. Microsoft’s message is going to be ease-of-use and cost. Bob Muglia, senior vice president of the Server and Tools Business at Microsoft, said in a statement that Microsoft estimates that “less than 5 percent of companies are utilizing virtualization technology because it is simply too cost-prohibitive and complex.” Microsoft argues that it has the most “economical” approach to virtualization from desktop to datacenter, and lowering the cost barrier on the client certainly helps. Still, while great news for users who want to virtualize Vista legally, and on the cheap, it’s still an open question when businesses will begin migrating to Vista in force, and if any of that migration will feature significant virtualization on the client end. Cupertino, please start your copiers, please?!
Anytime I write about Microsoft and virtualization, someone e-mails me to remind me that Apple doesn’t allow the virtualization of its client OS, which would seem to make Microsoft a “thought leader” according to some of you. Others wonder if/when Cupertino would ever allow it. It’s true that Apple doesn’t allow client virtualization, and I think I speak for just about everyone when I say that no one believes it’s likely to happen soon. Apple doesn’t even allow its customers the legal right to run its client OS on non-Apple computers, so virtualization is out of the question. Apple, unlike Microsoft, is in the PC-selling business, and unlike Microsoft, Apple uses a set of technological access controls to prevent its OS from running on unauthorized hardware. Why? Apple doesn’t want you, me, and every other reader of this site to do what they know we’d do: run out and build our own “Macs.” If you want OS X, Apple wants you to buy a Mac, period. With the company’s notorious focus on control and design, we don’t see this changing any time soon.]]>

Linux P2V

Here’s a cool link on doing Linux P2Vs.
Taken from: http://conshell.net/wiki/index.php/Linux_P2V

Introduction
P2V Linux migrations are a combination of science, art and luck.

P2V stands for Physical to Virtual. In other words, it is the process or procedure of moving a running system (operating system and everything installed) from a physical machine to a virtual machine.

This page describes some of the usual steps necessary to convert a Linux system into a virtual machine running under VMware ESX Server. The same steps should mostly apply to VMware Server, Workstation or even QEMU.

The focus of this P2V explanation is on Red Hat and CentOS guests as they are not only supported, but benefit from kudzu and rescue disk capability built-in. Other distributions can of course be converted but the exact steps will vary.

So, let’s get started.

What to use (or not)
The following software products claim to do P2V, but in fact do not support Linux, so don’t bother.

Virtual Server Migration Toolkit
EZP2V
These products do support Linux in some way…

VMware Converter
VMware converter will work, however any options such as resizing the disks and post migration configuration are greyed-out. This is due to the fact that it just does a raw block-by-block copy of the source disk. It is most useful if your target for migration is ESX 3.x

–update – VMware Converter 4 will do a live P2V for Linux.

Platespin PowerConvert?
PowerConvert works (somewhat) with Linux but it does not support LVM and in my experience is an unreliable product with lackluster support.

liveview looks promising, however it only runs on Windows (due to dependency on VMDK disk mounter) and works with vmware-server, not ESX server. It has “limited” Linux support.
These products or methods offer full support for Linux…

UltimateP2V appears to be worthy of consideration.
Good ol’ dd + netcat, followed by rescue disk of some kind (to fix the modules and make a new initrd).
Preparation
You will want to have the necessary tools in place as well as some calculations. Consider the follow aspects of your system.

How much physical RAM? Is it over or under-utilized?
How much Swap space and where?
Disk type – IDE or SATA and the disk device will be /dev/hda, SCSI will be /dev/sda. You may also have multiple disks (hdb, sdb, etc).
Disk size – use a command such as sudo sfdisk -s. Blocks are in 1KB units, do the math to figure out the equivalents in MB by dividing by 1024 and in GB by dividing by 1024 again.
Example:
jetson:~> sudo sfdisk -s
/dev/hda: 39070080
total: 39070080 blocks
(39070080/1024) = 38154.375 MB
(38154.375/1024) = 37.260 GB
Partition layout -know exactly the partitions, sizes and FS types. This can be gleaned from the df output and the content of /etc/fstab.
Rescue disk – this may be necessary for the recovery of the system once the disk data has been converted over. Conversion puts the system into a “new” environment of emulated devices, and some cases kudzu will not quite get you there or won’t even be available (kudzu is a Red Hat software, not normally found on other Linux distributions).
Knowledge of destination environment. For instance, see http://www.vmware.com/pdf/GuestOS_guide.pdf for vi3.
ISOs – you will want to have the following ISOs for easy access and to map to the CDROM device in the guest.
Install disc #1 for the Red Hat or CentOS version of the source system
Knoppix (recommended) or System Rescue CD
Preparing the source system
Take the time to consider and perform the following tasks while the source system is still running in its native state.

Disable any services you don’t think will be necessary after the conversion, such as system-management agents (think Dell OMSA or IBM Director) and ntpd.
Purge out old logfiles, scratch files in /tmp and unnecessary software.
Cleanup old/extraneous kernels. You will likely want to end up with just 2 kernels, the latest Non-SMP kernel and a previous one.
Building a new initrd with the mptscsih (RHEL4/CentOS4) or BusLogic (RHEL3/CentOS3, RHEL2/CentOS2) SCSI driver loaded, this may save you from having to boot into linux rescue mode after the conversion.
For RHEL4/CentOS4, add –with=mptscsih For RHEL3/CentOS3 and earlier, use –with=BusLogic

mkinitrd -v -f –with=BusLogic /boot/initrd-`uname -r`.img `uname -r`
Zero-out each of the disk partitions… this can speed up the data transfer later on. e.g.
dd if=/dev/zero of=/usr/bigfile; rm -f /usr/bigfile
Boot your system with Knoppix or System Rescue CD. The state we want is an at-rest hard drive(s) and network connectivity. NOTHING should be running/writing to the hard drive(s).

Optional step: run md5sum /dev/sda and record the resulting hash. Usually the last 6 characters will suffice. This can take awhile but gives you a fingerprint of the hard drive data that you can use later to verify the integrity of the data after transferring to the target system. ‘

Preparing the target system (VM)
Using the MUI or vmware-server-console, create a VM with the following parameters:

Operating System: Linux. You can be more specific on vmware-server or ESX, such as Red Hat Enterprise Linux 4.
Disk: slightly larger than source-system (see below). Create same number of disks as exist on the source system.
Network (NIC): Use vlance if given the choice, can be upgrade to vmxnet later when vmware-tools is installed.
CDROM: assign to either Knoppix ISO or System Rescue CD ISO
Boot the target system (I enter knoppix 2 at the boot prompt) and verify the disk(s) are recognized using sfdisk -s. Also verify the network is up using ifconfig eth0. You should have an IP address assigned to eth0 via DHCP or static. Now try pinging the source system e.g. ping 10.4.1.2

Network Acquisition (Disk Cloning)
This is where we transfer the bits from drive A on the source to drive B on the target. The process is functionally very similar to a network acquisition often used in the field of computer forensics.

For our part, a simple example will show how to clone the bits from a single drive: /dev/sda

You’ll need to know the IP address of your target-system, which can be learned from ifconfig eth0.

These commands can be used to clone the blocks to the target-system disk. I assume you have netcat (nc) installed on the source system.

First, run this on the target system

nc -l -p 9001 | dd of=/dev/sda
Then run this on the source system

dd if=/dev/sda | nc 9001
In the real-world, repeat the above process as necessary for the remaining disks.

This is the slowest part of the process. Unfortunately, dd does not show a progress meter. I have seen a 36GB drive take 40 minutes to transfer over on a gigabit network, where the actual throughput was ~14.3MB/s. Another P2V took just over an hour for the same size drive, albeit on a different gigabit network.

The network transfer speed is an important consideration when planning your scheduled outage. You may want to run some tests before your P2V, with a smaller set of data (1GB?) to get an estimate of your throughput, then run the numbers to figure out how long it will take to do the entire drive(s). This can be done while the system is still online. Also, consider the tip above about zero-filling your disk partitions beforehand.

Once your drive(s) have been bit-copied over the network to the target, shutdown your target system and remove the virtual CDROM or ISO mapping.

Optional step: run md5sum /dev/sda and verify the result matches what you saw earlier.

Extras
This is a perfect time to make some adjustments if you want to be clever about your disk & paritition sizes, the following may come in handy. Verify the partitions

fdisk -l /dev/sda
Check a filesystem.

e2fsck -f /dev/sda1
Align ext[23]–>

resize2fs -p /dev/sda1

First-boot
Assuming you got this far, the next step is to immediately shutdown the system again. You’ll want to re-assign the NIC to vmxnet and assign the vmware-tools ISO to the CDROM (path: /usr/lib/vmware/isoimages/linux.iso). Boot up into single-user mode (at grub prompt hit e, select kernel line, e, append “single” to the line, then hit b). Install the vmware-tools (detailed elsewhere) which should get you the vmxnet driver module. Adjust network settings now! Cleanup and reboot. You should be 98% there. Congratulations!

NOTE: I had to rename /etc/rc3.d/S19vmware-tools to /etc/rc3.d/S09vmware-tools to “fix” my network bootup sequence.

On the second reboot, the kudzu command will run and (may well) deal with the remaining hardware changes.

When kudzu runs, it recognizes that certain devices (Broadcom NICs) are no longer there while others (LSI Logic card, pcnet32 NIC) had been added. Usually it is easiest to just accept what kudzu tells us & fine tune later.

See When things go wrong below if you don’t get back to a login: prompt.

When things go wrong
If kudzu does not get you back to a login: prompt, the next step is to boot with the rescue disk. This entails mapping the install cd#1 ISO file to your CDROM device using the MUI or vmware-server-console. Make sure the VM BIOS is also set to use your CDROM in the boot order before the hard drive(s).

Once booted, type linux rescue at the boot prompt and shortly thereafter you will be able to type chroot /mnt/sysimage to get at your disk partitions, which should automatically be mounted there.

The first thing to look at is /etc/modules.conf (RHEL3/CentOS3) or /etc/modprobe.conf (RHEL4/CentOS4). Make sure the appropriate SCSI driver is listed, either BusLogic or mptscsih (based on what you configured this VM to use and the recommendations above).

alias scsi_hostadapter mptscsih
#or
alias scsi_hostadapter BusLogic
Also, take note of the eth0 setting, which should be either pcnet32 for the vlance device, or vmxnet for the vmxnet device. After you install the vmware-tools with the vmxnet device assigned it should be configured automatically.

alias eth0 pcnet32
#or
alias eth0 vmxnet
If you went the route of cloning individual partitions instead of the entire disk(s), it may be necessary to clone the MBR. This will be evident if you try to boot from the drive and get the message “No operating system found”. The process is described here.

Tying up loose ends
Consider the new state of the system, do you really need to run NTP anymore? (Hint: read VMware’s timekeeping whitepaper, set tools.timeSync=”TRUE” in the .vmx file and add clock=pit to the grub kernel line).

See Also
ESX Server 3 Systems Compatibility Guide (PDF)
ESX Server 2.x Systems Compatibility Guide (PDF)
Hard Disk Cloning
Wonders of ‘dd’ and ‘netcat’: Cloning OS harddrives
The Sleuth Kit Informer
dd_rescue – looks like a GREAT alternative to dd for P2Ving systems with failing hard drives. Available in the CentOS
dcfldd – another dd alternative that can update the user of its progress in terms of the amount of data transferred and how much longer operation will take.

Re: Windows Offline Update is AWESOME!

… You’ll definitely get one with Windows 2000 SP4, but they’re not supporting it anymore. Maybe I should test it before I post. I never said Solaris was any better though. If you think about it though, what’s safer? An unpatched Linux or patched Windows box? I’d say it depends on how much time has passed since your last Windows patch. ;)]]>

Re: Windows Offline Update is AWESOME!

uslacker99 wrote:

It’s downloadable here: http://www.heise.de/ct/projekte/offlineupdate/
If you use Windows and get on a public network, you most certainly will get a virus before you even get fully updated!

Geez, aren’t we being a bit … como se dice … melodramatic? “Most certainly”? You must be speaking of Windows 98. This would also go/could also go for an unpatched Linux or Mac OS X. People write viruses for ‘systems for the masses’ not for esoteric OSes. If Solaris was as popular as Windows I would almost guarantee you that we would all be talking of the joke that is Solaris. You can’t tell me that Microsoft does not have some of the best programmers in the world. Having ALL the best programmers in the world would still not plug every OS hole unless they only cared for a single line.]]>

MAC addresses stored in different places in Linux

Where the MAC address is stored is pretty important for Virtual Machines because the MAC address can change if you move the VM or if you copy it, etc.

Ubuntu 7.1.0 puts it in
/etc/udev/rules.d/70-persistent-net.rules

Redhat puts it in
/etc/sysconfig/network-scripts/ifcfg-eth0

Seems that older Ubuntu versions put them in /etc/network/interfaces I think. I’ve also did a search and found that there’s a /etc/iftab as well.

How to manually build an initrd for ESX 3.5

notes came from here:

http://communities.vmware.com/thread/116768

Hi,

i managed to get my ESX3.5 to boot and run on a HP ML 115.

onboard raid: yes, this “raid” really sucks, because my rescue cd found 2 controllers/disks -> NO RAID

TODO-List to get ESX-3.5 up and running.

1.) install it from the cd (of course)

2.) reboot with a linux live cd of your choice.

and now i hope that there are no typos…because i created this “script” on my laptop during i tried and tested it on my ESX box!

mkdir /mnt/eboot
mkdir /mnt/eroot

1. /boot of ESX box

mount /dev/sda1 /mnt/eboot

1. /root of ESX box

mount /dev/sda2 /mnt/eroot

mkdir /mnt/eroot/tmp/initrd
mkdir /mnt/eroot/tmp/initrd/extracted
mkdir /mnt/eroot/tmp/initrd/extractednew

cp /mnt/eboot/boot/initrd-2.4.21-47.0.1.ELvmnix.img /mnt/eroot/tmp/initrd

cd /mnt/eroot/tmp/initrd
mv initrd-2.4.21-47.0.1.ELvmnix.img initrd-2.4.21-47.0.1.ELvmnix.img.gz
gunzip initrd-2.4.21-47.0.1.ELvmnix.img.gz
mount initrd-2.4.21-47.0.1.ELvmnix.img extracted -o loop

cd extracted
cd etc/vmware
cp simple.map simple.map.org

vi simple.map
2nd go for SED!

search for 037e
double this line
change one 037e to 037f
save

cd ..
cd ..

dd if=dev/zero of=initrd.img bs=1k count=97000
mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img

mount initrd.img extractednew -t ext2 -o loop

tar -C extracted/ -cmf – . | tar -C extractednew/ -xmf – .

1. umount initrd.img

umount extracted
umount extractednew

gzip -best initrd.img
ls -alh
mv initrd.img.gz initrd.img

cd /mnt/eboot
mv initrd-2.4.21-47.0.1.ELvmnix.img initrd-2.4.21-47.0.1.ELvmnix.img.org
cp /mnt/eroot/tmp/initrd/initrd.img initrd-2.4.21-47.0.1.ELvmnix.img

cd /mnt/eroot
cd etc
cd vmware

cp pci.ids pci.ids.org
vi pci.ids
2nd go for SED!

search for 037e
double this line
change one 037e to 037f
save

cp pci.xml.merged pci.xml.merged.org
vi pci.xml.merged
2nd go for SED!

search for 037e
double this SECTION
change one 037e to 037f
save

cd pciid
cp sata_nv.xml sata_nv.xml.org
vi sata_nv.xml
2nd go for SED!

search for 037e
double this SECTION
change one 037e to 037f
save

reboot from your resuce system into ESX and JUCHEEEEE….

kind regards,

Reinhard

________________________________________________________________________________________

#!/bin/bash

vmware esx initrd changer
#/bin/bash
Reinhard Partmann
date created: 2007-12-17
date modified: 2007-12-17
version: 0.2
echo “creating directories…”
mkdir -p /mnt/eboot
mkdir -p /mnt/eroot

echo “mounting..”
mount /dev/sda1 /mnt/eboot
mount /dev/sda2 /mnt/eroot
mount | grep sda

echo “copying original initrd file…”
mkdir -p /mnt/eroot/tmp/initrd/extracted
cp /mnt/eboot/initrd-2.4.21-47.0.1.ELvmnix.img /mnt/eroot/tmp/initrd/initrd-2.4.21-47.0.1.ELvmnix.img.gz
cd /mnt/eroot/tmp/initrd

echo “unpacking & mounting original initrd file…”
gunzip -f initrd-2.4.21-47.0.1.ELvmnix.img.gz
mount initrd-2.4.21-47.0.1.ELvmnix.img extracted -t ext2 -o loop
cd extracted
cd etc
cd vmware

echo “changing simple.map…”
echo “10de:037f 0000:0000 sata_nv.o” >> simple.map

cd ..
cd ..
cd ..

umount extracted
echo “replacing original initrd file…”
gzip –best initrd-2.4.21-47.0.1.ELvmnix.img
mv /mnt/eroot/tmp/initrd/initrd-2.4.21-47.0.1.ELvmnix.img.gz /mnt/eboot/
cp /mnt/eboot/initrd-2.4.21-47.0.1.ELvmnix.img.gz /mnt/eboot/initrd-2.4.21-47.0.1.ELvmnix.img

echo “patching xml files”

cd /mnt/eroot/etc/vmware/pciid
lines=`wc -l sata_nv.xml | awk ‘ { print $1 } ‘`
echo “lines: $lines”
(( lines -= 2))
echo “subtr lines: $lines”
mv sata_nv.xml sata_nv.xml.org
head -$lines sata_nv.xml.org > sata_nv.xml

echo ” ” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo ” sata_nv” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo ” MCP55 SATA Controller” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo “” >> sata_nv.xml

touch /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “#!/bin/bash” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “esxcfg-pciid” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “sleep 5” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “rm /etc/rc3.d/S99rp-esxcfg-pciid-boot” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
chmod a+x /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
cd /mnt/eroot/etc/rc3.d/
ln -s ../init.d/rp-esxcfg-pciid-boot S99rp-esxcfg-pciid-boot

echo “cleanup…”
cd /
rm -f -r /mnt/eroot/tmp/initrd
umount /mnt/eboot
umount /mnt/eroot
rm -f -r /mnt/eboot
rm -f -r /mnt/eroot]]>

[ad#ad-1]

Analyst Mumbo Jumbo about Red Hat

Quote:
Ahead of the Bell: Red Hat
Monday December 10, 8:08 am ET
Jefferies & Co. Analyst Downgrades Red Hat on Challenges From Competing Technology

NEW YORK (AP) — A Jefferies & Co. analyst downgraded Red Hat Inc., saying competing technologies are nabbing market share and could hurt profit growth, as the software maker deals with rivalry by making acquisitions.

Katherine Egbert in a client note cut her rating on Red Hat to “Hold” from “Buy” and reduced her target price to $19 from $23.

Red Hat will have to work to diversify its business away from its Red Hat Enterprise Linux products, which are based on open-source software, Egbert said. That’s because newer virtualization technologies, which allow businesses to use different computer operating systems on a single server, are replacing Linux servers as companies work to cut costs, Egbert wrote.

Often new servers are shipped with a key competing product from VMware Inc., which is cutting into Linux market share, she added.

But Red Hat is diversifying through acquisitions and could step up this process, Egbert said, which could eat into earnings potential.

This is total bullshit for lack of a better term. What in the hell does VMware have to do with Red Hat? They are new and coming into the Virtualization space! VMware actually allows OS vendors to sell more licenses!

Let’s see here “virtualization technologies, which allow businesses to use different computer operating systems on a single server, are replacing Linux servers as companies work to cut costs” … what the fuck!? So you’re running different operating systems … what operating systems might they be? Windows (costs money), more Linux? Probably! They’ll be running other operating systems … just less computers!

Anyone else with any input on this?[ad#ad-1]