P2V – Step by Step Removing Physical Hardware

DevManIt’s been a while since I had to P2V a Windows server but recently I found myself on a project doing P2Vs of business critical servers, again.

FYI: The new version of VMware VM Converter works great for converting a physical Windows and Lunux server into a virtual server.

Once the conversion is completed, the new VM is online, VMtools are installed and video acceleration is set, here’s a couple more steps I learned about at a VMUG meeting that I recommend doing to finish the P2V job.

First – Remove Old Physical Hardware from the New Windows VM (picture shows “grayed” disk drives)

Step 1 -  Log into the VM

Step 2 -  Open a command prompt
-    Start > Run
-    CMD
-    Enter

Step 3 – At the prompt type: set devmgr_show_nonpresent_devices=1
-    Enter
-    Type: start devmgmt.msc
-    Enter

Step 4 – Wait for the Device Manager to open, then click on View > Show Hidden Devices
- Expand each category and search for “grayed” hardware
- Right click and click uninstall when “grayed” hardware is located
- Don’t worry about the System Devices category
- When all the hardware devices are gone, close the Device Manager and reboot

Second – Uninstall Old Hardware Specific Software

Step 1 – Log into the VM

Step 2- Start > Control Panel > Add/Remove Programs

Step 3 – Carefully find and uninstall programs from IBM/Dell/HP/other that are used for drive arrays, networking, ILO or any other similar application that is specific to the physical hardware.

Note: These items are not required now that the server hardware has been virtualized.

Done – When all the applications have been uninstalled, close the Control Panel and reboot

Q: Why do this?

A: The reason I do these steps is because over the years I’ve had to troubleshoot VMs that I found were P2V’d by someone else and not cleaned up. This normally causes poor performance and issues with ghost hardware that conflict with the virtual hardware devices, more specific – network adapters.

There – now all you need to do is make sure all your best practices are applied to the VM and it’s ready for production.

Originally posted 2009-09-19 07:22:18. Republished by Blog Post Promoter

Squeezing Virtual Machines out CPU Cores

images Are you trying to squeeze every CPU cycle out of your dual or quad core processors? Unfortunately for those who like to over-clock CPUs for gaming, over utilizing CPU doesn’t quite work the same on virtual hosts (ESX or Hyper-V).

From my experience, I know you can get anywhere from 8 – 10 vCPUs per core, but I have found a sweet spot of 4 VMs per core will provide decent performance for the user. Remember, you don’t want users waiting 30 seconds for a logon or screen refresh… Over utilizing memory will cause user frustration too.

Eric Siebert has written an excellent article on SearchNetworking.com called “Sizing server hardware” which goes into “nuts and bolts” details for sizing virtual host server hardware.

My opinion is to “Always! Always!” think of the users experience when considering your best practices. Sure 100 VMs on a host sounds good but what kind of performance will users have? I’ve had my share of complaints over slow virtual servers and believe me you don’t want users to start complaining that your (that’s right, your!) virtual servers are slow.

Rule of thumb: Keep it simple, 4 VMs per CPU core. Don’t use more than one vCPU per VM unless the application running on the virtual server requires two or unless the developer demands two and calls your boss. VMs with one vCPU run more efficient and from my experience nobody seems to notice, except for – maybe, over-clockers!

Here’s something I wrote a while back:

The measurement of a successful virtual infrastructure deployment is not how many VMs can be hosted per host, it’s how many users can be satisfactorily serviced without them knowing they are using virtual technology. Virtualization should be invisible. Once users start noticing foot prints in the snow, it’s over…”

Originally posted 2009-02-12 16:30:14. Republished by Blog Post Promoter

Virtual Machines Running or Registered on Multiple ESX Servers

Does your vCenter flicker when browsing clusters? There could be a problem…

Over the last 3 years I’ve seen this happen twice and both times it was not good. Both cases were caused from an HA event that was interrupted, which left multiple VMs registered on more than one host. Fortunately, the VM stays running and the fix does not cause an outage but it is intimidating having to “KILL” VM processes.

HA being HA might have casued it and the KB below gives more causes and the solution.

HA is a good thing to have enabled, but if your NOC is monitoring your VMs and they see an alert that VMs are powering off they will log into the VIC and start powering them back on, no down time right? That’s one of the main causes of this problem and VMware admins need to educate their NOC admins on letting HA do its job power VMs back on.

Now, the devil’s advocate in me says that sounds good but how does a NOC know it’s a VM, or bunch of VMs? And, don’t we tell then to just treat them like any other server? The devil’s advocate has a good question and I will ask for help answering it. Can I get feedback on how to avoid this issue when and event happens that might cause “VM jumpers”?

Here’s a must know process for every VMware Admin on how to fix this problem…

VMware KB Link: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005051

Here’s how VMware describes it:

  • After one of the following, a Virtual Machine appears as being registered on two ESX Servers:
    • A VMotion fails to complete correctly or times out in VirtualCenter
    • A DRS issue where virtual machines are VMotioned automatically in quick succession
    • When a machine is powered on during VMware HA failover.
    • The Service Console on an ESX host is low on memory starving the vpxa process
  • In VirtualCenter, you see the virtual machine as appearing on one ESX Server for a few seconds, then it seems to be on the other.
    The virtual machine may appear to jump back and forth among different ESX hosts.
To correct this misconfiguration:
  1. Click Inventory in the navigation bar. Expand the inventory as needed and click the appropriate managed host.
  2. Click the Virtual Machines tab.
  3. Note the virtual machine that disappears every few seconds.
  4. Log in as root with SSH to both affected ESX hosts.
  5. Run the vmware-cmd -l command to display the names of the virtual machines registered on this host.

    Run the vm-support -x command to
    show which virtual machines are currently running on the ESX host.

    Compare results from these commands to determine which ESX host has the virtual machine registered, but is not running it. When you have determined this, you need to unregister the virtual machine from the ESX host on which it is registered but not running.

     

  6. Run the following command to unregister the virtual machine from the ESX host:

    vmware-cmd -s unregister </vmfs/volumes/datastore/folder/machine>.vmx

     

  7. If the virtual machine has a process (PID) associated with it, ESX may not allow you to unregister it and the command fails with the error:

    If you see this error and are unable to unregister the virtual machine:

     

    • Kill the process for the virtual machine in the Service Console with the following two commands:
      • ps -auwwwxx | grep -i <Virtual Machine Name>
      • kill -9 <PID of the process returned from the above command>

         

    • Unregister the virtual machine from the ESX host again with the command:

      vmware-cmd -s unregister </vmfs/volumes/datastore/folder/machine>.vmx

       

    • Run the following command to stop the hostd process: 

      service mgmt-vmware stop
    • Use a text editor to open the /etc/vmware/hostd/vmInventory.xml file.
    • Locate the machine you want to remove.
    • Remove all of the information between the <ConfigEntry> tags for the affected virtual machine.
    • Run the following command to start the hostd process:

      service mgmt-vmware start

     
    VMControl error -999: Unknown error: SoapError: ServerFaultCode(0): (The attempted operation cannot be performed in the current state (Powered On).)
  8. Log in to all of your ESX Servers directly using VI Client.

    You see the virtual machine on both ESX hosts with a Powered-on status. One host however does not display any details of VMware Tools, IP address, etc in the Summary tab.

     

  9. Click the virtual machine on the host that does not display any details in the Summary tab.
  10. Right-click the virtual machine, and click Power Off.
Note: VMware recommends restarting the mgmt-vmware and vmware-vpxa processes on any hosts on which you have changed registered machines from the command line. For more information, see Restarting the Management agents on an ESX Server (1003490).

Originally posted 2009-08-10 18:56:49. Republished by Blog Post Promoter

Best Fit Virtualization Criteria Checklist

Finding servers which are the “Best Fit” canadates for virtualization can be tricky. I have put together the following criteria checklist to help determine whether a new server provision or a P2V should use virtualization.

The Best Fit checklist uses my own criteria and weight recommendations but it can be modified with more liberal values.  However, remeber the “Best Fit” for virtualizing a server should always consider the user’s experience, too liberal will produce poor performance and complaining users.

The “Best Fit” file has been attached for you to use it as-is or you can make your own.  Open file: best-fit-virtualization-criteria-checklist-vminstall

Best Fit Virtualization Criteria Checklist

Requestor: ____________________________________________ Date: ___________________

Server Name: __________________________ Server Role: ______________________________

Primary Application: ______________________________ Database: ______________________

Purpose:

The purpose of this checklist is to evaluate new server provisions for server virtualization. The checklist criteria are designed to only allow “Best Fit” usage for virtualization. A weight of 3 or more will waive the server’s provision for virtualization.

Instructions:

Each item has a weight assigned. While going down the checklist place the weight value on the line to the left of the items that apply. Once you are complete, total the weights.

Checklist:

  ____ 1. Is the primary application supported when hosted on a VMware VM? Yes/No (If no add 3 Pt.) Self explanatory.
  ____ 2. If this is a database server will clustering be required? Yes/No (If yes add 3 Pt.) Caveat: If clustering is required, high availability is hindered on the host server.
  ____ 3. Is this server considered a fail-over for a physical server? Yes/No (If yes add 3 Pt.)    Caveat: Fail-over servers should be provisioned on an equivalent platform.
  ____ 4. Can recommended system requirements be scaled back (CPU/Memory)? Yes/No     (If no then use items 5 and 6 to calculate weight.
  ____ 5. Will memory requirement be greater than 2 GB? Yes/No (If yes add 1 and .5 for each additional 512 MB)
  ____ 6. Will disk requirements grow beyond a 20 GB (C: or Root disk) and 50 GB of combined additional disk space. Yes/No   (If yes add 1 and .5 for each additional 50 GB) How much? _____GB
  ____ 7. Will this be a temporary installation/deployment?  Yes/No    How many months? _____ (If yes can Lab Manager be used?) (0 Pt.)
  ____ 8. Will a database be hosted on the server (SQL/MySQL/Oracle)? Yes/No   Other ___________ (If yes add 1 Pt.)
  ____ 9. _______________________________________________________
  ____ 10. ______________________________________________________

(           )  A server with a total 3 and greater should not be virtualized.

Evaluation Summary: _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Originally posted 2009-02-21 09:54:36. Republished by Blog Post Promoter

Google LiveAndroid OS Runs On Virtual Machine

Android Splash 

Google LiveAndroid OS Runs On Virtual Machine

With all the recent buzz going on about Google’s New Android cell phones, I thought it would be worthwhile to blog this on VMInstall.com.

If you’re a techie who likes to spend time testing which operating systems they can get to run on a VM. I found that Google has a version of its popular Android OS that is called LiveAndroid. You download the ISO then you can boot your PC from it or create a VM.

The picture shown is LiveAndroid running on VMware Player but it’s been tested on VirtualBox, too.

 LiveAndroid v0.3 – Features

  • OpenDNS added
  • Audio support
    • VirtualBox – Intel 8×0 AC97
    • VMware – Ensoniq AudioPCI 1371/1373
  • SD card support (512M)
  • Ethernet (DHCP)
  • Mouse wheel support
  • High-resolution support (800*600, 1024*768)
  • Apps added
    • Software Directory
    • AndroidVNC
    • PilotLines, Craigs Races, Super Mario
  • more net card driver added
    • Amd PCNET32 PCI
    • Broadcom 440x/47xx
    • CS89x0
    • Intel PRO/100+
    • NE2000/NE1000
    • Realtek RTL-8129/8130/8139

Browsing VMinstall.com

LiveAndroid - Browsing

LiveAndroid - Browsing VMinstall.com

 Download Your Copy

User Guide

LiveAndroid Desktop
 
LiveAndroid Desktop

LiveAndroid Desktop

Originally posted 2009-11-14 07:39:43. Republished by Blog Post Promoter

Zombie VMs Soon to be Hunted by vZombie

vzombie1Yesterday I was working on a PowerShell script for identifying VMs that are using resources but their role is no longer required. Either because the server owner decided to use a physical server because the VM was not performing as required, or the duties of the VM are completed and the decommissioning process was somehow over looked.

I came up with a concept and decided these VMs would be officially called “Zombies”. Then the name coined for my script “vZombie” was added. I was also lucky enough yesterday to register the domain vZombie.com and will be posting my script there soon.

Just think of these VMs like Zombies sucking valuable resources out of your Virtual Infrastructure. They may sit there idle but disk space (expensive SAN storage), memory and CPU are still allocated to them. I’m guessing that I’ll find maybe 5 or 10 percent of the VMs are vZombies.

 To be continued…

 The name vZombie is copyright of VMinstall.com, all rights are reserved.

Originally posted 2009-03-07 07:29:59. Republished by Blog Post Promoter

Three Ways for Extending a VM’s Disk

gparted_1_smallMost new virtual servers are provisioned from templates that have 12 to 20 GB “C” disk so what do you do when you run out of space?  Here are three methods which might work for you to increase the size of your virtual server’s disk.

  1.  Use VMconverter from VMware to clone the VM and change the size of the drive.
  2. Build a Windows 2003 VM that can be used to mount the “C” drive VMDK of the target VM as an additional drive, then use the VM setting on the tool to increase the disk size. Once the disk size is increased use the Windows “diskpart” command to grow the partition. Don’t forget to un-mount the disk from the tool.
  3. Then there’s a sweet free tool called GParted that boasts the following features:

gparted

 

 

 

 GParted also has a nice GUI as seen in the upper right and best of all, it’s free.

More about GParted:

Gnome Partition Editor

GParted is the Gnome Partition Editor application. Before attempting to use it, here is some basic background information.

A hard disk is usually subdivided into one or more partitions. These partitions are normally not re-sizable (making one smaller and the adjacent one larger). The purpose of GParted is to allow the individual to take a hard disk and change the partition organization therein, while preserving the partition contents.

GParted is an industrial-strength package for creating, destroying, resizing, moving, checking and copying partitions, and the file systems on them. This is useful for creating space for new operating systems, reorganizing disk usage, copying data residing on hard disks and mirroring one partition with another (disk imaging). See Features, before using it.

GParted uses GNU libparted to detect and manipulate devices and partition tables.

Several (optional) file system tools provide support for file systems not included in libparted.
These optional packages will be detected at runtime and do not require a rebuild of GParted.

GParted is written in C++ and uses gtkmm for its Graphical User Interface (GUI). The general approach is to keep the Graphical User Interface as simple as possible. Every attempt was made to conform to the GNOME Human Interface Guidelines.

GParted comes under the terms of the General Public License

Download link http://gparted.sourceforge.net/

Originally posted 2009-03-01 08:39:55. Republished by Blog Post Promoter

VMware VM Guest SWAP File Best Practice

VM guest swap file diagram

VM guest swap file diagram

Answering the question that always seems to get asked, “what is the best practice for the VM SWAP file?”

I have put this method through bench testing and found it to have the best performance, step by step for VM SWAP file configuration is:
  1. Set up a data store in each ESX cluster for guest SWAP files, see diagram to the right. (Do not use local ESX disks! This will save more expensive SAN storage but causes latency for DRS and vMotioning of VMs.)
  2. For each ESX host in the cluster, configure the SWAP to point to the SWAP data store.
  3. Go through all the setting on each VM in the cluster and make sure VM SWAP file are controlled by the host, not in VM folder.
  4. Here’s a step that some will disagree on but my testing has found it to produce the best VM performance, log into the Windows VM and set the SWAP file to be maintained by Windows. Some admins like to do 2.5 – 3.5 ratio for the memory but this is not a physical so let Windows adjust the SWAP file size. From what I have found it’s a 1:1 ratio.
  5. Configure 1 – 3 the same for Linux but on 4 just let Let Linux do it’s own thing. Linux uses a SWAP volume which is stored in the VM’s folder.
My test results produced:  Faster VM Booting, Better VM Performace, Faster vMotioning and DRS, Faster VM evacuation when ESX host is entering maintenance mode

Originally posted 2009-02-08 07:49:24. Republished by Blog Post Promoter