Hyper-V P2V using Disk2vhdThe ability to convert existing Physical hosts to Virtual machines is often the biggest return on investment benefit to justify the case for virtualisation. Taking a legacy platform often on older, unsupported hardware and software, and converting it to a virtual machine running with many other machines, but on new, high capacity hardware taking up less space and power is a key driver for virtualisation.
Older systems consuming a relatively high amount of energy and space for what is now very low processing power, can be converted to VM’s hosted on much more powerful hardware for a similar footprint but with much increased agility through the well understood benefits of virtualisation.
A recent project The Full Circle (www.thefullcircle.com) undertook as part of our private cloud practise, was to rationalise several older HP ProLiant DL360 servers (one had a BIOS dated 08/03/2001 – over 10 years old!) each taking 1U of rack space, some with dual power supplies, dual network adaptors, mirrored disks, etc. all generating high heat output (which in turn has high cooling costs).
Online Windows server capture using Sysinternals Disk2vhd utilityIf you haven’t got Microsoft’s Virtual Machine Manager suite and you don’t want to spend many hours backing up the source server, creating a blank VM, installing a base O/S and then hoping a restore will work without hours of troubleshooting disparate hardware issues… really?!?! there is a handy alternative from those clever folks at Sysinternals – disk2vhd.
From Sysinternals “Disk2vhd is a utility that creates VHD (Virtual Hard Disk – Microsoft’s Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows’ Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion.”
Overall P2V process as easy as 1,2,3…Of course it’s not as easy as 1,2,3… this process may take from only a couple of hours to a couple of days per server but its a straightforward process with no fundamental ‘gotchas’ – although in-between application licensing, network infrastructure issues, and later VM contention (disable those traditional backup agents!) – this part may prove to be the simplest part of the process, which is:
- Capture of source physical host/server
- Audit hardware and software build
(recommend paid tools such as Belarc, but also include built-in such as systeminfo)
- Full Backup! (whilst no changes planned to source machine a backup maybe useful later)
- Disk conversion from physical source to Virtual Hard Disk file target (VHD)
- Build of Virtual Machine / VM hardware to be a near-as match to the source hardware in terms of major physical resources such as CPU, Memory, Disk, and Network
- Attach the created VHD file, note this will be one Disk that may contain multiple partitions
- Clean-up of new virtual machine hardware and system software
- Install the Hyper-V Integration Services (may have pre-reqs..) and restart
- remove superfluous hardware devices, drivers, and system software (may require several restarts)
- Check the event logs for any errors to determine if serious or can be ignored
- Test, test, test!
Steps in more detail..
Running disk2vhdYou don’t even need to permanently install the tool on the source machine, simply browse to http://technet.microsoft.com/en-us/sysinternals/ee656415 and click ‘Run Disk2vhd’
choose your source drives, enter a suitable target destination with sufficient space and click create – this may take some time (as in several hours depending on size, speed, network, etc.)
Setting up the captured hard diskThe disk captured by disk2vhd will be a single hard disk image of the selected partitions/volumes, this may be fine if they combine less than 127GB as the first Hyper-V bootable disk has to be attached to the IDE controller (with a disk limit of 127GB)
Here’s a grab of a SCSI based system which had 2x72GB SCSI disks as a single RAID disk
P2V for Windows Server 2003 onto Hyper-VWindows Server 2003 machines require Service Pack 2 to be installed before the Hyper-V Integration Services can be installed – get ready to install using the keyboard as until the IS bits are installed you have no mouse!
Removing superfluous hardware devices, drivers, and system softwareYou need to get familiar with removing hidden devices and how to show non-present devices by following the Microsoft KB ‘Device Manager does not display devices that are not connected to the Windows XP-based computer’ basically:
And then show hidden devices, to allow removal of the no longer supported devices, below shows the main areas to cover from a HP ProLiant server to VM:
I’m fairly confident to remove ALL hidden devices, especially if its a device that has been replaced by another ‘active’ / non-hidden instance of the same name e.g.
worst case, you can always re-scan for hardware changes or restart the machine – you’ll be doing a restart (or two or more..) at the end of the process anyway.
Some things should be removed that are not hiddenSome devices won’t be hidden, but if you know your hardware and device drivers fairly well you should be able to spot the obvious candidates for removal, e.g. the Compaq Smart Array Controller drivers used for managing the hardware disk array.. cpqarry2 is definitely one to go..
but most will (be hidden), including related components…
(I think the Pentium III chip can go in this case! )
Note – some of these may prompt for a restart, I normally bank several restarts together, but some system software to be removed may require a restart to uninstall cleanly..
System software uninstallation and many restartsMost server systems may also have significant software components to uninstall, in this case several HP components that talk to proprietary HP systems management components that will no longer be present in the virtualised machine.
HP Network Teaming Utility – where is that software?The HP Network Teaming Utility – easily spotted on most HP Windows server systems by the logo in the system-tray, however the software is not that easily found as doesn’t appear in Add/Remove Programs nor is removed from Device Manager.
Open network connections (ncpa.cpl) and select the ‘HP Network Configuration Utility’ then select Uninstall – you should be prompted to uninstall per:
You’ll be prompted for a restart, and by now the system probably deserves one!
Recreate your Network connectionsIts time to dig out that systeminfo report, as that’s going to have a concise listing of the source server’s network settings in terms of IP addresses, etc. – if you’re converting from large-frame/iSCSI with VLANs etc. then that scenario is slightly beyond the scope of this post – sorry, but some things have to be billable!
Errors on start-up?You are bound to get some start-up errors at the end of the process, although hopefully these should be insignificant such as a w32tm service unable to update from NTP or a domain controller due to network changes (e.g. still testing on a private network). You may also have dependency components that still require removal such as a System Management Controller via the Service Control Manager (typical event id 7000 stuff).
Fire up the Event Viewer (eventvwr) regardless and have a trawl through the event logs, even if you didn’t get a error starting service alert on start-up you may find issues that require further investigation – effort here will be worthwhile for a stable and error free machine.
At the end of the process…When you’re finished, sit back crack open a can (if you won’t get caught with food and drink in the data center) and have a think what nice new tin you’ll replace all those gaps in the rack with… mine would be Stella… Better still, for you, the company and the planet, return a few racks to the data center manager / co-lo provider, and ask for a bonus from all the carbon you’ve saved
Added a week later..
It doesn’t always work…..and does have limitations e.g.
The disk is too large for a dynamic VHD…
19:15 | | 1 Comments
hyper-v powershell management libraryPowerShell management Library for Hyper-V
A project to provide a PowerShell management library for Hyper-V
It does pretty much what it says. Note that a lot of the information available from Hyper-V is only available if Powershell is running with Elevated privilege
At present there are 80 functions in the library, some of these are worker functions which are not expected to be called directly, the others are listed below.
_NOTE: The version of PSHyper-V available in the Source Code section is under active developement and is not guaranteed to be stable. If you require a stable release, please use one of the versions from the download area
Finding a VM
Get-VM, Choose-VM , Get-VMHost
Connecting to a VM
Discovering and manipulating Machine states
Get-VMState , Set-VMState , Convert-VmState,
Ping-VM , Test-VMHeartBeat, Shutdown-VM , Start-VM, Stop-VM, Suspend-VM
Get-VMKVP, Add-KVP, Remove-KVP, Get-VMJPEG
Backing up, exporting and snapshotting VMs
Export-VM , Import-VM, Get-VMSnapshot, Choose-VMSnapshot , Apply-VMSnapshot , New-VMSnapshot ,Remove-VMSnapshot, Rename-VMSnapShot, Update-VMSnapshot, Get-VMSnapshotTree, Get-VmBackupScript
Adding and removing VMs, configuring motherboard settings.
New-VM , Remove-VM , Set-VM , Get-VMCPUCount, Set-VMCPUCount, Get-VMMemory, Set-VMMemory, Set-VMSerialPort
Manipulating Disk controllers, drives and disk images
Add-VMSCSIController , Remove-VMSCSIcontroller
Get-VMDriveByController , Add-VMDRIVE , Remove-VMdrive
Get-VMDiskByDrive, Add-VMDISK , Set-VMDisk, Get-VMDisk
Get-VMFloppyDisk , Add-VMFloppyDisk
Manipluating Network Interface Cards
Get-VMNic , List-VMNic , Choose-VMNIC, Add-VMNIC, Remove-VMNIC , Set-VMNICAddress , Set-VMNICConnection , Get-VMNicport ,
Get-VMnicSwitch, Choose-VMSwitch, New-VMSwitchPort, Get-VMByMACaddress, Choose-VMExternalEthernet,
Working with VHD files
Get-VHDDefaultPath, Get-VHDInfo, New-VHD, Compact-VHD, Test-VHD,Convert-VHD,Merge-VHD,Mount-VHD, Unmount-VHD
how to install Hyper-V in windows server 2008 R2
Hyper-V is one of the best hardware virtualization technology in the industry. This technology is based on hypervisor which is one of the core and important features of Windows Server 2008. The hyper-v technology offers a scalable, flexible, reliable and highly powerful virtualization platform for webmasters to make strong use of it. Its key features such as guest multi-processing support and 64-bit guest and host support, the high reliability and greater security via its hypervisor architecture tends to offer greater scalability and high performance to its users.
It also offers more flexibility and ability to manage various things by using the features like quick migration of the physical servers to the hyper-v virtual machines and another physical hosts, along with the integration with SCVMM (ie. System Center Virtual Machine Manager).
When you run the full installation of Hyper-V role on the Windows Server 2008, it usually installs all the essential elements of the Hyper-V technology along with the remote management tools which consists of various tools. These management tools includes Hyper-V Manager, which is a management console from Microsoft and the Virtual Machine Connection, that allows you to access the virtual machines directly via a network connection.
Lets, begin with the installation process of hyper-v on windows server 2008. Before starting with the installation procedure make sure you have the following required things.
Requirements for Installing Hyper-V:
Hyper-V is a bit different virtualization technology, hence requires particular hardware for successful installation. Please make sure you have the following things.
1) x64-based Processor: The hyper-v can only be installed on the x64-based versions of Windows Server 2008, which are Windows Server 2008 Standard, Enterprise and DataCenter Edition.
2) Must have a processor that consists of virtualization options enabled or the HAV should be enabled in the BIOS. The Intel VT and AMD Virtualization includes such options. Along with the HAV, the Data Execution Protection should also be enabled in the BIOS. Make sure you enable the Intex XD bit or AMD NX bit.
If you have Itanium processors, it will not work as the hyper-v doesn’t support these processors.
Enter the BIOS setup of your server and enable both the “VT” and “XD”. If these two components are not enabled in the BIOS, you might get the following errors messages in the event logs, even after the installation is completed.
- Hyper-V launch failed, Either VMX not present or not enabled in BIOS
- Hyper-V launch failed; at least one of the processors in the system does not appear to provide a virtualization platform supported by Hyper-V.
Hence, make sure that the Execute Disable and VT is set “On” or “Enabled” based upon your servers BIOS settings.
Hyper-V Installation Steps:
Step 1: Again, before proceeding to the installation steps make sure your windows server is properly configured with the above BIOS settings. Make sure the following things are configured correctly.
- The Administrative password is setup;
- Computer name for server is configured;
- A static IP is set on all the related NICs;
- Your server is activated;
- If necessary make sure you join the server to a domain;
- For remote administration configure the firewall;
- For remote administration enabling the RDP.
Step 2: Open the “Server Manager” and simply click on the “Add Roles”.
Step 3: Select the “Hyper-V” role as shown in the image below and Click on the “Next” button. Choose Hyper-V role. Click Next.
Step 4: You can create connections to a whole network simply by clicking one or more network adapters on the “Create Virtual Networks” window.
It is recommended to have at least two network adapters, which can be used for different purposes. One for virtual network and another for server management.
Step 5: Click the Install button on the “Confirm Installation Selection” window.
Step 6: In order to complete the hyper-v installation you need to restart your computer system. Simply click on the “Close” button to finish the wizard and hit the “Yes” button to restart your computer.
Step 7: Log on using the same credentials used to install the hyper-v role. Once the Resume Configuration Wizard completes the installation process, simply click the “Close” button to finish the wizard.
“The Microsoft iSCSI Software Target is a free iSCSI storage solution. It is included as a part of Windows Storage Server 2008 R2, and it is a free download for Windows Server 2008 R2. This allows a Windows Server to become a shared storage solution for many computers. It also provides an economic way to provide an iSCSI “SAN” for a Failover Cluster, such as Hyper-V.This document will detail how to build a 2 node Hyper-V cluster, using the Microsoft iSCSI Software Target for shared storage, which is managed by System Center running on virtual machines, hosted on another Hyper-V server and stored on the same shared storage.”
Read Full Story Here ->->->
Powered by Blogger.