What is VDI?

Virtual desktop infrastructure or VDI is a computing model that adds a layer of virtualization between the server and the desktop PCs.

VMware describes Virtual Desktop Infrastructure (VDI) as delivering desktops from the data center. In other words, VDI is where enterprise desktop computers are virtualized, moved to the data center, then presented over the LAN or WAN to the end users. Once VDI is used, typically the end user devices are replaced with thin-client devices.  I’ve worked with some thinclient devices such as the HP T5740
While VMware has a VDI product called VDM (Virtual Desktop Manager), VDI is not a product exclusive to VMware. Other VDI vendors include Citrix XenDesktop & Kidaro (now owned by Microsoft).

With VDI, virtual desktops are served by enterprise virtualization servers running products like VMware ESX, Microsoft Hyper-V, and Xen Server. With the addition of the VDI products, these desktops can be dynamically created, pooled & shared, or even accessed from a GUI menu, over a web page.

Here is a nice infographic regarding what it will take for VDI to take off.

References:
http://en.wikipedia.org/wiki/Desktop_virtualization

Install Just VHDMount Tools from Microsoft

I decided to take a backup of a system I had made in Acronis and convert it to a Microsoft VirtualPC VHD. I then wanted to explore this VHD and mount it as a drive on my system across the network all from a Server 2003 system. Windows 7/2008 have VHD Mount capability natively in the Disk Management Utility (diskmgmt.msc):

width=635
Disk Management Utility – VHD Tools

Since Server 2003 doesn’t have this natively, but Virtual Server 2005 SP1 does have this tool, you can install VHDMount standalone.
First, download Virtual Server 2005 R2 SP1: http://www.microsoft.com/en-us/download/details.aspx?id=2994
During installation, choose Custom and only install VHDMount.
After installation is completed, you will find VHDMount tools located in C:Program FilesMicrosoft Virtual ServerVHDMount directory.
For additional information on how to use VHDMount, see Microsoft’s TechNET article: http://technet.microsoft.com/en-us/library/cc708295(v=ws.10).aspx

A few notes on Guest Virtual Machine Memory Ballooning

Looking over some of my Windows 2008 R2 servers, I notice via Task Manager that their memory is 90%+ quite often.

Using Sysinternal’s RAMMap tool, I can quickly identify if this is due to ballooning.

Here’s a screenshot showing that 2.2GB of RAM is driver-locked (e.g., ballooned using the VMware Tools driver vmmemctl).

Using vSphere Client, I check to see the performance of this VM to confirm if this is ballooned memory and what the actual memory usage is currently.

You can see that it is indeed ballooning nearly 2GB of RAM on this VM and the Guest VM is actively using only a little over 1GB of RAM.

To control how much memory the VM will balloon, you can set sched.mem.maxmemctl parameter in the virtual machine’s .vmx configuration file. (Reference: VMware KB1003586MSDN Lock Pages in Memory VirtualLock)

The above KB mentioned is a good starting point for assisting troubleshooting Guest VMs that pin pages in memory (Lock Pages – using SQL with LPIM enabled?).

Enable Hyperthreading or 2nd CPU in Windows XP

I came across this on a VM the other morning. It seemed that assigned the VM 2vCPU and then installing XP Professional didn’t install the correct HAL/Kernel. I’m not sure why, but here’s how I noticed the problem and how I fixed it.

I first noticed the issue when it was reported that in Task Manager the CPU graph only had one CPU showing. In the View -> CPU History menu, there was only one option to show the single CPU. I checked device manager next and noted that there were in fact 2 CPUs recognized by Windows under Processors category. I then checked My Computer -> Properties and it only reported 1 E7540 @ 2.00GHz CPU. Hmmmm. I next checked the HAL by looking at Device Manager -> Computer and seeing that ACPI was installed but not ACPI Multiprocessor!

To change to ACPI Multiprocessor, you can right-click on the ACPI and choose Update Driver and it would list whichever drivers are installed. Here are some of the options that would be available (if installed):


Standard PC, Non-ACPI PIC HAL (Hal.dll)

  • Standard PC

MPS Uniprocessor PC, Non-ACPI APIC UP HAL (Halapic.dll)

  • Standard PC
  • MPS Uniprocessor
  • MPS Multiprocessor

MPS Multiprocessor PC, Non-ACPI APIC MP HAL (Halmps.dll)

  • Standard PC
  • MPS Multiprocessor

Advanced Configuration and Power Interface (ACPI) PC, ACPI PIC HAL (Halacpi.dll)

  • Standard PC
  • Advanced Configuration and Power Interface (ACPI) PC

ACPI Uniprocessor PC, ACPI APIC UP HAL (Halaacpi.dll)

  • Standard PC
  • Advanced Configuration and Power Interface (ACPI) PC
  • ACPI Uniprocessor
  • ACPI Multiprocessor

ACPI Multiprocessor PC, ACPI APIC MP HAL (Halmacpi.dll)

  • Standard PC
  • Advanced Configuration and Power Interface (ACPI) PC
  • ACPI Multiprocessor
  • MPS Multiprocessor

Well, I didn’t have any of those. So I knew Windows wasn’t installed, seemingly, with the support for Multiprocessor, etc.

Here’s how I corrected the problem.

I attached an XP Professional ISO to the VM and then from within the VM, I launched a command prompt and changed to the CD-ROM directory (in my case, D:):

cd /d d:

I expanded ntkrnlmp.ex_ and halmacpi.dl_ to c:windowssystem32:

d:>expand i386ntkrnlmp.exe_ c:windowssystem32ntkrnlmp.exe
d:>expand i386halmacpi.dl_ c:windowssystem32halmacpi.dll

Next, I modified boot.ini to specify the kernel and hal to load:

d:>attrib -r c:boot.ini
d:>edit c:boot.ini

I appended the following to the boot line:

/kernel=ntkrnlmp.exe /hal=halmacpi.dll

So the entire line looks like this now:

multi(0)disk(0)rdisk(0)partition(1)WINDOWS=Microsoft Windows XP Professional /fastdetect /noexecute=optin /kernel=ntkrnlmp.exe /hal=halmacpi.dll

Make sure you don’t make any typos or you will not be booting and you’ll have to fix your boot.ini through other methods.

After saving boot.ini, I made it read-only again:

d:>attrib +r c:boot.ini

Then I rebooted.

Voila. Now I see both vCPUs in Task Manager and My Computer Properties and today is a good day.

This is the first VM I came across with this problem and I have to believe it was because it was installed when there was only 1vCPU configured for it.

Get VM Extra Configuration Details

Add-PSSnapin VMware.vimautomation.core
Connect-VIServer -server 10.10.10.1 -user "user" -password "luser"
(get-vm -name "ZEUS").extensiondata.config.extraconfig | sort key | format-table

Example Output

Key                            Value                          DynamicType                    DynamicProperty
---                            -----                          -----------                    ---------------
ethernet0.pciSlotNumber        32
evcCompatibilityMode           true
guestCPUID.0                   0000000b756e65476c65746e496...
guestCPUID.1                   000106a400010800809822010fe...
guestCPUID.80000001            000000000000000000000001281...
hostCPUID.0                    0000000b756e65476c65746e496...
hostCPUID.1                    000206e60020080000bce3bdbfe...
hostCPUID.80000001             000000000000000000000001281...
nvram                          ZEUS.nvram
pciBridge0.pciSlotNumber       17
pciBridge0.present             true
pciBridge4.functions           8
pciBridge4.pciSlotNumber       21
pciBridge4.present             true
pciBridge4.virtualDev          pcieRootPort
pciBridge5.functions           8
pciBridge5.pciSlotNumber       22
pciBridge5.present             true
pciBridge5.virtualDev          pcieRootPort
pciBridge6.functions           8
pciBridge6.pciSlotNumber       23
pciBridge6.present             true
pciBridge6.virtualDev          pcieRootPort
pciBridge7.functions           8
pciBridge7.pciSlotNumber       24
pciBridge7.present             true
pciBridge7.virtualDev          pcieRootPort
replay.supported               false
sched.swap.derivedName         /vmfs/volumes/500d986f-e408...
scsi0.pciSlotNumber            160
scsi0.sasWWID                  50 05 05 65 7f 15 c3 70
scsi0:0.redo
scsi0:1.ctkEnabled             false
scsi0:1.redo
snapshot.action                keep
userCPUID.0                    0000000b756e65476c65746e496...
userCPUID.1                    000206e600200800009822010fe...
userCPUID.80000001             000000000000000000000001281...
virtualHW.productCompatibility hosted
vmci0.pciSlotNumber            33
vmotion.checkpointFBSize       4194304
vmware.tools.installstate      none
vmware.tools.internalversion   0
vmware.tools.lastInstallStatus unknown
vmware.tools.requiredversion   8300