How to Install Virtual Machine Additions on a Virtual Machine in VMM

Virtual Machine Additions provide features that improve the integration and performance of a virtual machine. Virtual Machine Additions must be installed to use VMM templates and should be used when running any virtual machine. Virtual Machine Additions are not installed by default.

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

Installing Virtual Machine Additions

You can install Virtual Machine Additions through the VMM Administrator Console or by using cmdlets in the Windows PowerShell - Virtual Machine Manager command shell.

Installing By Using the VMM Administrator Console

By adding Virtual Machine Additions to your VMM Library, you can 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. For more information about refreshing the library, see the "How to Refresh a Library Share in VMM" Help topic (https://go.microsoft.com/fwlink/?LinkId=98839).

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.

For image- or template-based deployments, we recommend installing Virtual Machine Additions on the base VHD file. For information about installing Virtual Machine Additions on a virtual hard disk, see "Installing Virtual Machine Additions" in the Virtual Server 2005 Administrators Guide (https://go.microsoft.com/fwlink/?LinkId=89735).

Installing By Using Windows PowerShell

You also can install Virtual Machine Additions by using Windows PowerShell cmdlets. The following sample script installs a VMAdditions.iso file stored on a library share on a virtual machine. The virtual machine must be running and have at least one DVD drive for the installation to complete successfully.

Be sure to include error checking in your final installation script. For more information, see the Virtual Machine Manager Scripting Guide (https://go.microsoft.com/fwlink/?LinkId=99091).

# 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 Virtual Machine Additions"

}

To run this script, type the following cmdlets at a command prompt:

$vm = get-vm –Name “My VM”

C:\Scripts\Install-VMAdditions.ps1 $vm

If the virtual machine is running, the script launches the Virtual Machine Additions installer inside the guest operating system.

For more information about using Windows PowerShell to install Virtual Machine Additions, see “Sample Scripts for Managing Virtual Machines" in the Virtual Machine Manager Scripting Guide (https://go.microsoft.com/fwlink/?LinkId=99091).