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

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

VMware Infrastructure 3 Demo Video by VMware

This video shows a demo of VI 3 which is an older version of VI but the video demonstrates most of the features of VI such as: VirtualCenter, HA, DRS, vMotion which are included in VI 3.5.

Originally posted 2008-12-20 08:31:27. 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

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

Free VM Tool – ToutVirtual VirtualIQ Pro – Citrix, Microsoft, Novell, Oracle and/or VMware

Free VM Tool – ToutVirtual VirtualIQ Pro – Citrix, Microsoft, Novell, Oracle and/or VMware >>> Download <<<

Last week I wrote about Trilead VM Explorer for managing VMware ESX and 3i hosts without vCenter, today I am writing about VirtualIQ Pro which looks like a similar product except VirtualIQ Pro is hypervisor-agnostic supporting both Type I and Type II hypervisors.virtualiq

Here’s what ToutVirtual says about their VirtualIQ Pro:

Enterprise Benefits

  • Compare and choose the right Hypervisor
  • Compare and choose the right Hardware platform
  • Plan for Host Capacity
  • Plan for Virtual Machine Capacity
  • Plan for Virtual Machine Density
  • Understand the Impact of Hypervisor
  • Get Visibility into Inter-VM, Intra-VM Resouce Dynamics
  • Manage Physical and Virtual Servers
  • Works without VMware VirtualCenter, Microsoft Virtual Machine Manager or System Center
  • Manage 5 CPUs and 25 VMs for FREE

Of course the free version has its limitations but there’s plenty going on in VirtualIQ Pro that makes it worth an evaluation, especially if you use more than one virtual platform: 

  • VMware ESX
  • VMware ESXi
  • VMware Server on Windows
  • VMware Server on Linux
  • VMware GSX Server on Windows
  • VMware GSX Server on Linux
  • Microsoft Windows Server 2008 Hyper-V
  • Microsoft Virtual Server 2005 R2
  • Xen running on Novell SUSE Enterprise 10
  • Oracle VM
  • Citrix XenServer

Wow!

Originally posted 2009-04-05 17:57:18. Republished by Blog Post Promoter

Not Ready for vSphere

I’m not sure if anyone else feels the way I do about jumping on the vSphere bandwagon, however, I’ve decided to wait until 4.0 Update 1 is released before I consider the move.

I’ve seen the sales pitches and demos but no evidence is enough to convince me to join the rush to upgrade, especially when I (and the guys I work with) have nearly 1000 VMs online running happy on ESX 3.5U4.

We’ve gone through major pains to establish a single standard for hardware, software and storage which is guaranteed to provide a high level of performance and stability that will meet our business needs and SLA. Actually, I recommend establishing your own standard before upgrading, too. What’s the hurry?

VMware for me is not a fad but a technology that needs to be taken serious, or as history has shown - outages will occur that will take down mission critical VM servers that are running business critical applications. No thanks, I’ll let the fadsters (production beta testers)  jump the gun and wait until VMware releases update 1 to fix the new release problems.

What has been your experience with vSphere, good or bad – please share it with us?

Originally posted 2009-08-09 12:47:28. Republished by Blog Post Promoter

Great Websites and Blogs for VMware and other Virtualization Support

Today I did a Google search to see how many people like myself have started a blog or website to discuss or support virtualization (VMware, Hyper-V, Virtual Iron, etc). I was surprised to find so many cool websites with catchy names.

 

Take this name for example: www.vmwarewolf.com. Visiting the site I found quite a few posts on troubleshooting VMware, especially ESX. Lots of information on the old “ESX random disconnect from VirtualCenter” issue.

 

At the top of the Google search list was VMware’s own support community. If you support VMware Virtual Infrastructure and you haven’t visited the community yet, you are missing out. Here’s the link, go there now! Then come back and finish reading this post. http://communities.vmware.com/community/vmtn/suggest/support

 

One of my old favorites is www.VMGuru.com. I remember when this site was just taking off. The owner, Scott Herold, even wrote one of the first ‘worth a darn books” on Virtual Infrastructure. I must have downloaded the free chapters 10 times. Now you can download the whole book, but don’t be a cheap-skate, buy Scott, Ron and Mike book. VMguru.com has quite a few posting on every subject relating to VMware VI, such as platform, networking, storage, management and monitoring, VDI and scripting. Don’t just take my word for it go and visit www.VMGuru.com now then come back and finish reading my post.

 

OK, one site that I have really found useful over the years has been http://blog.scottlowe.org. I have watched this site grow in popularity and mature with every new version of ESX server. I think I might have run into Scott once at VMWorld 2007 in San Francisco, he was standing along the side where the computers for folks to check their email are and blogging away about what was going on at VMWorld. I think that was right after he got a new gig writing articles. If you can’t find what you are looking for on VMware support site, make sure you visit http://blog.scottlowe.org. Scott keeps up with almost every trend and product VMware related, or you will find a link to where you can find help. You go Scott! BTW, Don’t go visit Scott’s blog yet, or you will never finish reading my post.

 

This website, www.vminstall.com has been around since 2007. During that time I was supporting a new VMware Virtual Infrastructure deployment for Arizona State University. One day I happened to visit Godaddy.com and did a name search and lucky me, www.vminstall.com was available. VM Install has been through some changes over its existence as I’ve tried to keep it going with various types content. The original site was done in Drupal, and then last year I got rid of Drupal and the crazy job posting and re-did the site in WordPress with a clean professional template. I know some of my posts are old but they keep visitors coming for now. Heck, I’ve given up on trying to keep up with all the “techies” and now I just blog about niche things I figure will make system administrator or IT Managers think before making a mess of their virtual environment. Okay, I’m done talking about my website, VM Install.

 

A relatively new website that I have found while searching VMware problems is VMETC.com. It has a green and white template and a big presence on the web because so many people are linking to the RSS feeds. Don’t get me wrong, the owner of this site, Rich Brambley, whom I’ve never met, really knows his stuff. You go Rich, and by the way, the picture of you and your kids at the Falcon game is great. Too bad the Cards had to take them out in the play-offs, maybe next season, eh? VMECT.com is packed with posts with command line examples and solutions for all kinds of technical stuff, take this link title for instance: http://vmetc.com/2009/01/19/esxiesx-35-update-3-iscsi-and-fc-alert-queue-for-device-has-been-blocked/. Didn’t I tell you Rich knows his stuff?  

 

There are plenty more good websites, but two final sites I want to mention are www.wmware-land.com and www.VMtoday.com. VMware-Land is the place to go to find out who the “who’s” are in VMware blogging, plus there also hundreds of links to help you find what you’re looking for. Unfortunately, VMinstall.com hasn’t made it to his top ten list yet but that’s okay, just do a search on Google for “VM install”. Here’s the list borrowed from VMware-Land:

 

(1)   Yellow Bricks (Duncan Epping) – 9

(2)   Blog.scottlowe.org (Scott Lowe) – 2

(3) Mike D’s Virtualization Blog (Mike DePetrillo) – New

(4) NTPro.nl (Eric Sloof) – 6

(5) SearchServerVirtualization Blog (Various) – 3

(6) Virtualization Pro (Various) – 4

(7) VM /ETC (Rich Brambley) – 5

(8) RTFM Education (Mike Laverick) – 1

(9) Rational Survivability (Christofer Hoff) – 8

(10) Virtual Geek (Chad Sakac) – New

 

Note: Find more top ten list at http://vmware-land.com/Top_10_Lists.html

 

The other site is www.VMToday.com. VMtoday is a clean VMware News, Views, and How-To’s website, which for a moment I thought I was looking at my own site because the site has so much in-common with VMinstall.com. Jashua Townsend the site owner has good taste and you will find VMtoday informative. 

 

Summing up this blog post about some of the fantastic websites and blogs for VMware support and virtualization, I just want to ask all the webmasters mentioned above to keep up the great work. I’m just one of thousands who visit your site regularly for help and I don’t know what I’d do without you. Now can someone please tell me how to join my VMware VirtualCenter 2.5 to Microsoft Virtual Machine Manager (VMM), just kidding!

Originally posted 2009-02-07 09:29:44. Republished by Blog Post Promoter