Showing posts with label esx. Show all posts
Showing posts with label esx. Show all posts

Thursday, December 17, 2009

Datamation puts their angle on the big three virtualization vendors

Datamation has put their spin and opinion into the world of virtualization and the virtualization engines and offerings in this comparison of Citrix (XenServer), Microsoft (Hyper-V, SCVMM), and VMware (ESX, vCenter).

Mind you, this is a judgment article – But it mentions Kensho – a project very near to my personal efforts, and DocFinder – another product I was involved in the infancy of.

You can find the article here:

http://itmanagement.earthweb.com/features/article.php/12297_3853716_1/Virtual-Server-Comparison-Xen-vs-Microsoft-vs-VMware-2010.htm

Wednesday, July 1, 2009

Linux vm from VMware to XenServer the videos

If you have been following, you will note quite a few posts related to importing / migrating Linux virtual machines from VMware to XenServer.

I realize that many folks don’t use XenServer – but the basic steps of repairing after migration apply to Hyper-V just as well as to XenServer – the steps are the same if you want your VM to boot. However, PV enablement on Hyper-V does not exist, you just need to install the vm tools.

Here are the links in case you missed them:

I have turned three of these into short (less than 10 minutes) video presentations, just to add a bit more information than in the articles.

Wednesday, June 17, 2009

XenConvert 2.0.1 is released with VMware OVF compatibility

We have been working on adding Citrix Project Kensho OVF capabilities to XenConvert.

XenConvert is the free Citrix machine conversion utility.  It is primarily focused on converting workloads to either Provisioning Server or to XenServer, however there are some more generic functions that are of interest to most any virtualization folk.

The download can be found here:

http://www.citrix.com/English/ss/downloads/details.asp?downloadId=1855017&productId=683148

If this moves in the future go here: http://www.citrix.com/English/ss/downloads/results.asp?productID=683148 and look for XenConvert in the XenServer download section.

OVF packages from any existing VMware product (known to this date) can be consumed (imported) direct to XenServer.

The physical to OVF path can be run within a Windows machine and convert it to an OVF (meta file + .vhd) or just a vhd.

The OVF can then be consumed to XenServer with XenConvert 2 or to XenServer and / or Hyper-V in the upcoming Kensho refresh.

The VHD can, of course, be copied to any engine that uses vhd.

It also does a binary conversion of vmdk to vhd and injects a critical boot device driver that is compatible with XenServer (and works with Hyper-V).

Also, the XenServer .xva (vm backup files) can be converted to OVF.

Download and enjoy!

Thursday, April 16, 2009

Migrating Debian from VMWare ESX to XenServer

Fixing Debian virtual machines after migration
After import:  Debian boots, detects new hardware, and installs new device drivers.
The boot sequence fails at the following error: ALERT! /dev/sda1 does not exist. Dropping to a shell!
clip_image002
This is because the source host (ESX server) presents boot devices as SCSI bus devices by default and the paths have been set within the installation of Debian.
To fix the Debian boot loader:
The Grub boot loader has dropped you into the BusyBox recovery shell. At a command prompt under initramfs.
Begin by looking at the Storage tab in XenCenter and note the presentation (device path) of the virtual disk. This describes the bus that is used to present the virtual disk to the virtual machine. This information does not appear for all virtual machines, but in this case it is available so I will use it to save time attempting to discover the interface and volumes.
clip_image004
This shows that the virtual disk is on /dev/hda – this represents the first IDE interface.
I will begin by returning to the virtual machine console and listing the IDE devices.
clip_image005
Five IDE devices have been identified.
· /hda represents the disk in position 0 IDE controller 0
· /hda1 represents the first partition of the disk /hda
I am going to make an assumption that my Debian installation is on the first partition of the IDE interface. Please note that some Linux installations place the swap on first volume, so some repetition of the follow steps might be necessary to discover the proper volume.
At the command prompt I am going to mount the partition as /root.
This is safe in this case because /root was not loaded as noted by the Alert! message identifying the missing boot device.
clip_image007
Now that the file system is mounted under /root I will verify that it appears to be my Linux installation
clip_image009
Listing the contents I see \boot, \root, \etc, \bin, and so forth. All of these are directories that I expect to find at the root of a Linux installation.
I will first fix the device descriptor file /etc/fstab.
· Change to the /root/etc directory
· Open fstab in an editor
clip_image011
Note the entries that point to /dev/sda; these are the entries that we will be changing to /dev/hda since a SCSI disk controller is no longer available.
Modify the /sda entries and save the file.
clip_image013
Similar steps need to be repeated for the Grub boot loader and the device map.
Change to the /grub folder.
clip_image015
Open the menu.lst file in an editor.
*Note: This file name is menu.Lst not menu.1st
Near the end of the file are the entries that we are concerned with.
Find the boot menu options that point to the /sda device.
clip_image017
Change the entries to /hda. Then save the file.
clip_image019
The virtual machine is now ready for reboot.
Simply enter ‘reboot’ at the command prompt.
During reboot, you may notice that the boot hangs after detecting the USB Tablet device. Select <Enter> to accept the default identified mouse device.
Previously under VMware, my Debian virtual machine was running X server for a graphical desktop.
As with RedHat an error that X server failed to start. After selecting No to bypass the detailed troubleshooting screens a dialog is presented that the X server has been disabled.
clip_image024
After selecting OK you are presented with a logon prompt.
To repair the X server:
To reconfigure the X server two methods can be used:
1) Edit the file /etc/X11/xorg.conf directly
2) Allow automated reconfiguration and accept the identified devices.
To run the automated reconfiguration:
Login as root and then execute reconfiguration for the xserver package.
clip_image026
Step through the wizard and accept the automatically detected defaults.
When the wizard completes start xserver by entering startx or reboot the virtual machine.

Migrating CentOS from VMWare ESX to XenServer

Repairing CentOS virtual machines after migration

After import:  the experience of CentOS is identical to RedHat. In fact, if you watch the boot screen closely, you will notice the words “Red Hat” during the boot sequence.

I have outlined the process below.

CentOS boots, detects new hardware, and installs new device drivers. Nothing else needs to be done.

If VMware Tools was installed within the virtual machine then the following X server error will be seen.

The X Windows server will fail to start due to new video devices being detected. This is because of custom video devices and drivers that depended on the underlying VMware host. The system will prompt the user to repair the X server. If the user accepts the automated repair, X Windows will be functioning properly.

clip_image001

Selecting Yes presents diagnosis screens, that might be helpful for those proficient with Linux.

Selecting No skips the diagnosis screens and begins repairing XWindows.

clip_image002

Select Yes to begin repair.

clip_image003

Enter the password for the Root user account.

CentOS begins the process of hardware redetection and configuration of X Windows.

A new settings dialog box is presented.

clip_image004

Click OK to accept a known working configuration.

clip_image005

Acknowledge the information box.

clip_image006

Select Enter to accept the dialog that the configuration has completed.

At this time X Windows restarts and you are able to logon to the graphical desktop.

Wednesday, April 15, 2009

Migrating RedHat from VMware to XenServer

Fixing RedHat virtual machines after migration

After import: RedHat will boot, detect new hardware, and install new device drivers. Nothing else needs to be done.

If VMware Tools was installed within the virtual machine then the following X server error will be seen.

The X Windows server will fail to start due to new video devices being detected. This is because of custom video devices and drivers that depended on the underlying VMware host. The system will prompt the user to repair the X server. If the user accepts the automated repair, X Windows will be functioning properly.

clip_image001

To repair the X Server:

Selecting Yes presents diagnosis screens. Selecting No skips the diagnosis screens and goes straight to repairing XWindows.

clip_image002

Select Yes to begin repair.

clip_image003

Enter the password for the Root user account.

RedHat begins the process of detecting the hardware and devices and modifying the configuration of X windows. A new settings dialog box is presented.

clip_image004

Click OK to accept a known working configuration.

clip_image005

Acknowledge the information box.

clip_image006

Select <Enter> to accept the dialog that the configuration has completed.

At this time X server restarts and you are able to logon to the graphical desktop.

Friday, April 10, 2009

Migrating VMs between Hypervisors – the hypervisor

The key items to be aware of with migration of Linux virtual machines between hypervisors is:

1) What controller does the respective hypervisor present as the boot controller

2) How are other devices emulated (video, mouse, keyboard, NIC)

3) Are virtual machine tools installed from the source hypervisor

a. Do these present custom devices or device drivers

4) Is the Linux virtual machine using a paravirtualization aware kernel.

The most critical of these considerations in the success of being able to recover a virtual machines without reinstalling is the presentation of the disk interface. The operating system can be repaired by modifying the boot devices identified in the boot loader and in the file system table.

The presentation of the boot disk can be very different between hypervisors. This is analogous to removing a hard drive from an IDE controller and attaching it to a SCSI or ATA controller and expecting the installed operating system to boot and run properly. With a windows operating system the usual result is the Blue Screen of Death (BSOD) with a 0x0000007B error. This error is generally associated with critical boot device driver not being available for the bus the disk is on.

With Linux operating systems the issue is not a critical boot device, but rather a path to the /root partition. The most common Linux boot loader is Grub. Depending on the distribution Grub has the path to the root defined in the boot loader entry. Another item used by many Linux distributions is the File system Table or fstab. Fstab is simply a file that serves as a shortcut to the location of operating system volumes such as root, swap, var, etc. All of these entries can be edited after mounting the installation volume.

The most resilient of the operating systems to migration is RedHat. The current RedHat distributions appear to use virtual points to the disk volumes. Instead of /hda for IDE 0 or /sda for SCSI 0 I notice /VolGroup00, a more generic descriptor for the first boot disk.

Virtual machine tools may have secondary impacts and errors related to supporting applications such as XWindows or VNC Server that are running within the virtual machine. There are also downstream situations where a particular set of virtual machine tools has a negative impact on a new envirnonment (ie. The VMware tools have a negative performance impact when they run within a VM hosted on Hyper-V or XenServer).

In the case of a paravirtualized kernel the result depends on the host system being migrated to. The result could be that the VM continues to function, or the VM could fail to boot with a kernel error because the new host does not support the kernel of the previous host. This is a more complicated case and will need to be considered on a case by case basis.

Differences between hypervisors:

From a user perspective all hypervisors provide similar services – they host and run virtual machines. However, the architecture and implementation of each is very different.

Focusing on how a hypervisor presents virtual disks to a virtual machine will be the remainder of this writing. If a virtual machine cannot boot after migration, then the exercise has been considered a failure.

Hyper-V

The Hyper-V model is that the booting volume of an operating system must be installed on a virtual IDE controller. For a windows virtual machine this is what we commonly refer to as the C:\ or C:\Windows volume. In the Linux world, this is where the boot loader and the root volume reside.

Therefore, when Hyper-V is the source an IDE interface can be assumed.

VMware ESX

The ESX model has always been SCSI. All disks of a virtual machine appear to the installed operating system as residing on a SCSI controller. Historically, this presented installation challenges as some operating systems, such as Windows XP and Windows 2003, did not include a compatible SCSI driver.

Only in vSphere 4 is this model changed, to allow the option of IDE. However, in the Release Candidate the default controller is still SCSI.

XenServer

In the XenServer world the disk devices can begin to appear very strange. XenServer virtual machines can see disk devices are IDE, SCSI, or a SCSI-like controller. Much of this behavior is defined by the template that was used to create the virtual machine combined with paravirtualization awareness of the OS.

A Windows operating system will behave as if the boot device is IDE. However a Linux operating system can identify a variety of devices such as /hda, /sda, /xvda, and /QEMU.

Moving virtual Machines in practice

In practice a Windows virtual machine will move between XenServer and Hyper-V rather easily. There is usually the recognition of new devices on the receiving platform, but generally nothing that cannot be repaired, nor prevents booting the operating system.

From or to VMware was the historic problem because of the need to change from a SCSI controller to something else. For Windows operating systems this requires the injection of a critical boot device driver that supports the new platform.

Friday, March 13, 2009

Damn Small Linux as a VM for Capacity Testing a virtual managment system

Here is a little something that I did over a year ago.

My objective was to look at virtual machine management systems (such as SCVMM and Virtual Center) and to consider how many VMs they could manage.

The potential items that you can run into are many.

1) Overhead on the management system just because of the number of VMs.
2) Limits to the number of VMs on a single host.
3) Host storage

And this is without actually powering on a single VM.

Now, begin to consider performing actions on virtual machines and we get into more complexity:
1) How many VMs can a host support (the RAM implications)
2) Can we deploy more VMs than can be booted.
3) How long do the boot operations take?

And I could keep going.

When I was first challenged with this I tried to make it as simple as possible. A single VM with an operating system installed to a virtual disk (I would concern myself with PXE VMs later on). And, I only had three servers (one I needed for the management server, so I couldn't use it as a host).

I began looking at various operating systems (Windows, Linux, etc.). All failed due to the size of the virtual disk. However, I did fine one really good candidate. And there are a couple different ways that you can set it up.

This is where Damn Small Linux comes in.

By default DSL boots from an ISO, detects the hardware and runs.
The only hitch now is installing, and RAM.

In this scenario the DSL VM can be created in two different ways.

1) As many VMs sharing a common boot ISO file. (one boot ISO per host).
2) As many single VMs with unique virtual disks.

In my case I began with option 1 but later switched to option 2.

In the case of option 2, there is a special option to install DSL to the hard disk. I found that here:
http://www.damnsmalllinux.org/f/topic-3-5-18888-0.html

And, through trial and error I learned that you can set the RAM on a DSL VM as low as 24Mb of RAM and the VM would still boot. This gave me many possibilities. My requirement was that the VM was able to boot, and that it could run without crashing. The VM ran better at 36Mb of RAM and really good at 128Mb. But for density, I went to as low as I could.

What did this end up giving me?
(other than claims that - I did it!)

This gave me an environment with a virtualization manager server and 1500 virtual machines.
At the time that I did this, just the act of having that many VMs caused a great deal of overhead on the management system.

And I also learned that there was another system that only allowed 355 VMs per host (an undocumented feature) and the host would 'fall silent' as soon as you deployed VM 356 - the host didn't crash, but its internal management daemon did, and then refused to start. I rebuilt a few hosts before I narrowed down that problem.