Can I use Bitlocker in a Virtual Machine

May 1st, 2007

Can I use Bitlocker in a Virtual Machine

Yes, you can.  Ben Armstrong has more in his post “Using Vista BitLocker under Virtual PC - Virtual Server

Can I run Virtual PC as a service?

April 22nd, 2007

Well, strangely enough yes you can.  Marcus Thomas from ConfigureSoft has more details in the post “Running Virtual PC as a service“.

Typically you would use Virtual Server, but then you could do silly things like the The Klein bottle  :)

 

What sort of data data transfer can I expect with home grown P2V?

April 14th, 2007

This post is (one of the very few) for my own reference.

Often you will want to ghost/image the drives of a physical machine into a virtual machine.  If you are doing this you can expect:

  • To an external usb drive, about 400 meg a min or 8.5 gig in about 22 minutes
  • Gigabit networking makes a difference.  A 1.6 Gb VHD file copy will take 2:36 on Gig vs 8:51 on 100 Meg

 

Can I fix a broken differencing disk with Virtual Server and VBScript?

April 14th, 2007

Yes, you can.  Ben has more info in his post “Fixing a broken differencing disk with Virtual Server and VBScript“:

Differencing disks store a reference to their parent virtual hard disks.  If the parent virtual hard disk is moved, or renamed, the differencing disk will stop working - which will in turn stop any virtual machine that is using the differencing disk from starting up.  You can correct this problem through the Virtual Server user interface (by inspecting the differencing disk in question), or you can use a script like this:

As you can see, this script takes two command-line parameters.  The first is the name of the differencing disk, and the second is the name of the new parent virtual hard disk (note that these both need to be full paths, and not relative paths.  e.g. “C:\foo\parent.vhd” not “..\..\foo\parent.vhd”).  It then creates VHD COM objects for both, and sets the differencing disk to use the new parent disk.

Can I configuring and enabling the Virtual DHCP Server with VBScript?

April 14th, 2007

Can I configuring and enabling the Virtual DHCP Server with VBScript?

Yes, you can.  Ben has more info in his post “Configuring and enabling the Virtual DHCP Server with VBScript“:

Under Virtual Server it is possible to configure a virtual DHCP server on any virtual network.  This is handy if you are running virtual machines in a private environment and do not want to have a dedicated DHCP server.  As with everything else under Virtual Server - this can be configured with BLOCKED SCRIPT

This script configures and enables the DHCP server on the first virtual network on a server.  Some of the calls here are fairly obvious (DefaultGatewayAddress, DNSServers, WINSServers, etc…) but some are a bit more cryptic.  The three parameters for ConfigureDHCPLeaseTimes are the lease time, lease renewal time and lease rebinding time (all specified in seconds).  The ConfigureDHCPServer call takes parameters of the network address to be used, the subnet mask, the starting IP address for the DHCP server to offer, the ending IP address for the DHCP server to offer and the IP address to be used by the DHCP server.

A couple of key ‘gotchas’ to be aware of here are that the DHCP server IP address must be below the DHCP range specified.  Also the starting address for the DHCP IP range must be above the first 16 addresses of the network.

 

Can I creating and connecting a Virtual Network with VBScript?

April 14th, 2007

Yes, you can.  More information is in Ben’s post “creating-and-connecting-a-virtual-network-with-vbscript“:

Okay - so this week I have a little VBScript to create and connect a virtual network under Virtual Server.  This script asks for the name of the new virtual network, then asks the user to select a physical network adapter to connect the virtual network to, and finally creates and configures the virtual network.

A couple of interesting things to notice about this script:

  • When attaching a virtual network to a physical network adapter, you need to be able to provide the identification string for the network card.  This is a bit annoying, but you can get this information from vs.HostInfo.NetworkAdapters (which returns a collection of strings).  If you want you can also just use vs.HostInfo.NetworkAdapters(0) to connect to the first physical network adapter in the computer (yes, the collection is 0 indexed). 
  • You can’t specify anything when creating a virtual network, so you need to configure the virtual network after creating it.
  • When creating a new virtual network you need to specify the path for the new virtual network.  This is kind of odd - as all virtual networks are created in the same location, and there is no way for you to change this default location - but you can grab this path from vs.DefaultVNConfigurationPath

Is there a problem with BIOS Setting, states work and Hardware virtualization?

April 14th, 2007

Yes, sort of.  Ben has more details in his post “Hardware virtualization, BIOS settings and saved states…“:

A couple of people I know have hit this problem - so I thought I would let you all know about it.  If you have Virtual PC / Virtual Server installed on a computer, and realize that you have not enabled hardware virtualization in the computers BIOS - make sure that you do not have any virtual machines that are in a saved state before you change the BIOS setting.
 

The problem is that when hardware virtualization is enabled, Virtual PC and Virtual Server use different structures internally to the saved state file, so saved states are no longer compatible if you change this BIOS setting.

 

Can VMware and Virtual PC be installed on the same system?

April 14th, 2007

Yes, sort of.  More details in Ben’s post:  Problems with conflicting access to hardware virtualization:

Some of you have reported that if you have VMware & Virtual PC installed on the same system - you see crashes on your system.  Now, it used to be possible to do this with no problems, but that has changed recently.  The cause of this compatibility issue is actually the new hardware virtualization technology in the latest processors.  The way this functionality is designed:

  • Only one program can utilize the hardware virtualization capabilities of the processor.  The first program to access it wins, and effectively locks out other programs.
  • There is no way to detect if someone is already using the hardware virtualization capability of the processor.

Unfortunately this combines to mean that there is no real safe way, today, to run both of these programs on the same computer (if you have hardware virtualization support enabled - if you turn it off in the BIOS - everything should go back to the way it was).

Yes, sort of.  More details in Ben’s post:  Problems with conflicting access to hardware virtualization:

Some of you have reported that if you have VMware & Virtual PC installed on the same system - you see crashes on your system.  Now, it used to be possible to do this with no problems, but that has changed recently.  The cause of this compatibility issue is actually the new hardware virtualization technology in the latest processors.  The way this functionality is designed:

  • Only one program can utilize the hardware virtualization capabilities of the processor.  The first program to access it wins, and effectively locks out other programs.
  • There is no way to detect if someone is already using the hardware virtualization capability of the processor.

Unfortunately this combines to mean that there is no real safe way, today, to run both of these programs on the same computer (if you have hardware virtualization support enabled - if you turn it off in the BIOS - everything should go back to the way it was).

My Hardware Virtualization Support does not work?

April 14th, 2007

If your hardward support doesn’t appear to be working, check the following

Ben reports: On some systems, enabling hardware virtualization in the BIOS will not take effect on a system reboot.  Rather, these systems need to be completely turned off and then restarted before hardware virtualization is enabled.

 

What is the maximum size for a VHD?

April 12th, 2007

The maximum size for a VHD is 2 Terrabytes.

 You can find more information on the Microsoft Technet Page, VHD:

The maximum size for a virtual hard disk is 2,040 gigabytes (GB).

However, any virtual hard disk attached to the IDE controller cannot exceed 127 gigabytes (GB). To support a larger virtual hard disk size, attach the virtual hard disk to a SCSI adapter.

Wherever possible, you should use SCSI as they are faster.  You can also convert a virtual IDE disk to SCSI disk.

What is the password for the testdrive VHD.

April 1st, 2007

The password for the testdrive images is Evaluation1

You can download the Microsoft Windows Server 2003 R2 Enterprise Edition VHD from Microsoft Downloads

Can I extend The Windows Vista Grace Period within a Virtual Machine?

February 1st, 2007

Yes, you can.

Jeff over at the Coding Horror has more details details are in his post “Extending The Windows Vista Grace Period to 120 Days” and a snippet is below:

If you’re on the fence about the impending release of Windows Vista, I recommend trying before you buy. Every Vista DVD includes the ability to install any edition of Vista without a product key. When you install without a product key, you get an automatic 30 day evaluation period.* This probably isn’t news to anyone.

What may be news to you, however, is that you can easily extend the 30-day Windows Vista grace period to 120 days. No hacks required. This is an official, supported operation directly from Microsoft.
To extend the grace period another 30 days, simply start a command prompt as Administrator, and issue this command:

slmgr -rearm       Reboot for the change to take effect, and voila, you have 30 more days
 

* Note that this does not apply to the Enterprise edition of Vista, which only allows a 3 day grace period. The enterprise edition has an entirely different activation scheme; it uses a local volume license key server.
 

 

Can I use Monad or PowerShell with Virtual Machine Manager?

January 30th, 2007

Yes, you can.  See Jeffery’s post on “Virtual Machine Manager’s PowerShell Support” a snippet is below:

One of the cornerstone features of System Center Virtual Machine Manager (SCVMM) is PowerShell. They have built their entire GUI layered on top of PowerShell in the same way that Exchange 2007 did. A little while ago, I talked to Rakesh Malhotra (the Group Program Manager for SCVMM) about how things were going and he was very pleased with their bet on PowerShell. He talked about how their task-oriented Cmdlets provided a very user approachable scripting experience. I asked him for a few examples so he sent me a set of comparisons with VMWare’s scripting experience (the VMWare script came from their website: http://www.vmware.com/community/thread.jspa?messageID=348638&#348638 ).

Script to Disconnect Drives from Running Virtual Machines

#!/bin/bash
# http://www.vmware.com/community/thread.jspa?messageID=348638&#348638
vmwarelist=`vmware-cmd -l`                    
vmwarelist=`echo $vmwarelist | sed -e
’s/ /*/g’`        
vmwarelist=`echo $vmwarelist | sed -e
’s/.vmx/.vmx /g’`    
for vm in $vmwarelist
do
vm=`echo $vm | sed -e
’s/*/ /g’`                
vm=`echo $vm | sed -e
’s/ \//*/g’`

if [ `vmware-cmd "$vm" getstate | sed -e 's/getstate() = //'` = "on" ]
then
echo Looking @ $vm
IDEBUS=`seq 0 1`
for i in $IDEBUS;
do
echo BUS : $i
     IDEDEVICE=`seq 0 1`
for j in $IDEDEVICE;
do
         PRESENT=`vmware-cmd
“$vm” getconfig ide$i:$j.present | cut -f3 -d ” “`
        
if [ $PRESENT = "true" ]
         then
            TYPE=`vmware-cmd
“$vm” getconfig ide$i:$j.deviceType | cut -f3 -d ” “`
            
if [[ $TYPE == "atapi-cdrom" || $TYPE == "cdrom-image" ]]
            then
             echo Found CDROM on IDE$i:$j
             vmware-cmd
“$vm” disconnectdevice ide$i:$j
            fi
         fi
done
done
fi
done

 

SCVMM PowerShell

 

$vms = Get-VM | where {$_.VMState eq Running}
$vms | Get-DVDDrive | Set-DVDDrive
NoMedia
$vms | Get-FloppyDrive | Set-FloppyDrive
NoMedia


 

Take a minute and compare the 2 scripts and ask the following questions:

  1. How long did it take to write this script?
  2. Do I understand what this script is REALLY doing?
  3. How comfortable would I be changing this script and putting it on my production servers?
  4. If there is a problem in the middle of the night and the operations people need to review this script to understand what is going on, am I going to get a call?
  5. At the end of the day, is this script going to save me time and money or cost me time and money?

I think you’ll find different answers for the different scripts.

Cheers!

Jeffrey Snover [MSFT]

 

Can I convert a virtual IDE disk to SCSI disk?

January 22nd, 2007

Yes, you can.  SCSI disks perform ~20% faster under Virtual Server. 

Download the 8 page Microsoft whitepaper called “Virtual Server 2005 – IDE to SCSI Virtual Machine Migration” from Nelson Araujo. 

Note:

There is also some more info in Kris Bennett’s post “Converting an virtual IDE drive to SCSI in Virtual Server

If the disk was bootable you may have issues with boot.ini, see John Howard’s post “Boost Virtual Server Guest Performance

Are there any tips to fix broken virtual networking?

January 19th, 2007

Yes there is.  Ben has more info in his post “”Fixing broken virtual networking, a snippet is below:

Number 1: The Virtual Machine Network Services driver is installed but not enabled.  To fix this:

On a Windows XP system you’ll need to:

  1. Open the Start menu and click on Control Panel.
  2. Click on Network and Internet Connections and then Network Connections.
    If you are using classic mode you just need to double click on Network Connections.
  3. Locate your network adapter, right click on it and select Properties.
  4. Check the Virtual Machine Network Services entry and click OK.

On a Windows Vista system you’ll need to:

  1. Open the Start menu and click on Control Panel.
  2. Click on the Network and Internet and then Network and Sharing Center.
    If you are using classic mode you just need to double click on Network and Sharing Center.
  3. Click on Manage network connections, in the task list on the left side of the window.
  4. Locate your network adapter, right click on it and select Properties.
    You’ll need to approve this action.
  5. Check the Virtual Machine Network Services entry and click OK.

Number 2: The Virtual Machine Network Services driver is installed and enabled, but does not seem to be working.  To fix this you’ll need to:

  1. Follow the steps for the first solution to get to the properties display for your network adapter.
  2. Select the Virtual Machine Network Services entry, and click Uninstall.
  3. Reboot the physical computer (this step is critical)
  4. Return to the properties display for your network adapter.
  5. Click Install…
  6. Select Service and click Add…
  7. Select the Virtual Machine Network Services entry and click OK.

A 90% of cases these two processes will get virtual networking up and running

Can I convert a Dynamic Disks back to Basic Disks?

January 19th, 2007

Yes, you can.  Although this doesn’t strictly apply to virtualization, it’s a common request during testing.

Rodney Buike over at the Lazy Admin has more in hist post “Converting Dynamic Disks Back to Basic Disks“, a snippet is below:

You will need a tool from the Windows 2000 SP4 Support Tools called DskProbe. DskProbe is a sector editor tool that allows you to edit, save, and copy data on a physical hard disk.

Scroll down until you locate sector 01C0 and the third byte from the left should read 42. Along with being the answer to Life, the Universe and Everything else, it is also what identifies this as a dynamic disk.

Change this byte to 07.
 

What is the maximum number of Virtual Machines I can run?

January 19th, 2007

Ben has all the information in his post “How many virtual machines can Virtual PC run at the same time“, a modified snippet is below:

You can have up to 255 configured VMs and registered, but usually only 32 running at the same time:

Virtual PC 2004   = 32
Virtual PC 2007   = 32
Virtual Server = 64
Virtual Server R2 SP1 = 128

 

Can I gather processor information about running virtual machines?

January 16th, 2007

Yes, you can.  Ben has more details in his post “Gathering processor information about running virtual machines“, a snippet is below:

Under Virtual Server each virtual machine has access to the same processor capabilities as are present in the physical computer. This sample script uses the Virtual Server COM API to find out the processor capabilities that are currently available for a specific virtual machine.

Option Explicit

dim vs, vm

‘ Attempt to connect to Virtual Server
Set vs = CreateObject(”VirtualServer.Application”)

‘Get virtual machine object
set vm = vs.FindVirtualMachine(”A virtual machine”)

‘Display virtual machine processor information
wscript.echo “HasMMX : ” & vm.HasMMX
wscript.echo “HasSSE : ” & vm.HasSSE
wscript.echo “HasSSE2 : ” & vm.HasSSE2
wscript.echo “Has3DNow : ” & vm.Has3DNow
wscript.echo “ProcessorSpeed : ” & vm.ProcessorSpeed

As you can see you can gather information about the presence of MMX, SSE, SSE2, and 3DNow. You can also find out what speed processor is exposed to the virtual machine.
 

Can I extract the Virtual Machine Additions from Virtual PC 2004?

January 9th, 2007

Yes, you can.  Ben has more information in his post “Extracting files from the Virtual PC installer” and a snippet is below:

To get the Virtual Machine Additions from Virtual PC 2004, without having to install Virtual PC 2004.  To do this you will need to download the Virtual PC 2004 installer (from: http://www.microsoft.com/windows/virtualpc/default.mspx), unzip it, and run the following command:

msiexec /a “Microsoft Virtual PC 2004 MSDN.msi”

This will ask you to provide a directory in which to store the Virtual PC files.  Once this is completed you can find the Virtual Machine Additions under “\Program Files\Microsoft Virtual PC\Virtual Machine Additions\VMAdditions.iso” in the directory that you specified.

Note: This will even work on 64 bit host operating systems, where you cannot install Virtual PC 2004 at all

 

Does Windows 95 work with Virtual PC 2007?

January 5th, 2007

The short answer is yes.  The long answer is no, not by default and the work around is not supported.  Ben Armstrong has more details in his post “Why won’t the Virtual PC 2007 Virtual Machine Additions load on Windows 95?“.  A snippet is below:

…What does all this mean if you want to run Windows 95 on Virtual PC 2007?  The first thing to know is that it will still run, just without Virtual Machine Additions.  The next thing to know is that if you take the Virtual Machine Additions from Virtual PC 2004 and install them on Windows 95 under Virtual PC 2007, it should work.  Keep in mind that this is all unsupported.

You can still download Virtual PC 2004 from Microsoft Downloads (18.2 MB)

Is there a list of available all VHD / VPC for download?

December 14th, 2006

Yes, there is (sort of)

You can check the official VHD TestDrive website, but there is a larger list below:

  1. SQL Server 2005 TD VHD 2.4Gb
  2. Windows Server 2003 R2 TD VHD 1.4 Gb
  3. ISA Server 2006 TD VHD 1.5 Gb
  4. Exchange Server 2007 TD VHD 1.4 Gb
  5. Internet Explorer 6 Application Compatibility VPC Image, 495Mb
  6. Internet Explorer 7 Application Compatibility VPC Image, 491 Mb
  7. Visual Studio Code Orcas Beta 1 Team Suite (VPC), 5.4 Gb
  8. Visual Studio Orcas Beta 1 Team Foundation Server (VPC), 6.0 Gb
  9. Visual Studio 2005 Team System Basics Training, 5.2Gb
  10. Microsoft Dynamics CRM 3.0 VPC, 3.2Gb
  11. SCVMM Beta 2 VHD, 1.8 Gb - passport required
  12. System Centre Essentials VHD. 3.2 Gb
  13. SQL Server 2005/Exchange 2007, 3.3 Gb - passport required
  14. Microsoft Visual Studio 2005 Team Suite VHD, (rel 1.0) 3.9 Gb
  15. Microsoft Visual Studio 2005 Team Suite VHD, (rel 1.1) 2.7 Gb
  16. Microsoft Windows Vista VHD, 1.6 Gb - WGA required (rel 1.0)
  17. Microsoft Windows Vista VHD, 1.6 Gb - WGA required (rel 1.1)
  18. Office 2007 Professional VHD, 2.5 Gb - passport required
  19. Office SharePoint Server 2007 VHD, 3.7 Gb - passport required

Can I convert a VMDK to a VHD?

December 14th, 2006

Yes, you can using the tool VMDK2VHD.

Dugie has more info in his blog entry “VMware to Microsoft Virtual Machine Conversions with VMDK2VHD“.  A snippet is below:

Anyway I’ve run through a conversion and it worked a treat.  I used the ‘Dugie-thumb-in-the-air‘ guide below:

  • ‘Scrub’ the VMware Image using the first half of that very fine guide from Chris Wolf  over at SearchServerVirtualization.com
  • Use VMDK2VHD to convert the VMDK virtual disk to to a VHD
  • Create a new VMC with roughly the same hardware (IDE drives, etc, etc) in Virtual PC 2007
  • Attach your newly created and converted VHD
  • Power up you new VMC, login and wait (a few minutes) for *all* the new hardware to be detected
  • I clicked cancel to the new hardware driver wizard
  • I also clicked no to the reboot - hey livin on the edge here
  • Install the Virtual Machine additions (v13.724)
  • Reboot
  • Let the hardware wizard run
  • Tada!

Also refer to the post “Can I import VMware Virtual Machines into Virtual PC or Virtual Server?