Make your Live system into a VHD

Page 1 of 4 123 ... LastLast

  1. Posts : 4,364
    Windows 11 21H2 Current build
       #1

    Make your Live system into a VHD


    Mark and Bryce have done it again. A lot of us have been clamoring about having a way to convert our *existing* installs into a VHD. Not only have they made such a tool, it can be done *live* - i.e. from the very same OS that you are booted into. You can even use the same HD to make the VHD (provided you have the required space of course).

    http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx said:
    Disk2vhd v1.0

    By Mark Russinovich and Bryce Cogswell

    Published: October 7, 2009
    Introduction

    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. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).

    Updated to 1.3

    This update to Disk2vhd makes more Windows XP and Windows Server 2003 VHDs bootable by updating their MBR and boot sectors to be compatible with Hyper-V and Virtual PC and by installing the Intelide driver if it it’s not already installed. It also optimizes image creation by not copying paging and hibernation files.






    See Disk2vhd for more info.
    Last edited by Airbot; 04 Nov 2009 at 09:33.
      My Computer


  2. Posts : 262
    windows 7
       #2

    this is nice, but I'd guess that most of the time the converted VHD won't boot inside a virtual machine. After cloning the files to the virtual disk, it's quite often that registry and system files need to be tweaked in order to boot.

    For example, dual core XP, will not boot inside a vm with a single virtual cpu.

    We will soon release MyOldPCs converter, which converts live system to vmdk/vhd/vdi, and can boot via vmware/vpc/vbox/hyper-V, etc. More info can be found here:

    http://www.vmlite.com/index.php/products/myoldpcs/
    (website still work in progress)
      My Computer


  3. Posts : 4,364
    Windows 11 21H2 Current build
    Thread Starter
       #3

    Care to expand upon your analysis?
      My Computer


  4. Posts : 262
    windows 7
       #4

    The hardware needs to be changed from physical machine to virtual machine.

    for example, you will have to enable IntelIde, PCI, and disable Intelppm, etc. for the hard disk controllers.

    Windows XP uses different kernel images and HAL for single cpu and multiple cpus. In modern times, physical computers are usually dual core, while virtual machine usually only has one cpu. So if you move windows xp vhd without any changes, it won't boot.

    There are many more stuff, mouse/keyboard, may freeze without changes, etc.

    This change is the challenging part, cloning a disk is now a mudane task on XP and later systems that supports Volume Shadow Copy. On other systems, it's very tough.

    We have implemented our own disk snapshot drivers on Windows 2000/xp/2003/vista/7/2008 (note MS does not have snapshot driver on 2k).

    We have also implemented a disks snapshot driver on Linux 2.6, so can perform hot clone on Linux too
      My Computer


  5. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #5

    With Paragon Virtualization Manager you can make an OS bootable on different HW. You can also transfer a partition or HD from both current system or image to a virtual disk.

    Interface is excellent, runs smoothly together with Partition Manager.

    Kari
      My Computer


  6. Posts : 5,941
    Linux CENTOS 7 / various Windows OS'es and servers
       #6

    Hi there

    if you use this method (or similar such as vm converter from vmware ) you need to make sure your real "OS" disk has PLENTY of space as part of the conversion process is to clone the existing disk via the LVM (logical Volume manager) on to the SAME partition as the existing OS -- so for example if your OS is 22 GB you'll need at least 22 GB FREE on the same partition. This is only used as temporary storage during the vhd creation process as the final target vhd can go to any drive / partition you select.

    Since people often want to separate their OS partitions from the rest of their system this method will come unstuck when there isn't enough space on the OS disk to create the LVM image.

    Cheers
    jimbo
    Last edited by jimbo45; 10 Oct 2009 at 18:04.
      My Computer


  7. Posts : 24
    Microsoft Windows 7 Professional 64-bit
       #7

    My knowledge of VM/VHD interaction is essentially non-existant, but huisinro's comments seem to be at odds with Russinovich's description of Disk2vhd operation.

    Disk2vhd

    where e.g. at the end of the page he shows a screen shot with the following caption:

    "Here’s a screenshot of a copy of a Windows Server 2008 R2 Hyper-V system running in a virtual machine on top of the system it was made from:"

    But I also see (or misunderstand) a slight contradiction to that when he says

    "Note: do not attach to VHDs on the same system on which you created them if you plan on booting from them. ..."

    as the disk signature assigned to the vhd will not match that in the captured image.

    So, what is the real story? Has the vhd being used in the screenshot had something tweaked, or a lot tweaked as huisinro suggests, or am I totally misunderstanding Russinovich's words, or ...?

    I would really like to understand.

    Roger
      My Computer


  8. Posts : 5,642
    Windows 10 Pro (x64)
       #8

    As it so says...
    On first boot, a VM booting a captured copy of Windows will detect the VM’s hardware and automatically install drivers...
    However, Windows XP is sadly not image aware therefore capturing it and then moving to a VM is a real chore. Windows Vista and Seven are imaging aware and can be moved around different machines. Just read a bit up on the WAIK documentation, it covers a lot of this kind of stuff.
      My Computer


  9. Posts : 24
    Microsoft Windows 7 Professional 64-bit
       #9

    Ah, thanks logicearth, I didn't know about WAIK. I'd seen a reference to AIK in a recent post, and finding out exactly what it referred to was just another of those tuits that I hadn't yet gotten around to!

    I've d/l the documentation and I'll look at it this afternoon.

    Roger
      My Computer


  10. Posts : 262
    windows 7
       #10

    The image shows Windows 2008 R2 running inside hyper-V virtual machine. I am not sure about these two combinations. It all depends on the original physical machine, the guest operating system and the virtual machine software. For instance, you don't need to do anything to clone Linux and run as VM. On the other hand, For Windows XP, you have to tweak it a lot.

    Our MyOldPCs converter handles all complicated cases in order to make the cloned virtual disk to boot.

    Give you another example, for ThinkPad laptops, you will have to modify the virtual disk's number of BIOS disk heads, otherwise p2v XP won't boot.
      My Computer


 
Page 1 of 4 123 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:59.
Find Us