Wednesday, June 21, 2006
Creating a Persistent Route
If problems accessing websistes or external services, with a system with two network cards setup up a Persistent Route.
To display existing active routes: - in a command prompt, type
Route Print
To create the Persistent Route type:
SYNTAX:
ROUTE [-f] [-p] [command [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface]
-f
Clears the routing tables of all gateway entries. If this is used in conjunction with one of the commands, the tables are cleared prior to running the command.
-p
When used with the ADD command, makes a route persistent across boots of the system. By default, routes are not preserved when the system is restarted. When used with the PRINT command, displays the list of registered persistent routes. Ignored for all other commands, which always affect the appropriate persistent routes. This option is not supported Windows'95. command
command
One of these:
PRINT Prints a route
ADD Adds a route
DELETE Deletes a route
CHANGE Modifies an existing route destination
destination
Specifies the host.
MASK
Specifies that the next parameter is the 'netmask' value.
netmask
Specifies a subnet mask value for this route entry. If not specified, it defaults to 255.255.255.255.
gateway
Specifies gateway.
interface
the interface number for the specified route.
METRIC
Specifies the metric, ie. cost for the destination.
EXAMPLE:
route add -p 192.168.1.33 MASK 255.255.255.255 134.30.254.254
Additional information:
http://www.computerhope.com/routehlp.htm#01
http://www.microsoft.com/resources/documentation/windows/xp/all
/proddocs/en-us/route.mspx?mfr=true
Thursday, June 08, 2006
Microsoft 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.
- Open the Virtual Server Administration Web site.
- In the navigation pane, under Virtual Machines, point to Configure and then click a running virtual machine.
- In Configuration for the virtual machine (in the lower part of the page), click CD/DVD.
- Click Known image files, select VMAdditions.iso from the drop-down menu, and then click OK.
- 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