12 Sept 2011

Installing Virtual Server VM Additions on Windows Server 2008 & Windows Vista

Virtual Machine Additions adds the following enhancements to a guest operating system:

  • Improved mouse cursor tracking and control
  • Greatly improved overall performance
  • Virtual machine heartbeat generator
  • Optional time synchronization with the clock of the physical computer

You can use several methods to install the VM Additions:

  • Through the Virtual Server administrative website
  • Through VMRC Plus
  • Unattended installation
  • Through scripting

Additionally, if you've got Microsoft System Center Virtual Machine Manager (SCVMM) installed, you can also:

  • Install the VM Additions from the VMM console
  • Use PowerShell

Let's see how each method is carried on:

Using VMRC Plus to Install the VM Additions

If you've got VMRC Plus installed you can easily install VM Additions by performing these steps:


  1. In the VMRC Plus console, point to the virtual machine you want to install the VM Additions on, and then double-click it to turn it on.
  2. Once the virtual machine has started, point to the virtual machine name, and then double-click it to remote control it.
  3. Log on to the virtual machine as an administrator or member of the Administrators group.
  4. Once the guest operating system is loaded, in the Console Manager window click Media > Install Current VM Additions.
  5. Inside the VM, follow the prompts and perform the installation.
  6. You must reboot the guest virtual machine in order for the VM Additions to function properly.

Using the Virtual Server administrative website to Install the VM Additions

To install Virtual Machine Additions through the Virtual Server administrative website please follow these steps:

  1. Open the Virtual Server Administration website.
  2. In the navigation pane, under Virtual Machines, point to Configure and then click the appropriate virtual machine.
  3. In Status, point to the virtual machine name, and then click Turn On.
  4. Once the virtual machine has started, point to the virtual machine name, and then click Remote Control.
  5. Log on to the virtual machine as an administrator or member of the Administrators group.
  6. Once the guest operating system is loaded, press the HOST KEY to release the mouse pointer, and then in the lower-left corner under Navigation, click Configure virtual_machine_name, where virtual_machine_name is the name of the VM you wish to install the VM Additions on.
  7. In Configuration, click Virtual Machine Additions, click Install Virtual Machine Additions, and then click OK.
  8. Under Status, point to the virtual machine name, and then click Remote Control.
  9. Click in the Remote Control window to return to the guest operating system. The Virtual Machine Additions installation wizard will start. Proceed through the wizard.
  10. Once the wizard is complete, you will be prompted to restart the virtual machine to complete the installation.

Using Unattended Installation to Install the VM Additions

To perform an unattended installation, place the Virtual Machine Additions image file (.ISO) to a location where it can be accessed by the virtual machines. Logon to the VM and in a command prompt window from within the VM type the following command:

setup.exe -s -v"/qn [Reboot=ReallySuppress]"

Using Scripted Installation to Install the VM Additions

The script to install Virtual Machine Additions in a running guest OS is fairly straightforward, but for a good scripting guide I suggest you look at Desmond Lee's excellent article:

Using the SCVMM Administrator Console to Install the VM Additions

First, it is recommended that you add the Virtual Machine Additions to your VMM Library. This will allow you to use the same ISO image for all of your virtual machines.

To add Virtual Machine Additions to your VMM Library:

  1. Copy the VMAdditions.iso file to a share in the Virtual Machine Manager library and then refresh the library server. The default location is C:'Program Files'Microsoft Virtual Server'Virtual Machine Additions.
  2. If you do not see the VMAdditions ISO file in Library view or when you browse for a known image file, disable any filters and manually refresh the library.

To install Virtual Machine Additions on an existing virtual machine:

  1. In Virtual Machines view, right-click the virtual machine on which you want to install Virtual Machine Additions, and then click Properties
  2. In the Virtual Machine Properties dialog box, display the Hardware Configuration tab.
  3. If there is no DVD drive, add a DVD drive to the IDE device by clicking DVD on the New menu bar to add one.
  4. Click Known image file, click Browse to open the Select ISO dialog box, click the VMAdditions.iso file, and then click OK
  5. Start the virtual machine. Virtual Machine Additions will install from within the running virtual machine.

Using SCVMM and PowerShell to Install the VM Additions

Coming from this blog - VMM Beta 2: Installing VM Additions:

Here is a PowerShell script you can run on the VMM server that will do that. It assumes that you have an ISO called VMAdditions.iso in a library share managed by VMM. The VM Additions are installed with Virtual Server 2005 R2 SP1 in the <yourinstalldrive>'Program Files'Microsoft Virtual Server'Virtual Machine Additions folder. So you first either copy this ISO to the library for use on all VMs, or modify the script to use the copy local to the host your VM is on.

Copy the following text and save it as Install-VMAdditions.ps1:

 # Install-VMAdditions.ps1 $vm = $args[0] if ($vm.Status -eq 'Running' ) { $vmadditions = get-iso | where { $_.Name –eq 'VMAdditions' } Set-VirtualDVDDrive –VirtualDVDDrive $vm.VirtualDVDDrives[0] -Link –ISO $vmadditions } else { write-host "The VM must be Running before you can install VM Additions." }

To use this script:

$vm = get-vm –Name "My VM" C:'Scripts'Install-VMAdditions.ps1 $vm

The VM Additions installer will launch automatically inside the guest OS.

Notes:

  • The VM does not need to be running order to attach an ISO to a Virtual DVD drive, but the VM does need to be running in order to install VM Additions.
  • On the Set-VirtualDVDDrive lines, the –Link¬ parameter means: Point to the ISO inside the library instead of copying it to the host.

Reinstalling Virtual Machine Additions for use with Virtual PC

If you move a virtual machine that was created with Microsoft Virtual PC to Virtual Server, we recommend that you reinstall Virtual Machine Additions, even if it was installed in Virtual PC. This is because the version of Virtual Machine Additions included with Virtual Server has been updated.

Current VM Addition versions are:

  • VM Additions in VS 2005 R2 SP1 = 13.813
  • VM Additions in VPC 2007= 13.803

No comments:

Post a Comment