Friday, March 18, 2011

Reading VHD from Windows 7 or Server 2008

Sometimes you were wondering, can I take some of the content out from the VHD that I’ve build ?  Well the question is answered. 
Using Windows 7 or Server 2008, you can attached the VHD and pull out the content. 
Of course , the first thing is to shutdown the VM Smile
So, here I have the VHD located in my D Drive.
Next is to Right-click on “MY COMPUTER” and select Manage
Expand the Computer Management, then expand the Storage & then to the Disk Management. 
Right click on the Disk Management and then select Attach VHD
The “Attach Virtual Hard Disk” pop-up will appear.  I can either key in the VHD or click on Browse to locate the VHD that I intend to see the content, then click OK.
Once I’ve attached the VHD, I can see another Disk which is the VHD.
Now I want to explore the content which is located in the G Drive (that is my VHD).  I just right-click on the G Drive and select Explore
Now I can copy out the content that I want to to my local Hard Disk or to a location that I want.  Cool isn’t it ?
So once I’m done, I can Detach VHD and start up the VM if I want to.
Thanks to Vincent Hoo for the sharing Hot smile

Tuesday, March 15, 2011

Network not Working in VM

One of the most common mistakes made is not installing the tool in the VM once it’s up.
Once the VM is up, launch it.  In the Menu bar select Tool .
Then select the Insert Integration Services Setup Disk.
Once it’s installed, reboot it and wa la … it’s able to use the Host Network adapter to go out to your network (via DHCP or static IP address).
Note : When import VM from another Hyper-V, you need to reinstall this tool once more for compatibility.

Thursday, March 10, 2011

Booting up from VHD (Windows 2008 with Hyper-V) on Windows 7 workstation

Today I’m going to share/demonstrate on how to have your PC to boot up from VHD.  This applies to a computer that has specific specifications as below :

  • Windows 7 (Professional, Enterprise or Ultimate are the only supported for booting up from VHD)
  • The Laptop should have the vPro capability

Booting up from VHD is different from the conventional Dual Boot with different partition.  The conventional way boot up can’t see each other’s directory.

Example my actual operating system in my workstation is Windows 7 (only the version that is mentioned above) and I boot up Windows Server 2008 SP1 which is in the VHD format (only 1 file). 

When completed, and boot up to Windows Server 2008, I can be able to retrieve the data or files that is in Windows 7 (e.g files stored in the actual C and/or D Drive).  Isn’t that cool ?

Introduction for VHD.  A Virtual Hard Disk (VHD) is a virtual hard disk file format, meaning it can contain what is found on a physical Hard Disk Drive, such as disk partitions and file system, which in turn can contain for example files and folders. It is typically used as the hard disk of a virtual machine. The format was created by Connectix, which was later acquired by Microsoft, for what is now known as Microsoft Virtual PC. Since June 2005, Microsoft has made the VHD Image Format Specification available to third parties under the Microsoft Open Specification Promise.

The VHD that I’m using is built with Microsoft Virtual PC (or can be built from Hyper-V) that has been SYSPREP with OOBE (Out of the Box Experience).

Here I begin …….

In your Windows 7 Workstation.

Backup of your BCD (Boot Configuration Data Store Configuration)


From the Command Prompt key in :

bcdedit /export d:\bcdbackup


Once it’s successful, it will be backup to your D Drive :


List and identify the GUID (shown in 1 ). Take note and copy and paste into notepad to have it make it easier for the later steps.


Next we want to add in additional description for the booting up.  In my case is a Windows Server 2008 SP1 VHD.  From command prompt :

bcdedit.exe /copy {current} /d "Windows Server 2008 SP1 VHD”


Next is to display the additional information added, from the command prompt :

bcdedit.exe /enum


Note down the location and the VHD name.  As for the VHD, keep it simple and not to have special characters (no underscore, dash, exclamation etc.)


Set the Device.  In the command prompt, key in as

bcdedit /set {9f41c953-446c-11e0-b905-83797765e111} device vhd=[D:]\VHD\W2K8SP1.vhd

Note : Remember that the GUID is different from 1 PC to another.  I’ve highligted in PINK to display the record should be change accordingly to your PC GUID.


Set the OS Device, in the command prompt,

bcdedit /set {9f41c953-446c-11e0-b905-83797765e111} osdevice vhd=[D:]\VHD\W2K8SP1.vhd


Check the settings. At command prompt :

bcdedit /enum


Turn on the HAL (Hardware Abstraction Layer) on, in the command prompt key in the format as below (please remember to change the GUID according to your computer)

bcdedit /set {9f41c953-446c-11e0-b905-83797765e111} detecthal on


Once the HAL is turn on then next is to enforce it by “YES

bcdedit /set {9f41c953-446c-11e0-b905-83797765e111} detecthal Yes

Next is to turn on the Hypervisor to be launch automatically.


bcdedit /set hypervisorlaunchtype auto


Check the update of the Hypervisor Launch is Auto

bcdedit /enum

Reboot the computer, then you have the selection :

  • Windows 7
  • Windows Server 2008 SP1 VHD

Select the Windows Server 2008 SP1 VHD.

From your Windows Server 2008 SP1 VHD launch

After that you need to do the Driver Update for the Server 2008.  As for me, I’m using a Dell Machine, which has all the drivers in the C:\Dell\Drivers of my Windows 7. 

As for the Lenovo, all you need to do is to download the Thinkvantage to update the Drivers online Shifty

There’s another way is to use the Driver Genius Professional Edition.  Do a backup on the Windows 7 for your workstation (can compile into 1 exe file) then, after launching the Windows Server 2008 SP1 VHD, you can execute the file and all the drivers are updated …. almost (Windows Server 2008 doesn’t support Bluetooth, that’s the only disadvantage)

Once it’s updated, next is to turn on your Wireless in the Windows Server 2008 (if you’re running from a notebook) to access the network.


Launch the Server Manager and Expand Features

Then click on Add Features


Select the Wireless LAN Service.  Click Install.  It will ask for reboot.

Once have rebooted, then next is to activate the Hyper-V .


Launch the Server Manager, expand the Roles.


Click Next.


Select Hyper-V and click Next.


Click Next


For the Create Virtual Network, click Next.


In the Confirm Installation Selections, click Install.


In the Installation Results, It will display as needs reboot.  Click Close


Click Yes to Restart.


Open the Server Manager and then expand the Roles, then expand the Hyper-V.  Reboot the second time for this Windows Server 2008 SP1 VHD.


After the second reboot, then open the Server Manager and then expand the Roles, then expand the Hyper-V again.

Expand the Hyper-V Manager.

After this can start to populate the Hyper-V with VMs Hot smile




Freebies from Microsoft !!


Enquiry for Virtualization

It’s another potential End-User enquiry to virtualize …. Smile

So we were there to do some ground work first.  It’s Infrastructure Information Collection and some interviews.

We went in with a tool that is absolutely free.  It’s from Microsoft !! Who says Microsoft is not giving freebies ? 

The tool is called Microsoft Assessment and Planning Toolkit (MAP) .  No agent is needed for the data collection.

Bb977556.image1(en-us,TechNet.10) Bb977556.image2(en-us,TechNet.10)

Since the End-User has a Hyper-V for testing, we installed a W2K8 , include the .NET services and then install the Office 2010 plus the MAP into it.

They intend to virtualize 7 servers.  We configured the MAP to do an inventory and Performance collection for these 7 servers.  By having the performance information collection, then only we can be able to advice what kind of hardware, storage …. what to virtualize and what not to virtualize Open-mouthed smile.

The End-User was impressed with this tool.  Collections of the hardware inventory like the BIOS versions, Model of the servers, what is physical & what is virtual servers, Hard disk slots & size etc.  Additional to that it can be able to cater the Windows 7, Server 2008 readiness.  Checking if the hardware is ready for the next O/S upgrade.  Not to mention there’s also checking if the SQL readiness !!

Not many people know about this tool, therefore my blog just wanna share it out.  Cool stuff man !!

So what are you waiting for.  Download and give a try on this free tool .


Stay tune !!

Wednesday, March 9, 2011

Customer Case - CPU High Utilization (in Guest OS)

One of the customer had issue with the Guest CPU high utilization.  The Hyper-V was not having high CPU readout.

Anyway, we (Vincent and myself) were at the customer's site.  I discussed with him to recommend the customer to use a utility (called Process Explorer) to check what's the full path of the application that caused the High CPU utilization.

Traced out the application and informed that the CPU high utilization was caused by it.  We discussed with her and one of their application vendor informed to check how many sessions was the connection to this particular web application that caused high CPU utilization.

We also recommend the customer PIC to check how many sessions is connected.  We also recommend using the SCOM that was installed to generate the reporting and check on the pattern or trend.  Does it happen during the peak hours when a lot of people using it or does it happen all the time.

After about 15 mins later, customer's reported back about 260 concurrent connections during that time and it caused spikes (CPU 75-89% average) when we were there.  It's not 100% all the time.  It should be norm.

So the customer had agreed to generate the SCOM reporting from the 1-2 weeks collection so we can analyse together :)

Tuesday, March 8, 2011

Why Virtualize Your Infrastructure

More on server virtualization

You've heard only a few of the reasons that virtualization is a hot technology: It saves money, it lowers the number of physical servers, and it is a green. However, there are other reasons to virtualize your infrastructure, especially for those who work with virtual machines as their primary job duty.

1. Common Management Interface

Having all your servers available in a single application is cool, but the ability to control those servers from that single interface is downright arctic. Virtualization offers access to virtual machine (VM) hardware, consoles and storage. Your entire gaggle of systems as readily available as a pocket protector full of trade show pens is almost too good to be true.

If the Virtualization environment is in HA, better still.  If the physical hardware needs to be replace, then the VM can always be "Live Migration" over to the working physical hardware.  Once all the VMs are moved out, they physical faulty hardware can be taken out for repair.  This cause no downtime to the production.

2. ILO Not Required

For the unlucky lot whose hands-on techs don't setup your Integrated Lights Out (ILO) interfaces, virtualization removes that burden for the better. Virtualization allows you to boot a VM from a powered-off state without the need for physical access to the system. The number of saved trips into the data center is worth the most minuscule return on investment from switching to a virtual infrastructure.
3. Easy "Hardware" Changes

Changing hardware and upgrading systems is no trip to the beach. In fact, it's absolutely maddening inside even the most plush data centers where you must kneel, stretch and bend in unnatural ways to break open a case, remove old hardware and install the new pieces. And, after all that fun, your hardware might not work and you have to repeat the process -- possibly multiple times. You can upgrade memory, increase the number of CPUs and add new hard disks to a VM with a few mouse clicks. You won't need any tools, yoga lessons or trips to the chiropractor after upgrading the hardware in a VM.

4. Snapshots

Before you read another line, go and take a snapshot of your favorite physical server. Can't do that, you say? You're correct, you can't. VMs have the unique fortune to have snapshot capability built in. A snapshot is an exact copy of your working VM prior to doing something to it that has the potential to make it not work. Fortunately, should that happen, you can revert to the snapshot and remove the faulty VM.  One of the issues that I've encountered is that having the BOD (Blue screen of Death) when an application or a Security Patch that is not compatible is installed.  Each time I have to keep my fingers cross that nothing happens when being asked to reboot after the installation for it to take effect.  
Since I virtualize it, before an application or Security Patch is to be applied, I'll take a Snapshot and then when after the reboot, the patch or the application doesn't cause any issue, I can just remove the snapshot and the VM will be operating as normal and it's updated.  This has helped me a lot.  I don't need to spend long hours to to backup and to reinstall the OS plus all the stuff from the scratch !! 

5. Prototyping

VMs are the perfect computer-flavored "guinea pigs" that happily promote the concept of a "do over." Using a standard VM, you can prototype an application, database or operating system enhancement without spending hours reimaging a physical system after each unsuccessful attempt.
Especially for the developers that needs to simulate the actual production system, I can always clone it out in a very short time to present to the developers to do their testing.  Once they're done with testing, I can just remove the VM.  If it's physical, then it will take a much longer time as I have to find another same specs hardware , GHOST from the original Hardware and then GHOST it to the new one for the developers to do the testing.  It's very tedious !!
6. Fast System Communications
Host-to-guest and guest-to-guest communications occur without any hops or standard physical hardware restrictions. Private VLANs create system-to-system communications that are secure and fast. Using a private VLAN for a group of VMs means that you can create a multi-tier application with limited outside network exposure and without a lengthy set of ALLOW and DENY network rules.

7. Easy Decommissioning

To decommission a physical system, you must touch the system multiple times: Turn off network ports, wipe the disks, unplug the system, remove the system from the rack and finally dispose of the system. A VM's decommisioning process involves the same general steps but there are no steps made to a data center. And, there are no systems to remove or to return. Removing a VM from inventory takes a few seconds. 

8. Templating / Templates for VM

How many gold disks does it take to support a data center? The answer is, one for every type of new hardware that passes through the magnetically-locked doors. How many Windows Server 2008 R2 VM templates do you require? One. You need one template that contains everything needed for deployment that, incidentally, takes minutes to complete. A template allows to truly create a single master gold disk for your system deployments.

9. Fast Deployment

VMs require no shipping, no installation, no power hookups, no network drops and no SAN cabling. Using templates or staged ISO images, VM deployments take minutes or hours not weeks or months.
In the past, to ask for a new server, it has to go through many approvals and "red tapes".  Once approve, then it takes time for the physical server to come in.

In virtualization, it's just a couple of clicks, and wa la ... the server is provision and can be hand over to the requestor on that particular day itself.

10. Dynamic Capacity

How far in advance would you have to plan to scale-up for a major marketing campaign that requires new physical computing capacity? Virtualization allows you to rapidly respond to changing business conditions. You can scale-up when you need extra capacity and scale back when you don't. Virtualization defines dynamic computing !!


A very warm welcome to my Blog on virtualization with Hyper-V.

Some history on virtualization by Microsoft.  

In 2008 , Microsoft first acquired a company called Calista Technologies to enable the virtualization from desktop to Datacenter.

The acquisition in detail are over here.

This is a start of Microsoft in the Virtualization Space.  The other virtualization players in this space are VMWare & Xen.

Stay tune to my blog as  news, happenings, technologies, "how-to", troubleshootings, sharings, best practices & more to come.