Official website for Linux User & Developer
FOLLOW US ON:
Nov
29

20 essential virtualization tips & techniques

by Ken Hess

These virtualization tips and techniques are presented to educate, save money and save endless Googling for answers. With luck they’ll propel your virtualization efforts forward with new momentum and with minimal frustration helping you to improve the performance, reliability and security of your virtual machines.

P2V migration and services
Before migrating a live physical system to a virtual one, disable all service on the physical system that will make significant changes to the file system’s contents. Databases, major services and logs write to the file system on a constant basis and result in a virtual machine that is inconsistent with the physical. Some disparity is expected when converting, but the differences need to be kept to a minimum. If you convert a physical machine to a virtual one using a bootable conversion disk, the physical system’s operating system is quiescent and no services need to be disabled prior to the conversion. This method is fast and efficient but requires physical access to the system being converted to a VM.

In VMware ESX/vSphere, use VMXNET type 2 or type 3 network adaptors
When creating a new Windows VM or performing a physical to virtual migration (P2V), the new VM’s network interface drivers will appear as Flexible, AMD PCNET or E1000. Unless the VM’s operating system is old (Windows NT, Windows 2000, Windows 9x) or some compelling reason dictates the use of one of these drivers, change the driver to VMXNET 2 or VMXNET 3. To switch to the VMXNET drivers, remove the existing network interface(s) and replace them with new ones. The VMXNET2 and VMXNET 3 drivers will perform more like their physical counterparts. It’s possible that the existing drivers from a P2V migration will linger on the VM, causing an IP address conflict warning to appear when entering IP address information. The old drivers migrate to the VM as hidden hardware. To remove them completely from the VM, perform the following steps:
1. Open a command prompt and enter the command:

SET DEVMGR_SHOW_NONPRESENT_DEVICES = 1 <ENTER>.

2. In the same command prompt, enter:

DEVMGMT.MSC <ENTER>.

3. Click View, Show Hidden Devices. Scroll down to Network Adapters and remove the greyed-out physical devices.

SAN formatting in VMware
When formatting SAN for use with your VMs, use the largest block size needed to accommodate the largest virtual disk file that may exist on that LUN. VMFS-3, VMFS’s current version, corresponds to the Linux ext3 file system with the same features and limitations. The largest single file size for VMFS-3 is 2TB. Refer to VMware’s block size to file size comparison chart below.

Largest file VMFS block size
256 GB          1 MB
512 GB          2 MB
1024 GB         4 MB
2048 GB         8 MB

If the correct block size isn’t chosen, then the file system limits the maximum size of a single file that can exist on that LUN. For example, a 300GB virtual disk file couldn’t exist on a LUN formatted with a 1MB block size. An error message would appear that there isn’t enough space on the device, when in fact there is ample space. Once the LUN has been formatted with an incorrect block size, the data store will have to be removed and recreated. Any data on the LUN will be destroyed.

Duplicate production network with virtual network
When migrating physical infrastructure to virtual infrastructure, the virtual design and layout should mimic the physical. Enterprise virtualisation software allows creation of virtual switches, virtual LANS (VLANS) and private networks to assist in fully comparable migrations. Analyse the physical and logical network diagrams to duplicate all pathways and traffic flows.

Install virtualisation tools/enhancements/guest additions
Guest additions contain software that improves guest (VM) performance, mouse pointer integration, display drivers and guest-to-host time synchronization utilities. Guest additions exist for most contemporary operating systems. The tools are not required, but the difference in front-end (console) VM performance and usability between those VMs with and without guest additions is noticeable.

Continue to page 3

Linux User & Developer is the magazine for the GNU Generation
Click here to try 3 issues for £1

twitter follow us
Pages: 1 2 3
  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.

    4 Comments »

    • Cristian said:

      great article, try to write more articles like this one.

    • Mimmus said:

      You wrote:
      “Second, VMware guests that have VMware guest tools installed have the option of time synchronisation with the host.”

      No! Current best practies are to disable time sync in VMware tools (counterintuitive!) and to use NTP in the guest.

    • Rich Gray said:

      “No! Current best practies are to disable time sync in VMware tools (counterintuitive!) and to use NTP in the guest.”

      This depends on the services running in the guest e.g. Dovecot will cause all kinds of headaches when you use NTP on the same guest. Not sure how many other services are as “ticky” about time. (Pun intended.)

    Trackbacks

    What's your opinion?

    Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

    Be nice. Keep it clean. Stay on topic. No spam.

    * Required fields