James O'Neill's Blog

May 30, 2008

A little bit of Microsoft Honesty.

Filed under: Music and Media,Windows Vista — jamesone111 @ 10:39 pm

image  I like Vista. And I like the fact that with Ultimate I can have a 64-bit, domain joined , Tablet enabled, Media Center PC. (IN XP these were 4 products). I like media-center.  But one aspect of media centre drives me nuts, and that’s its determination to keep a ton of free space and to over estimate the space it takes for any given recording. I wanted to record 2 hours of a movie tonight which would have taken about 2.5GB of space.I have 8.2GB free and Media center wouldn’t record. By the time I’d shifted some recordings off the PC the start of the show had come and gone

This evening I had two problems. I  suspect because Media Center brought the machine out of sleep to record something yesterday when it was in the car and the TV stick was disconnected, the Windows Media Center Receiver Service got stuck. The symptoms of this are that the Media Center program believes there is no tuner attached. I had to kill several things before finding it was the service and along the way I  killed the "E-home tray applet" which media center uses to tell me when what it’s up to.

So when I tried to start a recording manually, the message box on the left appeared. I have to admire whichever of my Redmond colleagues put this message in. What I’m curious about is everywhere else "Center" is written with an ER as in US English. Here it’s written with an RE as in British English. I preferred this to "General Failure, Error 4096 has occurred" style messages but  somehow I doubt if it’s a trend.

This post originally appeared on my technet blog.

May 29, 2008

Off topic. The Cost of fuel, market forces and being green

Filed under: General musings,Mobility,Working at Microsoft — jamesone111 @ 2:39 pm

Part of my salary package working at Microsoft UK is a company car, for which Microsoft buys the fuel. I can opt out of this scheme and take money instead (which is taxed like any other Salary payment) and the Tax office also works out the notional value of the car and fuel (both are based on the C02 emissions of the car)- the critical thing is that this doesn’t change with the amount of fuel I use, or the price of fuel. In effect the cost of fuel to me is fixed however many miles I do; which gives me a financial incentive to use the car rather than greener forms of transport. It also takes away any financial incentive I have to work from home and when I do it is based on productivity and work/life balance (if anything is going to hinder my getting the job done, better that it’s my son asking what I’m doing on the computer than the hubbub in our hotdesk pens)

Last night on the way home I stood idly calculating the price of fuel per (imperial) Gallon, we’ve been buying fuel in litres in the Britain for 20 years now but we still think of fuel consumption in miles per gallon, like my grandmother converting prices into Shillings to the day she died (10 years after currency went decimal) we still go back to pricing in Gallons. The little display on the pump last night said 132.9 pence per litre; as the displays ticked round to  64 litres and £85, I tried to multiply 132.9 by 4.54 to get price per Gallon. "Call it 4/3 x 4.5 … thats £6 a gallon !"… " now without the rounding is that just over or just under ?" Queuing to pay I got my phone out and used the calculator £6.03. For readers in the US, your gallons (and pints) are 20% smaller than ours,and with the pound at $1.97 that makes UK diesel abut $9.50 per US Gallon (Petrol/Gasoline is about 10% cheaper)

For the at least the last 10 years, governments have been raising the cost of fuel above the rate of inflation to try to encourage us to use less of it. (I don’t want to get into party politics here, I think the Conservatives started it and Labour thought it was a good idea and continued the policy). There are now differential rates of Vehicle Excise Duty on based on emissions. Those who think of their fuel in gallons remember when this flat rate tax was called the "Road-Fund licence" but for years governments have been using fuel and VED as a way of raising money to pay for anything but roads. I’ve heard politicians from all the main parties arguing for huge rates of VED for the most polluting cars. Since I have a "clean-diesel" which does about 50 Miles to the Gallon it doesn’t affect me, and in any event as a company car driver I’m insulated from rates of VED, so I have no particular interest to turn me against such a plan. But  like calling for extra taxes on "The rich", it’s easy politically: if you hit people at one extreme you don’t hit the other 95% of people who might vote for you. It doesn’t take a mathematical genius to see that someone whose car only does 20 Miles per gallon but only drives 40 Miles a week, uses less fuel than someone whose car does 50 to the Gallon but drives 400. Should they pay tax on fuel used or on their vehicle’s potential to pollute ? Increasing the cost of owning an inefficient car might result in some of them being scrapped early – which takes money out of the economy, and results in more demand to manufacture new cars – a process which also uses a lot of energy.  Logic would say scrap VED entirely and raise the same amount of tax from extra fuel duty. Those who use less fuel than average would be better off, those who use more would be worse off. The whole government bureaucracy dealing with VED could be scrapped (saving more money) and the VED tax disk could be replaced with something issued the car’s insurers to show it’s paperwork was all in order.  The political problem with such a policy is that everybody sees their fuel price go up and has to pay more every week, reminding them the government has done something unpleasant.

The key, of course, is to find ways to make fewer journeys. and to use more efficient forms of transport for the ones we do make. As someone wrote
"Here in my Car,
I feel Safest of all,
I can lock all  my doors,
it’s the only way to live,
In cars"

Of course he it might not have scanned so well to say "I can pick my nose" , "I can shout at the radio" , "I can listen to music without headphones" , "I can set the temperature to what I want" etc. Some of us might be priced out of our cars and into using car-shares or public transport. But if we didn’t all go to the office every day, the office could be smaller and the saved Journeys would save money, time and pollution. Think of that next time you curse the traffic or the cost of filling up.

This post originally appeared on my technet blog.

Surprise of the day: In praise of McDonalds

Filed under: General musings,Mobility — jamesone111 @ 2:17 pm

I’m working from home today – not so much to be green but I had a routine appointment with my Doctor late in the morning and it just made more sense. Because it’s half term I’m also minding my daughter so she ended up coming with me to the Doctor’s and on the way  home we popped into McDonalds to grab lunch. We’re only occasional visitors there (I’m not anti McDonalds – actually I think they get an unfairly bad press – but I’m no fan of theirs either). So it came as news to me so see leaflets proclaiming FREE wireless.  I know they’ve had Wi-Fi for a while but it had always been an access point for BT’s chargeable service.  Now, working with TheCloud they’ve gone free

I noticed that the Oxford branch of Pie Minister (good name, shame the company web site seems to be a broken flash app) was advertising free WiFI, which is great but (with every respect to them) insignificant, but most towns have McDonalds, and a huge number of people visit McDonalds, even if like me it’s only once every few weeks. If McDonalds give me FREE WI-FI when I’m only spending £1 on a Coffee, it becomes harder for a hotel to charge me £10 for it when I’m paying them £200 to sleep there. Come to that I’ll expect it for free when I’m spending £3 on a Coffee in Starbucks – who pioneered setting Coffee with the web.

When Broadband costs the same as a daily newspaper is it unrealistic to expect broadband access provided in the same places which put out the days papers ?

(And a note to hotels. Free internet in the lobby, with free papers, chargable in the room – like the delivered morning paper might work).

 

Technorati Tags: ,

This post originally appeared on my technet blog.

May 28, 2008

Server 2008 Drives and GUIDs

Filed under: Virtualization,Windows Server,Windows Server 2008 — jamesone111 @ 3:30 pm

One of the questions I’ve been asked a few times is what happens if I want to have lots of disk-volumes on my server – for example I want 50 VMs each with their own volume – I’m going to run out of drive letters. For some time we have been able to use Mount Points where for example a disk is mounted into c:\users – which is not the same as the rest of C:. Server 2008 also exposes disks by GUID and I wanted to show a couple of examples, so which I’ve done using my memory stick. Normally I’d have a drive letter for my memory stick but if I go into Disk Management I can remove its drive letter and/or mount it into a folder. The MountVol Utility returns the following information.

    Possible values for VolumeName along with current mount points are: 

        \\?\Volume{d1f72a03-d43a-11dc-8bf1-806e6f6e6963}\
            C:\

 

        \\?\Volume{d1f72a06-d43a-11dc-8bf1-806e6f6e6963}\
            D:\

 

        \\?\Volume{2d018576-d3f9-11dc-9f13-0019b97a962e}\
            C:\temp\Kingston\

I can remove the mount point in MountVol with "mountvol c:\temp\kingston /d" (I can add it back in again with mountvol "c:\temp\kingston"  \\?\Volume{2d018576-d3f9-11dc-9f13-0019b97a962e}\.

If I want to assign a letter to it, the syntax would be mountvol "E:\"  "\\?\Volume{2d018576-d3f9-11dc-9f13-0019b97a962e}\"   ).

guid

If I remove the all mount points and drive letters then I get this in MountVol

    \\?\Volume{2d018576-d3f9-11dc-9f13-0019b97a962e}\ 

        *** NO MOUNT POINTS ***

Either way I can use the device ID in the path for a VHD file in hyper-V (as I understand it clustering is the same – although I haven’t checked this)

You can get the information from WMI as well. Here’s a quick line of  powershell to get and format it.

    get-wmiobject -class "Win32_volume"  | format-table -autosize name, caption, deviceid 

    name              deviceid
    ----              --------
    C:\               \\?\Volume{d1f72a03-d43a-11dc-8bf1-806e6f6e6963}\
    D:\               \\?\Volume{d1f72a06-d43a-11dc-8bf1-806e6f6e6963}\
    C:\temp\Kingston\ \\?\Volume{2d018576-d3f9-11dc-9f13-0019b97a962e}\

One of the things I want to is get the volumes which contain VHD files. Using the Get-VMDisk function I showed before, I can use a little more PowerShell (Get-VM, Get-VMDiskList and Get-VMSnapshot have all be explained in earlier posts).

  $diskpaths = (get-VMDiskList  (get-vm) | foreach {$_.diskpath}) + 
               (Get-WmiObject -NameSpace "root\virtualization" -class Msvm_VirtualSystemGlobalSettingData |
foreach-object {$_.SnapshotDataRoot ; $_.ExternalDataRoot } | select -unique ) +
(get-vm | get-vmsnapshot| foreach {Get-WmiObject -NameSpace "root\virtualization" -Query "ASSOCIATORS OF {$_} " |
where {$_.ResourceSubType -eq "Microsoft Virtual Hard Disk"} } | foreach {$_.connection})
  $vols=&{foreach ($volume in (gwmi Win32_volume)) {if ( (($diskpaths| where{$_ -match $volume.name.replace("\","\\")}) -ne $null) -or
                                                 (($diskpaths| where{$_ -match $volume.DeviceID.replace("\","\\")}) -ne $null) ) {$volume} } }

Sooner or later someone is going to take me to task over calling that "Two lines" of powershell. The key piece is that once I know which volumes hold my Hyper-V files I can start thinking about backup…

This post originally appeared on my technet blog.

The Hyper-v API Network interfaces

Filed under: How to,Powershell,Virtualization,Windows Server,Windows Server 2008 — jamesone111 @ 11:58 am

If you’ve read my post on adding disks to a Virtual machine, the techniques here should already feel familiar. We create a NIC , and we create a switch port. And then we tell the NIC it is connected to the switch port. Hyper-V creates VM switches which are either bound to a NIC, internal (visible to the Parent partition) or private (visible only to the child VMs). So one of the first things to do when setting up a NIC is to choose the switch, and the first function I’m going to create is Choose-VMSwitch using  the choose-list function I’ve already shown:  getting the Switches to pass to choose-List is easy enough, just query WMI for MSVM_VirtualSwitch Objects.

    Function Choose-VMSwitch 
    {choose-list  (Get-WmiObject -NameSpace  "root\virtualization" -Class "MsVM_VirtualSwitch") ` 
     @(@{Label="Switch Name"; Expression={$_.ElementName}} ) 
    } 

So now I can have a command Add-VMNic $VM  (Choose-VmSwitch) . Since Hyper-V supports Legacy and VMBus NICs, I have given the option for a -Legacy switch, and to support giving the NIC a fixed MAC address I’ve added a -MAC switch too.  The PowerShell Filter is much the same as I’ve shown previously 

  1. If not passed a VM parameter pick up what is in the pipe
  2. If presented  a string as a VM parameter replace it with a VM WMI Object (or array of VMs)
  3. If presented with an array of Strings or VMs call the function recursively passing it each member of the array [go back to step 2]. N.b. Multiple NICS can’t  have the same MAC address so ignore the -MAC parameter.
  4. Assuming we’ve got a WMI object … get the appropriate Resource Allocation Settings Data object
  5. Set the properties of the RASD; including the MAC address if one was provided. If no Switch parameter was passed set the connection property to an empty string, if one was passed Call New-VmSwitchPort and set the connection property to point to that. The VMBus NIC needs a GUID as an Identifier and the Emulated one does not.
  6. Set up an arguments array, and call the "AddVirtualSystemResources" method of the VirtualSystemManagementService WMI object (which I get with Get-WmiObject -NameSpace  "root\virtualization" -Class "MsVM_virtualSystemManagementService").

So here’s the code in full.

   Filter Add-VMNIC 
   {Param ($VM , $Virtualswitch, $mac, [switch]$legacy ) 
    if ($VM -eq $null) {$VM=$_} 
    if ($VM -is [Array]) {if ($legacy) {$VM | ForEach-Object {add-VmNic -VM $_ -Virtualswitch $Virtualswitch -legacy} }                               else  {$VM | ForEach-Object {add-VmNic -VM $_ -Virtualswitch $Virtualswitch} } } 
    if ($VM -is [String]) {$VM=(Get-VM -Machinename $VM ) } 
    if ($VM -is [System.Management.ManagementObject]) { 
        if ($Legacy) {$NicRASD = Get-VMRASD -resType 10 -resSubType 'Microsoft Emulated Ethernet Port' 

                    $NicRASD.ElementName= "Legacy Network Adapter"} 
     else         {$NicRASD = Get-VMRASD -resType 10 -resSubType 'Microsoft Synthetic Ethernet Port'
                    $NicRASD.VirtualSystemIdentifiers=@("{"+[System.GUID]::NewGUID().ToString()+"}")
                    $NicRASD.ElementName= "VMBus Network Adapter"}    
      if ($virtualSwitch -ne $null) {$Newport = new-VmSwitchport $virtualSwitch                                      if ($Newport -eq $null) {$Newport= ""}
                                     $NicRASD.Connection= $newPort}
      if ($mac -ne $null) {$nicRasD.address = $mac                $nicRasD.StaticMacAddress = $true }       $arguments = @($VM.__Path, @( $nicRASD.psbase.GetText([System.Management.TextFormat]::WmiDtd20) ), $null, $null )
       $result = $VSMgtSvc.psbase.invokeMethod("AddVirtualSystemResources", $arguments)   if ($result  -eq 0) {"Added NIC to '$($VM.elementname)'."} else {"Failed to add NIC to '$($VM.elementname)', return code: $Result" }}  $vm = $null }

In this function I call "New-VmSwitchPort", which is a wrapper for a method provided by the Virtual Switch Management Service. Like the the image management service, and the Virtual System Management Service, this is just a WMI Object which we query for. The process goes

  1. If presented with a string as the VirtualSwitch Parameter, replace it with a VirtualSwitch WMI object
  2. Assuming we now have a WMI object, get the SwitchManagementService WMI object.
  3. Get a GUID to use as the port’s name and friendly name , and pass it, the Switch object and 2 nulls in one array to the CreateSwitchPort method
  4. The Path to the new port is returned in one of these nulls, so the function picks this up and returns it.
   Function New-VMSwitchPort 
   {Param ($virtualSwitch , $Server=".") 
    if ($Virtualswitch -is [String]) {$Virtualswitch=(Get-WmiObject -computerName $server -NameSpace "root\virtualization" -Query "Select * From MsVM_VirtualSwitch Where elementname = '$Virtualswitch' ")} 
    if ($Virtualswitch -is [System.Management.ManagementObject])  {     $SwitchMgtSvc=(Get-WmiObject -computerName $Virtualswitch.__server -NameSpace  "root\virtualization" -Query "Select * From MsVM_VirtualSwitchManagementService")     [String]$GUID=[System.GUID]::NewGUID().ToString()      $arguments=@($Virtualswitch.__Path, $GUID, $GUID, $null, $null)      $result = $SwitchMgtSvc.psbase.invokeMethod("CreateSwitchPort",$arguments)     if ($result -eq 0) {"Created VirtualSwitchPort on '$($virtualSwitch.elementName)' " | out-host                          @($arguments[4]) }      else               {"Failed to create VirtualSwitchPort on '$($virtualSwitch.elementName)': return code: $Result" | out-host} } 
   } 

There are some extra functions that I won’t show here – I’ve got a "Remove-Port" function and a Set-VMNICPort function – which removes an existing port and adds a newly created one. I’ve got a Set-VMNICMacAddress function which changes the MAC address after the NIC is created, and Get-VMNIC and Get-VMNICSwitch which build up to give  a Get-VMNICList function along the same lines as the Get-VMDiskList I showed before

 

Bonus link Over on the Virtualization Team blog, Taylor has posted the code to connect the Host machines Network card to a VM switch. I’m going to rework that code slightly for the library I’m building -  I’ll have a "Choose-ExternalEthernetPort" and so on.

This post originally appeared on my technet blog.

May 27, 2008

The Hyper-V API – Disks

Filed under: Powershell,Virtualization,Windows Server,Windows Server 2008 — jamesone111 @ 11:58 am

In an earlier post in this series (several posts ago now) I showed how the Msvm_virtualSystemManagementService WMI object can be used to configure resources in Hyper-V, and I started with the easy step of setting memory and CPUs which exist on a freshly created virtual machine. What about Network Cards, SCSI controllers, Disk drives and so on ? The 4 steps are the same as I outlined before i.e.

  1. Get a ResourceAllocationSettingData (RASD) object
  2. Modify one or more of its properties.
  3. Covert it to XML formatted Text,
  4. Pass the XMl as one of an array of arguments to one of the Methods of the Msvm_virtualSystemManagementService.

Where before I was using the ModifyVirtualSystemResources method, new resources need the AddVirtualSystemResources. Where memory and CPU had special ResourceAllocationSettingData (RASD) objects these ones are more generic and I have a "Get-vmRASD" function. This takes type and subtype arguments, here’s a quick summary of them

Resource Type Resource Sub Type
6 Microsoft Synthetic SCSI Controller
10 Microsoft Emulated Ethernet Port
10 Microsoft Synthetic Ethernet Port
16 Microsoft Synthetic DVD Drive
21 Microsoft Virtual CD/DVD Disk
21 Microsoft Virtual Floppy Disk
21 Microsoft Virtual Hard Disk
22 Microsoft Synthetic Disk Drive

So lets see how  we use them in practice. As before I get an object for theVirtual System management service

    $VSMgtSvc=Get-WmiObject -NameSpace  "root\virtualization" -Class "MsVM_virtualSystemManagementService"

If I want to create a SCSI controller, the 4 steps above translate to:

    $SCSIRASD=Get-VMRASD -ResType 6 -ResSubType 'Microsoft Synthetic SCSI Controller' 
    $SCSIRASD.elementName="VMBus SCSI Controller" 
    $arguments = @($VM.__Path, @( $SCSIRASD.GetText([System.Management.TextFormat]::WmiDtd20) ), $null, $null ) 
    $VSMgtSvc.PSbase.InvokeMethod("AddVirtualSystemResources", $arguments)   

If I want to create a disk drive I change the type of Resource Allocation settings data, I either use

    $diskRASD=Get-VMRASD -ResType 22 -ResSubType 'Microsoft Synthetic Disk Drive'

if I want a hard drive or if I want a DVD drive it’s:

    $diskRASD=Get-VMRASD 16 'Microsoft Synthetic DVD Drive'

The remaining 3 steps are the same, this time I have to set two properties: a parent – the disk controller, and the address on the controller (passed as a parameter named $LUN)

    $diskRASD.parent=(Get-VMDiskController -vm $vm -ControllerID $ControllerID -IDE).__Path 
    $diskRASD.address=$Lun 
    $arguments = @($VM.__Path, @( $diskRASD.GetText([System.Management.TextFormat]::WmiDtd20) ), $null, $null ) 
    $VSMgtSvc.PSbase.InvokeMethod("AddVirtualSystemResources", $arguments)

Then to mount a disk into the drive it’s either

    $diskRASD=Get-VMRASD -resType 21 -resSubType 'Microsoft Virtual CD/DVD Disk' -server $vm.__Server 

if I want a Hard disk or if I want a DVD disk it’s

   $diskRASD=Get-VMRASD -resType 21 -resSubType 'Microsoft Virtual Hard Disk'   -server $vm.__Server 

And then as before the disk needs a parent – the drive it is mounted in, which makes more sense for a DVD than a Hard disk; and it needs a connection to the Virtual hard disk, ISO or Physical disk on the host and then we continue as before

$diskRASD.parent=(Get-VMDrive -controller (Get-VMDiskController -vm $vm -ControllerID $ControllerID -IDE)  -Lun $lun ).__Path } 
$diskRASD.Connection=$VHDPath
$arguments = @($VM.__Path, @( $diskRASD.psbase.GetText([System.Management.TextFormat]::WmiDtd20) ), $null, $null )
$VSMgtSvc.psbase.invokeMethod("AddVirtualSystemResources", $arguments)

OK: you may have noticed that I’m calling functions Get-VMRASD , Get-VMDiskController and Get-VMDrive

Get-VMDiskController returns the RASD object(s) for either SCSI or IDE disk controller(s) or for both. The only thing which is a bit awkward here is that SCSI controllers don’t have an obvious ID, we just get a single RASD object if there is one controller or an array if there is more than one, so I get the one I want with | Select first | select last. I showed before how I can set-up filters to take input from the pipe, and the real version of this code does exactly that … why will become clear in just a moment

    Filter Get-VMDiskController 
    {Param ($VM , $ControllerID,  [Switch]$SCSI, [Switch]$IDE )
   if ($scsi) { $controllers=Get-WmiObject -Query "Select * From MsVM_ResourceAllocationSettingData
                                             Where instanceId Like 'Microsoft:$($vm.name)%'
and resourceSubtype = 'Microsoft Synthetic SCSI Controller' " `
                                         -NameSpace "root\virtualization" 
          if ($controllerID -eq $null) {$controllers}
                     else  {$controllers | select -first ($controllerID + 1) | select -last 1} }
if ($IDE)  { Get-WmiObject -Query "Select * From MsVM_ResourceAllocationSettingData Where instanceId Like 'Microsoft:$($vm.name)%\\$ControllerID%' and resourceSubtype = 'Microsoft Emulated IDE Controller' " -NameSpace "root\virtualization"}
}

Then I wrote Get-VM Drive which takes a controller as a parameter (and again I can pipe one or controller(s) in to that – though I’ve omitted  the code out for the sake of space. )

    Filter Get-VMDrive 
    {Param ($Controller, $LUN ) 
     $CtrlPath=$Controller.__Path.replace("\","\\")  
Get-WmiObject -Query "Select * From MsVM_ResourceAllocationSettingData
                Where PARENT='$ctrlPath' and Address Like '$Lun%' " -NameSpace "root\virtualization" }
}

And finally I can pass the drive to Get-Disk, which looks like this

    Filter Get-VMDisk
    {Param ($Drive)
     $DrivePath=$Drive.__Path.replace("\","\\")
     Get-WmiObject -computerName $drive.__server -Query "Select * From MsVM_ResourceAllocationSettingData 
                                                          Where PARENT='$DrivePath' " -NameSpace "root\virtualization" }

So I can find the VHDs mounted used by one or more VMs with

    Choose-VM -multiple  | GetVmDiskController -IDE -SCSI | GetVMDrive | get-VMDisk 

Or I can get more detailed information Like This

Function Get-VMDiskList 
{Param ($vm)
foreach ($v in $vm) {
         foreach ($dc in (get-vmdiskcontroller -vm $v -ide -scsi)) {
                 foreach ($drive in (get-vmdrive -controller $dc)) {
                         get-vmdisk -drive $drive | select-object -property `
                                                       @{name="VMName"; expression={$v.elementName}},
                                                       @{name="VMGUID"; expression={$v.Name}},
                                                       @{name="ControllerName"; expression={$dc.elementName}},
                                                       @{name="ControllerInstanceID"; expression={$dc.InstanceId}},
                                                       @{name="ControllerID"; expression={$dc.instanceID.split("\")[-1]}},
                                                       @{name="DriveName"; expression={$drive.caption}} ,
                                                       @{name="DriveInstanceID"; expression={$drive.instanceID}},
                                                       @{name="DriveLUN"; expression={$drive.address}},
                                                       @{name="DiskPath"; expression={$_.Connection}},
                                                       @{name="DiskName"; expression={$_.ElementName}},
                                                       @{name="DiskInstanceID"; expression={$_.InstanceID}} }}}
}

The Get-RASD code isn’t nice. It’s two WMI queries to get the name of the an object we need to create

    Function Get-VMRASD 
     {Param ($ResType, $ResSubType) 
      $allocCapsPath= ((Get-WmiObject -NameSpace "root\virtualization" -Query "Select * From MsVM_AllocationCapabilities
                                          Where ResourceType = $ResType AND ResourceSubType = '$ResSubType'").__Path).replace('\','\\') New-Object System.Management.Managementobject((Get-WmiObject -ComputerName $server -NameSpace "root\virtualization"
          -Query "Select * From MsVM_SettingsDefineCapabilities Where  valuerange=0 and Groupcomponent = '$AllocCapsPath'").partcomponent) }

Whilst it may not be nice, knowing the Values to pass it from the table above, the properties to set, and how to pass it into AddVirtualSystemResources allows you to create what ever disk related bits you need. In a future post I’ll move on to looking at how you similar things with NICs.  Then I’ll have one more on creating VMs and setting the motherboard options and then I’ll be posting the whole code for download – I’ve got some internal Microsoft people trying it out at the moment.

[Update the Original post had numerous proof reading errors – I hope there aren’t any left]

This post originally appeared on my technet blog.

May 24, 2008

Top travel tip. Use the calendar. Properly

Filed under: Events,General musings,Working at Microsoft — jamesone111 @ 4:53 pm

One of the things that we noticed on the roadshow was the *much* better system for getting us feedback (see here and here oh and here ) and – always looking for ways to improve our processes – a couple of us noted that there’s a big document mailed out with the event information for the presenters, but when we pull out our phones the calendar appointment doesn’t have the location of the event in it. Each of the presenters has to copy the information out of the document and paste it into the calendar. None does. We try not to print stuff which we can see on a laptop, and we don’t want to get a laptop out to program the sat-nav. So next time hopefully we’ll get two appointments, one with the Hotel and it’s address, and one with the venue and it’s address.

Putting data in the Calendar has two advantages. (1) It’s sync’d and always with me (2) Everyone has read access to my Calendar. So anyone can find where I am in an Emergency.

In July I’m off to Seattle and I booked my flights on Friday, a year ago I wrote about the stupidity of our Travel booking process and things haven’t got any better. Our Travel agent send the itinerary as a copy-protected PDF. Why on earth they can’t send me flight details in ICS / VCS format beats me. So the process is print PDF to XPS, Open XPS, select, copy , paste, reformat.

Clearing out my Inbox I came to the mail marked "Save the date". Now when I meet the person who sent this I’m going to give them the verbal equivalent of a gentle Slap. For 10 years Microsoft has used outlook. For 5 years before that we had 5 years of Schedule+, I can only assume he’s new and doesn’t know that to save a date you send a calendar request. The sender compounds the offence by putting the date and venue details in as a bitmap – not text – so its not sync’d to a phone and not read by Outlook Voice Access. So 350 people have to take a couple of minutes each typing all their own calendar requests: that adds up to a working day wasted. Or maybe they won’t bother and will be wandering round Seattle looking lost.

In all 3 cases I’m left asking – why am I the one doing this ?

This post originally appeared on my technet blog.

May 23, 2008

You’re not a professional without …

Filed under: Events — jamesone111 @ 6:43 pm

I’m quite hardcore about Technet, having had it since 1993 myself I guess that’s not really surprising. My sound bite is


I expect a plumber to have a set of spanners. I expect a Doctor to have a stethoscope. I expect an IT professional to have access to technet.


Seriously. If you work with Microsoft Technologies and you don’t have Technet you’re not in a position to do the job properly. Technet plus, when it came in gave access to pretty much all our professional Software and Betas too  – that used to mean hundreds of disks over a year – not very green, but Technet plus direct is geared round software downloads – quicker, green and Cheaper.


Could we make it more attractive ?  Well yes. It has 2 Support Events included, paying for those Events costs would cost you more than the measly £234 (+Irish VAT) that Technet costs. £234! – that’s a couple of hours of a consultant’s time. If you can’t save that time over a year even without using any support events then I’d be stunned.


Could we make it more attractive ?  Yes, actually. How about up to 30% off (Sorry UK customers only. For full details, follow the link below)


Up to 30% off the best resource you can get for your job !


Just go here , check what you get, and when you place the order put in the promotional code. UKITPRO5


What are you waiting for ?

This post originally appeared on my technet blog.

"Lady licensing" blog.

Filed under: Uncategorized — jamesone111 @ 4:46 pm

George has been telling everyone recently about Emma Healy’s blog on Licensing. I don’t often plug other blogs, but I think this one is worth your attention

  • Before I came to Microsoft I used to wonder "Why can’t they make licensing simpler"… these days I have some idea why.
  • Technical people tend to look on licensing matters as "paperwork" with all the disdain that implies, and never take the time to find out about it.
  • Licensing people don’t tend to be visible in public

I wouldn’t pretend that I would go and read about licensing every single day, but that’s the joy of RSS, you can sign up and every so often something that you value comes by. This one on Virtualization for example.

However is it just my puerile mind which makes the title that Emma has picked on Live Spaces – Lady Licensing – sound like something else.

This post originally appeared on my technet blog.

May 21, 2008

Eggsactly the wrong way to go about things.

Filed under: Uncategorized — jamesone111 @ 7:28 pm

We’ve had a mail thread running about what happened to Steve Ballmer in Hungary.  If you haven’t seen in on Eileen’s blog just search for "Ballmer" on youtube and you can watch what happened. To save you the trouble,   Ballmer was at Corvinus University to address students and receive an honorary degree. A local man stood up from the audience and accused Microsoft of stealing millions of dollars from the Hungarian people, and then threw three eggs .

Now I’m not going to share all the internal information partly because it talks about Steve’s security arrangements, but I did want to call out a couple of things. Steve has security who travel with him and they didn’t pounce on this guy and rough him up (perhaps our PR people saw the Walter Wolfgang incident at the Labour Party conference … ).Steve could have pulled a Prescott and gone after the guy himself.  Instead he seems to come out of this looking pretty unflappable: I’m told he was very nice to everyone about it, joking that back home the guy’s aim would have been better. 

This post originally appeared on my technet blog.

May 20, 2008

The joy of feedback [again]

Filed under: Events,General musings — jamesone111 @ 8:59 pm

I make a point of saying at the roadshows that we read all the comments and take note of them I wanted to share one particular comment but first off I want to give you a flavour of what people said they liked at one of last weeks events; here they are, as posted.

  • Good demonstrations.
  • Venue! much better than the last Technet I went to
  • Cinema venue was comfortable and presentations were easy to see.
  • As usual, very well presented and informative. Good venue.
  • Clarity of speakers and how excellent delivery. Great hospitality and lunch!
  • The demos – done very well by real techies with good communication skills – thank you.
  • The humour and real stories.
  • Feature demos and examples.
  • The location was surprisingly effective. The guys really knew their stuff.
  • Very clear presentations with well timed breaks
  • Presentations were excellent, very informative and entertaining. All the speakers communicated well and kept the presentation flowing. The presenter shared good banter.
  • The style of presentation from the presenters. Very informative and enjoyable.
  • Event was well presented, and at a resonable pace.
  • Reasonable venue, good investment in food/drinks to keep people on board, not too advertorial/ sellsellsell, some free stuff, reasonable level of knowledge by the team, good parking and easy (ish) to get to, I had a 200 mile round trip. We could hear the presenters and see the screen which is always a good start.
  • The friendly but professional presetation of the event.
  • Hands on demos and labs sessions. coffee and cake in the morning was much needed and very good. Presenters we’re also excellent and really worded as a team. The software trials were also extremely generous.
  • I also liked the presentations and speakers, while done very professionally it wasn’t deathly serious.
  • Professional and yet informal putting people at easy.
  • Easy going , informative and entertaining.

We know that everyone doesn’t always feel the same, and we had one person who must have got close the space limit with the following comment in the what could we do better section. It’s worth reading just for the penultimate sentence which I’ve put in bold.

Presentation skills were somewhat lacking, no co-ordination of presentations/presenters, the projector was WAY out of focus and left me with a headache, what were your technical staff doing during the sessions? They were not wtaching and helping you out with mic/tech issues thats for sure so get new ones. The presenters jokes were so bad they could be on "The IT Crowd" (this is not a complement btw), bin the hats we couldn’t see your eyes and this means nobody trusts you plus they just looked daft, when asking for a poll to prove a point be sure it’s going to go your way as several didn’t which was embarassing, public transport links were non existant, the American guy may not want to bother with Environmental issues like power saving but it’s my organisations 4th most important issue (our electricity bill is circa 1.4Million UKP/year) send him back to his oil rich Texas ranch please or get with the program, how come the only females on the team were Georgina (relegated to admin functions) and some leggy microphone holders? Can we please have some diversity in your team of techno boffins. Along the same lines I could see 2 of the presenters trying very hard to keep their "don’t suffer fools/women/managers/boss/customers gladly" attitude under control, trying and only just succeeding. Please educate your presentation team that "in jokes" should not be done whilst on stage, they may make you laugh but they make the audience wince and think your unprofessional. Bin the hats. Use a video mixer instead of a kvm switch and for goddness sake have a corp. screen to drop back to if your still fidling with powerpoint because we don’t want to see it. Get better compressed video’s for your presentations and better specced machines to play them on. Music: was it supposed to sound like a tinny 80’s set of headphones? I think the sound engineer was taking the piss, get a new one. It was difficult to kick off conversations with other delegates, maybe a larger area between sessions/larger name/company fonts on the badge and most importantly some facilitators in the audience/foyer to get people talking. Some parts of the presentations were slightly too geeky and this was more pronounced when things did not go to plan. Once things went out of kilter it just looked tragic, sorry. Don’t get me wrong though, I did enjoy the day and I will come to some more as/when they are advertised. I was expecting something a bit slicker but at the end of the day it could have been a whole lot worse.

 

As for the lack of women presenting, Eileen opted not to present on this tour, and we don’t have any other women on the team. I understand that when I was hired no woman applied, I know because I interviewed all the candidates for Viral’s and Andrew’s roles that no woman applied for either of those either. That’s why Eileen spends time trying to get women into technology. I don’t know why the company that stage the events for us have women as "meeters and greeters" , although the women in question might be a little surprised to be called "leggy". As for 2 of the presenters trying to keep their "don’t suffer women gladly" attitudes under control unless this was a reference to Steve pulling Viral up on his use of "Guys" to mean "people" instead of "men" – think of "Friends", where everyone calls everyone "you guys" regardless of gender.

This post originally appeared on my technet blog.

Hyper-V RC-1 available for download

Filed under: Beta Products,Virtualization,Windows 2003 Server,Windows Server — jamesone111 @ 7:40 pm

There was a slight hiccup which meant news appeared, disappeared and then re-appeared. But all the right announcements are posted, notably this one from Taylor Brown on the Virtualization team blog.


Windows Server 2008 Patch KB950049 – the Hyper-V RC-1 update – is available.  


I gave some general guidance about moving between versions and that should all hold for this one. I know what people are asking


(a) Will there be an RC-2 or is the next stop release ? and


(b) When will release be ?


At risk of sounding like a broken record; I don’t know the answer to the first, and the answer to the second is we’re committed to release by August 2nd (180 days after server 2008 Released) and we’re looking good to beat that date: I’m sure there’s an office somewhere in Redmond where the wall calendar has the date circled, but as I’ve said before those who know the date aren’t talking and those who talk about it don’t know.


Update1 : A new release of the Vista tools to manage Hyper-V is also available.


Update 2: Network World quotes Jeff Woolsey as saying “This is the last planned Hyper-V milestone before RTM.”  This had been rumoured but no-one had committed to it that I’m aware of.


This post originally appeared on my technet blog.

May 17, 2008

Saturday morning fun: I can haz snowclones ?

Filed under: Uncategorized — jamesone111 @ 10:43 am

Long ago I bought a book called  “The New Hacker’s Dictionary” – much of which is on-line. It contains a definition of hacker humour which you can read in full, I want to call out:



  • Elaborate deadpan parodies of large intellectual constructs,

  • Jokes that involve screwily precise reasoning from bizarre, ludicrous, or just grossly counter-intuitive premises.

  • Fascination with puns and wordplay.

 For some reason people want to daft things with Pictures of cats (I think it was Eilleen who put me onto Cats that look like Hitler) and somewhere along the line we got LOL cat. You can see some examples on flickr.  Then someone decided to do a programming language based on the LOL speak.Various people have tried to explain Lolcat grammar and spelling (See wikipedia, or Anil Dash)


But someone had to take it futher and do the Bible in Lolcat. Here’s the start of Genesis  


Oh hai. In teh beginnin Ceiling Cat maded teh skiez An da Urfs, but he did not eated dem.
Da Urfs no had shapez An haded dark face, An Ceiling Cat rode invisible bike over teh waterz.
At start, no has lyte. An Ceiling Cat sayz, i can haz lite? An lite wuz.


There are quite a few bits that make you wonder what the original was 


An Ceiling Cat sayed, i can has lightz in the skiez for splittin day An no day.
It happen, lights everwear, like christmass, srsly.
An Ceiling Cat doeth two grate lightz, teh most big for day, teh other for no day.
An Ceiling Cat screw tehm on skiez, with big nails An stuff, to lite teh Urfs.
An tehy rulez day An night. Ceiling Cat sawed. Iz good.


My R.E. Teacher would know this better as


And God said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years:
And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so.
And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also.
And God set them in the firmament of the heaven to give light upon the earth,
And to rule over the day and over the night, and to divide the light from the darkness: and God saw that it was good.


I love the translation of  “And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.”


to An Ceiling Cat sayed, Beholdt, teh good enouf for releaze as version 0.8a. kthxbai.


 

This post originally appeared on my technet blog.

May 16, 2008

The long tail, Music and the small bookshop

Filed under: Uncategorized — jamesone111 @ 10:06 pm

I’ve talked about the millennial thinking before. I’ve heard it  said that the "iPod Generation" don’t think about "Current Music" vs "Old Music". When I bought LP records there was never much back-catalogue in the shops. Growing up in Brighton there were second hand record stores which you could trawl if you wanted something which was long gone, but something which had gone out of the shops recently didn’t show up. But, if you get most of your music by downloading, then there’s no division into current and old. Music gets added to servers but it could be back catalog just as easily as it new releases – and server capacity can increase in a way that shelf space in a bricks and mortar shop never can. I recently went to see Gary Numan re-touring the 1979 Replicas Album. The audience was a mixture of 40-somethings who remembered the album from new, and students who’d discovered Numan from the various people who link to him and know Replicas from downloading it. At Radio 1’s big weekend last week (great bit of Deep Zoom, by the way) – it was young fans who complained that Madonna didn’t play her early stuff (we’re talking 1983 music here – before some of them were born ).  Having heard Annie Lennox on Desert Island Disks this morning her Music from 1982/3 sounds every bit as good today [she picked the Beatles’ Penny Lane as one of her 8 songs – I’d love to know what their download stats are like]. There are plenty more examples if you look, and of course this is what the idea of the long tail is about. Good music, (and good movies and good books too) will continue to find a market forever if you don’t have to take them off the shelf. The same idea applies to blogs, Wikis and a lot of other "user generated content". If this blog were a newspaper column, it would appear, be read and disappear. As a blog the text remains – potentially forever, and thanks to search engines is discoverable and consumable – there are plenty of ramifications in that.

Two years ago now a couple of friends of mine announced they were going to open a bookshop. Part of me envied them, because I worked in a small bookshop before getting my first "proper" job after University and I remember it fondly. Part of me remembers running a business and the stress that went with it and would say "Never again"; that part also wondered if they had the resources to cope with a slow start or any spell of poor sales.  And part of me said "are they crazy ? Going up against Amazon etc on-line, and only a few miles from Oxford where book buyers are very well catered for".  It’s pretty obvious that if you’re going to make a success of it you can’t compete on selection or price with the Oxford stores – much less with Amazon, but if you can make a place where people like to shop they will reward you with their loyalty. How to make such a place is a the challenge. Well Nicki and Mark seem to have cracked that because this week they picked up the Booksellers Association New Bookshop of the Year award. I’m sure it helps that they have a blog, but you have to more than that – things like this for example. Well done folks.

This post originally appeared on my technet blog.

iSCSI, clustering and Hyper-V

Filed under: How to,Virtualization,Windows Server,Windows Server 2008 — jamesone111 @ 8:22 pm

One of the things I’ve been saying I’d blog for a while is how to set up a cluster on Hyper-V. Since Hyper-V does not support sharing SCSI disks between machines, you need to use iSCSI – which is all fine and good if you’re doing it in production with real workloads and a proper budget; but a bit of a pain if you’re doing it in a lab or training environment. Inside Microsoft I can get what I need courtesy of storage server, but what about the rest of the world ? There are several  iSCSI products with free evaluation versions so I was going to try a couple out, document them and post the results. Well my colleague in Ireland Gavin McShera, has saved me the trouble, with a blog post which explains it all. Once you’ve set-up iSCSI you Gavin links to the article on setting up a 2 node file serving cluster and you can see how easy clustering really is in 2008.

This post originally appeared on my technet blog.

On knowing your sh*t

Filed under: Exchange,Working at Microsoft — jamesone111 @ 8:43 am

It’s been an interesting few days, Monday was the Glasgow road-show event and Thursday was our day in Newcastle. The team didn’t look upon flying with any great enthusiasm. So rather than returning home, drawing breath and heading North again we decided to stop en-route for an extra day and night: since we’d missed off-site event that the rest of our group had to spend time doing team stuff and thinking about goals for the financial year that starts on July 1st, we used the time for that – while enjoying some of the best countryside the UK has to offer. It was time well spent and  – thinking as a shareholder – I was glad to see a reasonable chunk of money saved (not quite so glad that a quirk of our expense policy means I’m paying a little of the cost myself) 

And so to Newcastle; we’ve visited Newcastle twice and got a good reception both times so it’s a place I’m glad to come back to. (Some audiences seem pleased  that we bother going to them at all. London audiences expect us to go there and are the hardest to please.) Instead of being Travel weary, we were in a good frame of mind and delivered the best event we’ve done on this trip. Last time we were in Newcastle  Jonathan Noble met us and we ended up entering a pub quiz (and got close to winning!), so we gave him the task of finding another one and were joined by half dozen more "community" people. The quiz was fun and we might have won it, but we came in a contented third. There was an end-of-evening Jackpot prize for a one-off question: 25p to buy a slip, a £100 prize and one question asked after the slips were sold. The question. What are coprolites ?

Some years back a friend of mine – another of the Davids – bought the board game of Who wants to be a Millionaire ? Being on a few people’s phone-a-friend list I did fairly well and found myself at the "£1,000,000" question. It was "What date was the battle of Hastings" – everyone assumes 1066, but not what year, but what day-of-the-year.  I’d once sent my Dad a birthday card which said on the outside "Do you know what day it is ?" and on the inside I’d written "The 925th anniversary of the battle of Hastings ? ", because he (and Mrs Thatcher if I remember correctly) both have the day of the battle as their birthday. So when the answers were  "13th of August" , "13th of September", "13th of October", or "13th of November" it was too easy. While we’re on battles and anniversaries a different David celebrates wedding anniversary on Trafalgar day. I don’t know how this stuff sticks in my head, but it’s a useful trait for a technical chap.

I don’t know why I know about Coprolites. But I do know they’re fossilized dinosaur droppings. Whether to para-phrase something from the film broken arrow I don’t know if I was more surprised that dinosaur poo CAN be fossilized, or that it is common enough that we have a word for it it . So £100 came my way. One Geordie – a good 20 years my senior – asked me with a huge grin on his face if "that means you know a lot about old sh*te" quite a few Microsofties would say that was a fair description.  I told my daughter about football that "you win as a team or lose as a team" and I didn’t think of the prize as my money.  The winning team in the main quiz  put their prize in the Pub’s charity boxes (RNLI and RNIB) and when I suggested that we do the same, all of my team agreed. It might be the first time our charity matching scheme has been presented with a pub receipt to support a claim – all being well the two charities should get £50 each; and that still doesn’t wipe out the money we saved.

This post originally appeared on my technet blog.

May 15, 2008

An e-mail message I was unusually pleased to receive.

Filed under: Uncategorized — jamesone111 @ 11:53 pm

KC had a post recently about "E-mail overload" – so called, and arguing we shouldn’t point the finger at mail the whole time for the problems of information overload (her follow-up is worth reading too).  I’ve talked about the rubbish that lands in my inbox before… I won’t go over that ground again.

When Steve and I heard that Scotty Macleod was well enough to post something on Dmitry’s blog we both thought we should go and see him in hospital. I hate going into hospitals and I wasn’t going to and see Scotty until he was well enough to appreciate it.  Scotty dropped each of us a quick thank-you note and apologized for not sending something longer.  His recovery still has a way to go, but I don’t think I’ve ever been so pleased to find that someone could send an email. And Scotty if you’re reading, don’t worry Short is good .

This post originally appeared on my technet blog.

May 11, 2008

More on the Hyper-V API

Filed under: How to,Powershell,Virtualization,Windows Server,Windows Server 2008 — jamesone111 @ 2:02 pm

In which we see how to set the number of CPUs

I started with getting MSVM Computer System objects – which I showed back in February. With these objects I can ask for the state of the VM to be changed to Running, Stopped or Saved.

To do things in a proper Powershell Style I re-wrote and re-wrote my functions so I have GET-Vm (which returns one or more VM(s) by name), Choose-VM, which puts up a list and returns one or more VM(s). Plus Start-VM, Stop-VM and Suspend-VM. Over various iterations these have moved from demanding a single MSVM Computer System object, to accepting an or object or display name, then to accepting and of array either, to allowing input to be piped in. Since Stop-VM is a bit brutal, that same February Post showed using the ShutDown integration Component

Next I moved onto the Msvm_ImageManagementService, and a few weeks back I looked at how Virtual Hard disks can be created , mounted and Compacted.

From there it was on to the related idea of Snapshots which I covered here and here; Snapshots are handled through the Msvm_virtualSystemManagementService. This is actually a very important WMI class. I mentioned Taylor’s post which shows how to manipulate the Exchange of Key/Value pairs (the Host’s KVPs are managed through this object). But there are 6 other methods I want to introduce here they are Create-, Modify- & Destroy- VirtualSystem and Add, Modify and Remove Virtual System Resources.

Creating and Modifying work in the same way. Identify the machine (unless it is being created) and pass a block of XML which describes how you want the machine, or the resource attached to it to be. If you’re think ahead and saying "Can I dump that XML out to a file ?" you can: both the Virtual System Management Service WMI object and the MMC console provide interfaces to Export or Import the Machine.  There are quite a lot of things which we want to be able to manipulate.

  • Legacy Network Card
  • VM-Bus Network Card
  • VM-Bus SCSI Controller
  • IDE DVD Drive
  • Virtual DVD Disk (which is inserted into the drive)
  • IDE Hard drive
  • SCSI hard drive
  • Virtual Hard disk-image (inserted into the drive)
  • Memory size
  • CPU cores and reservation
  • The VM itself

And for each of these we can get the XML by

  • Building it up from Scratch
  • Reading it from a file
  • Getting the existing value from WMI (for modification)
  • Getting a default from WMI (for creating)

The first 2 are usually a pain, so typically the process goes:

  1. Get a ResourceAllocationSettingData (RASD) object
  2. Modify one or more of its properties.
  3. Covert it to XML formatted Text,
  4. Pass the XMl as one of an array of arguments to one of the Methods of the Msvm_virtualSystemManagementService.

For example: here’s how we set the number of CPUs – we get a variation on the generic RASD object, the Msvm_ProcessorSettingData object for the VM in question.

    Filter Set-VMCPUCount
{Param ($VM , $CPUCount)
$procsSettingData=Get-WmiObject -NameSpace  "root\virtualization" `
-query "select * from MsVM_ProcessorSettingData 
                                where instanceID like 'Microsoft:$($vm.name)%' "
$procsSettingData.VirtualQuantity=$CPUCount
$SettingXML=$procsSettingData.GetText([System.Management.TextFormat]::WmiDtd20) $arguments=@($VM.__Path, @($SettingXML) , $null) $Result=$VSMgtSvc.PSbase.InvokeMethod("ModifyVirtualSystemResources", $arguments) if ($Result  -eq 0) {"Success"} else {"Failure, return code: $Result "} }

[Update. There were a couple of bits of PowerShell 2.0 in the above. In 1.0 you can’t call the .InvokeMethod  method of a WMI object directly, you have to call it via .psbase and .PATH property doesn’t exist, you have to get to the path with __Path, not .path.path]

The process is almost identical for memory, except get the Msvm_MemorySettingData object and set 3 properties named, .Limit, .Reservation   and VirtualQuantity which are all set to the desired memory size in megabytes

In the next few posts I’ll look at using the RASD objects to add disks and Network cards, plus how we can create and configure the VM itself.

This post originally appeared on my technet blog.

May 9, 2008

Moving VMs to Hyper-v…

Filed under: Virtualization,Windows Server,Windows Server 2008 — jamesone111 @ 10:19 pm

There are 3 things I get asked regularly about Hyper-V. The first is “When can I get it ?”. I’ve covered this before, the product group have committed to ship by August 2nd, and I’ve thought for a while that they’re looking good to beat that. At MMS Bob Muglia said how pleased we were with performance and we’re running the main Technet and MSDN sites on Hyper-V already. Question 2 is “Can you compare X with feature Y in VMware ?”. And the third is “Will I be able to move my VMs from X to the release version of Hyper-V ?”. Where X might be Virtual PC, Virtual Server, Pre-release Hyper-V, or VMWare. So let’s go over the basic rules.



  1. In many cases Virtualization installs its own drivers and management components into the child OS. Sometimes it is possible to remove these under another Virtualization environment, sometimes it isn’t (for example if you used the extensions from Virtual Server before R2 SP1 they won’t uninstall under Hyper-V). So if you’re changing products it’s usually easiest to remove these first. As you move between builds of the same product, it’s a good idea (and sometimes a requirement) to install the latest ones in the child VMs.  [With Linux VMs you should check if a update needs new integration components and since these are provided separately make sure they’re available].  We’re moving to one version of the Integration components disk for all supported Windows OS’s, which streamlines the process. . Server 2008 core can’t auto-run disks and depending on the OS auto run may be disabled, so simply selecting ‘Insert Integration Services Setup Disk’  may not get the job done. Some of the components look like new hardware, so make sure you cancel the Found New Hardware wizard before installing them

  2. We call OSes without Integration Components “unsupported“.* This word tends to panic people. It doesn’t mean you become an Outlaw in the eyes of PSS. Supported means if a flaw is exposed, it will get fixed. We have “Quick Fix Engineering” to provide patches to customers in this situation.  A VM running should look like a standard PC, so it should run OS/2, NT 3.x and 4, Novell NetWare 4 and 5, DOS 5 and 6. Some people might say in that case the Virtualization system “supports” those OSes , but if it exposes a latent flaw in an OS which is out of support, it won’t get fixed; doesn’t matter whose OS it was or whose Virtualization. If an out of support OS exposes a flaw in Hyper-V that doesn’t show up any where else, it is only professional pride of the product group that drives a fix.

  3. A VHD is a VHD. You can take a VHD from any product which supports the format and mount it in Hyper-V. In itself that doesn’t guarantee that the OS will boot and run properly, but you can mount the disk (as I showed here) and fix it off line. You wouldn’t do that without making a copy of the VHD first would you ? Good.

  4. VMWare doesn’t use VHD files. We’ve published our format and they’ve published theirs so there are conversion tools – we usually call this Virtual to Virtual migration, and we do it in SCVMM.

  5. Hyper-V’s SCSI controller is what we call a synthetic one (VM-bus devices are “synthetic”, non-VM bus ones are emulated). Synthetic devices are not available until the OS has booted, so Hyper-V must boot from IDE. (In the same way it can PXE boot from the Legacy NIC, but not the VM-bus one). When the OS is booted it also loads components which speed up IDE access substantially so there’s no great speed advantage to using SCSI (there was in Virtual Server). If you were booting from SCSI before, using the same drive attached to an IDE controller is not normally a problem.

  6. Generally moving a VHD between Virtualization systems has the same effect as moving a hard disk between physical computers. You see a different BIOS, CPU, Mainboard, Network card etc. This may trigger re-activation. You can use the same product key – if activation tells you the key has been used, go through the telephone service. I’ve done this, so I know it is not onerous, although doing thousands of servers might be.

  7. Don’t expect to move saved state files between builds. I know from personal experience you can’t move saved states between Virtual Server 2005-R2 release and Service pack one builds, don’t expect to do it between different builds of Hyper-V either, and if you had any thoughts of saving the state of a virtual server VM and bringing it back as a hyper-V one, I commend your optimism.  Online snapshots contain virtual machine saved-states: you can apply snapshots and shut the machine down and snap shot again to give an offline snapshot

  8. There is a KB article (949222) which explains updating from Beta to release candidate requires VM configurations to be recreated. The Beta-RC change was big enough to cause this but it shouldn’t be repeated.

Those are all the bits I can think of, but if I’ve missed something I’ll cover it in a later post


[Update  Added this  Footnote to point 2 * I’m told that in the future it may be possible to install ICs in a OS which is not supported – as I’ve described “supported” above, or an OS which lacks ICs may be supported.  ]

This post originally appeared on my technet blog.

May 8, 2008

On Ninjas.

Filed under: Working at Microsoft — jamesone111 @ 12:46 pm

andrew2 Over the weekend one of the many Davids I count among my friends mailed me a curious job title from his organization. Yesterday, in one of those moments of serendipity Viral told me about one of the guys in Redmond who has the job title of "Zune Ninja" – he explains how the the title came about here. A while back I mentioned Tom Lehrer, and Plagiarize. Viral’s good friend James Senior is the one whose name is cursed, when we found out he published first.

So while we’re on Ninjas, I should say that when I drew the team cartoons using Janina Köppel’s Excellent SP-Studio I couldn’t find a way to capture Andrew so I tried doing him as SQL Ninja. This seems like a good time for that cartoon to come to light.

This post originally appeared on my technet blog.

Next Page »

Blog at WordPress.com.