Moving SQL server to a virtual server with VMware

Heard that SQL shouldn't be moved to a virtual server? Expert Andrew Kutz says you can, but you might lose performance. He also offers solutions for typical VMware problems and some good reading material for beginners and experts alike.

I am new to virtualization and I am responsible to move some physical servers to VMware servers. I have been told that any SQL server should not be moved to a virtual server. Being that I am new and have no idea where to start first, is there good reading material for VMware ESX Server 2.5.3? Is it complex to create and implement a VMware server? When I login to the VMware Management Interface, it warns me that no swap space is configured or active and no virtual Ethernet switches found. We purchased a Dell/EMC2 SAN and now we need to use it! Thanks for your help.

Thank for your questions!

Should you or shouldn't you virtualize SQL Server? Technically, you will have no problems doing so, but you may run into issues later when it comes to performance. You can always throw more virtual CPU and memory at SQL, but eventually the overhead of writing to virtual disk files may bite you. You can of course set up raw device mappings (RDM), but I will suggest to you what I suggest to most people: If you are configuring a RDM to get the better disk performance, and not to test virtual clusters, you may be better off going with a separate physical server with real disks. There is absolutely no reason not to run development instances of SQL server in a virtual environment, but depending on the demands of your production environment, a virtualized, production SQL server just might not score high enough on performance tests.

As for the book question, in my opinion the absolute best reading material for VMware ESX 2.5.x is Ron Oglesby's and Scott Herold's book entitled "VMware ESX Server - Advanced Technical Design Guide." Amazon currently has the book for around $30. Do not let the title fool you, this book is perfect for beginners and experts alike. As for ESX 3.0, I myself am pondering writing a book on VI3, so check back here for more information on that!

Managing ESX can be both fantastically easy and frustratingly hard. But usually, if you are frustrated, you just have not spent enough time reading the documentation, learning your storage area network (SAN), or you have not searched the VMware forums thoroughly enough. I run several ESX servers, many instances of VMware Server, a few copies of Workstation, and of all of the servers I run I worry about the VMware-related ones the least. It is just top-notch software. The best example I can give you when it comes to managing ESX is one that I use when I talk to people about Microsoft's Internet Information Server (IIS). IIS is deceivingly easy.

Almost anyone can run a web server with it. However, you can get into trouble really fast if you are not careful because IIS is one of the most powerful and configurable pieces of software there is. If you attempt to do something you are not sure of, you will almost certainly find yourself up the proverbial creek. It is the same way with ESX. VMware has produced a wonderful management interface, but I strongly recommend that you study virtualization from a technical standpoint. Learn the ESX console operating system (COS), learn a bit of networking basics, (trunking in particular). If something does go wrong you can start your diagnosis from the bottom, not the top. A good place to do in order to learn the basics of ESX 2.5.x is from VMware.com.

On to the next question. Ah, the "no swap space is active" and the "virtual ethernet switches found" errors. Let's start with the swap space error. This error appears when an ESX server does not have a VMFS-2 volume designated as VMKernel swap space. There are three possibilities: 1) the swap space was never configured, 2) the swap space was configured but it has never worked, 3) the swap space was configured and working at one point but now it is not. Without knowing more about your particular situation I will not be of much help to you. Please feel free to contact me via email at akutz@lostcreations.com. Once I know more I'll add to this answer! In the mean time you may want to check out some of VMware's own documentation regarding the VMKernel swap space.

A few notes of interest. In my experience the VMKernel swap space should general be about 1.5 to two times the amount of physical RAM on the server. This is where the ESX kernel pages the individual VMs' memory to disk. Also, the VMKernel swap space has gone the way of the Dodo in VI3 as each VM has its own swap file in its configuration directory.

As for the "no configured virtual switch" error, well, that one is usually just as plain as the error indicates. In ESX 2.5.x, there does not have to be any configured virtual switches for the system to function. This is because there is typically a network interface card (NIC) assigned exclusively to the COS. It does not even show up in the ESX Management User Interface (MUI). If you only have one NIC and it is not showing up in the MUI it is because the NIC has been assigned exclusively to the COS. You will need to run the command "vmkpcidivy" from the COS in order to share the COS NIC with the VMs; this action will require a reboot. Please see VMware's page on the vmkpcidivy command for more information.

Once a NIC appears in the MUI you can create a virtual switch. For very nice instructions on how to do just that see this VMware page.

Hope this helps! Email me if you run into any trouble!

This was first published in August 2006

Dig deeper on VMware virtualization



Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: