Thursday, June 08, 2006

Microsoft Virtual Server

Using the keyboard in a virtual machine in Virtual Server

Virtual Server 2005 provides much of the required keyboard functionality through the use of a Host key and keyboard shortcuts. By default the Host key is the right ALT key. You use the Host key in two ways:

  • If a virtual machine has captured the pointer, you can press the Host key to return control of the mouse to the host operating system.
  • You can use the Host key in combination with other keys for specific functions.

The following describes the keyboard shortcuts and the functionality that each provides.

HOST KEY+DELETE
Sends CTRL+ALT+DELETE functionality to the virtual machine operating system.
HOST KEY+C
Connects the Remote Control or VMRC to the VMRC server.
HOST KEY+A
Switches the Remote Control or VMRC to the Administrator Display.
HOST KEY+I
Displays connection information.
HOST KEY+V
Sets the virtual machine so that the guest operating system cannot be manipulated. You can only view the virtual machine window.
HOST KEY+H
Displays the control to set the Host key.
HOST KEY+ENTER
Switches the virtual machine window to full-screen display. This option is available only when you connect to a virtual machine using the VMRC client.
HOST KEY+LEFT ARROW
Switches to the previous virtual machine. This option is available only when you connect to a virtual machine using the VMRC client.
HOST KEY+RIGHT ARROW
Switches to the next virtual machine. This option is available only when you connect to a virtual machine using the VMRC client.

Special keys
Virtual Server includes menu options to send the following special keyboard shortcuts to the virtual machine:
• CTRL+ALT+DELETE
• PRINT SCREEN

Virtual Server 2005 Technical Library (TechNet) http://technet2.microsoft.com/WindowsServer/en/Library/00eb6596-14bf-4ad6-97b7-e8bcf048cd8b1033.mspx



Capture the Virtual Machine Additions Image File

The project team used the following procedure to capture the Virtual Machine Additions .iso image file to the CD/DVD drive of a virtual machine running a guest operating system.

  1. Open the Virtual Server Administration Web site.
  2. In the navigation pane, under Virtual Machines, point to Configure and then click a running virtual machine.
  3. In Configuration for the virtual machine (in the lower part of the page), click CD/DVD.
  4. Click Known image files, select VMAdditions.iso from the drop-down menu, and then click OK.
  5. On the Virtual Machine run cdrom\windows\setup.exe

Improving Virtual Server Performance - http://www.thincomputing.net/news.php?extend.1589


Switching Virtual Machines Full screen and back quickly

http://blogs.technet.com/jhoward/archive/2006/02/01/418536.aspx
So I can't admit to having written this, but I thought it was worth sharing. It's also a good example of how to use WMI to find out if a process is running, start new processes up and kill of running processes from VBScript.
Save the below as a .VBS file somewhere on your local machine. Then create a shortcut to it on your desktop and setup a keyboard quick-key access to the shortcut through the properties of the shortcut.
Assuming the virtual machine is running, you can do (assuming Z is the keystroke) type Ctrl+Alt+Z to switch between your desktop and a virtual machine. Of course, change the virtual machine name and DNS name accordingly.


strComputer = "."Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & _strComputer & "\root\cimv2")set sh = CreateObject("wscript.shell")strCmdLine = "C:\Program Files\Microsoft Virtual Server\VMRC Client\vmrc.exe"strArgs = "-fullscreen " & chr(34) & _"vmrc://localhost:5900/Contoso Client" & chr(34)
'//Determine if VMRC is running?Set colProcesses = objWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE Name = " & "'VMRC.exe'")
'//If the VMRC Process is running - Launch it, otherwise terminate it.If colProcesses.Count = 0 Thensh.Run chr(34) & strCmdLine & chr(34) & " " & strArgs,,FalseElseSet colProcessList = objWMIService.ExecQuery _("Select * from Win32_Process Where Name = 'VMRC.EXE'")For Each objProcess in colProcessListobjProcess.Terminate()NextEnd If

No comments: