VMware vSphere

 View Only
Expand all | Collapse all

Is it possible to convert from a hard disk?

DSTAVERT

DSTAVERTNov 26, 2009 08:52 PM

  • 1.  Is it possible to convert from a hard disk?

    Posted Nov 23, 2009 07:52 PM

    In the documentation there are a number of optional sources for a clone:

    • Live cloning from a running machine

    • Cloning from a backup disk image (Acronis, etc)

    • Cloning from a virtual disk file (vmdk, vhd etc)

    But I see no mention of cloning from a physical hard disk, is that possible?

    It seems a waste to first create an Acronis backup image of the hard disk of the system to clone, then use Converter to create a virtual machine from this image.

    What better image is there than the real disk drive of the PC to clone?

    And as in my case I would like to clone the hard drive to a virtual machine since the laptop it ran on is now non-functional.

    So I cannot clone live and the only way to create an Acronis image is to run Acronis on another box with the laptop drive attached via USB.

    Would be simpler if the source could be the actual drive itself....



  • 2.  RE: Is it possible to convert from a hard disk?

    Posted Nov 23, 2009 08:27 PM

    Thatfunction was in old "P2V - assistant" but never was in Converter.

    To do that I use vmware-vdikskmanager to convert the physical disk into a vmdk and then use Converter to patch the drivers




    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay



  • 3.  RE: Is it possible to convert from a hard disk?

    Posted Nov 23, 2009 09:12 PM

    That sounds like a good approach, but I can't find the vdiskmanager in my VMWare Workstation 7....

    I have looked in all the menus and also in the help without success.

    Is it a separate download from VMWare?



  • 4.  RE: Is it possible to convert from a hard disk?

    Posted Nov 23, 2009 09:14 PM

    vmware-vdiskmanager is a command line tool

    first create rawdisk descriptor with the GUI then use vdiskmanager - I expalined that here

    http://sanbarrow.com/moa-video-vdiskmanager-as-ghost.html






    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay



  • 5.  RE: Is it possible to convert from a hard disk?

    Posted Nov 23, 2009 10:05 PM

    I read the explanation and after a few trials I think I got the idea:

    I have done this so far:

    - Used an existing non-running virtual machine to create a linked vmdk and set it to point at the drive to clone (and partition if that is the case)

    - Saved it in the conversion directory

    - Entered the command for cloning as follows (assuming the exe is on path):

    vmware-vdiskmanager.exe -r

    Here type 0 means an expanding disk and DiskClone.vmdk must not exist when the command is issued

    It's been running a couple of minutes now and the new vmdk has grown to 3.5 Gb in size and the display shows 2% done.

    Hmm, now it shows 4% done but Windows explorer still shows the file size as 3500 Mb, how come it stopped growing?

    In actual fact the source drive partition is 200 Gb but contains only 60 Gb of actual data, so I expect the destination vmdk to be about that size when it is done, right? Looks like it will take quite some time too...

    Once it is done, I assume I have to use the Converter to set the hardware differences, right? How is that done?

    (I have not yet installed the converter version 4, but I have an older one (3.0.2) installed that I never used )



  • 6.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 06:00 AM

    So now I have successfully created the virtual disk image of the physical disk using vmware-vdiskmanager.exe.

    Then inside VMWare Workstation I created a new virtual machine using this disk image as the disk for it. I made it a WinXP virtual machine and used the defaults except for networking which was set to bridged.

    Then I used the VMWare converter 3.0.2u1-62546 which I had already installed on my PC and used the Configure function since the disk conversion was already done. Configure opened up the virtual mchine and did something inside the vmx and vmdk files and finished in quite a short time.

    So I then tried to start the new vm from WorkStation, but it failed. I am only seeing a black screen with a blinking cursor. Apparently it is not booting.

    If I check the vmdk by looking into it with WinImage all seems to be just fine and dandy. The boot.ini file looks fine for example.

    The source disk was a 320 Gb drive with two partitions, one 200 Gb system part with about 70 Gb of data and where Windows was installed. The other was a 120 Gb data partition with a lot of data. But I figured that I could cope with that data later so I only converted the system partition, was this an erroneous decision?

    What do I do now to make the virtual machine boot up?



  • 7.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 07:35 AM

    More info:

    I decided to boot from an XP install CD to try to repair the installation.

    To my surprise the XP setup did not see any hard disks on the PC!

    But if I attach the vmdk to another XP virtual machine and boot it up then I can see this disk in disk manager and it is a healthy NTFS active partition on it.

    I tried to remove it from my virtual machine and then re-add it but it seems not to make any difference.

    If I start to BIOS the disk is not visible at all!

    What is going on here???



  • 8.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 10:38 AM

    to me everything looks fine - now create a new VM and add the converted disk.

    Then use Converter 3.0.3 to patch it.

    Load converter and then use the "configure machine" wizard against the vmx-file of the new VM




    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay



  • 9.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 01:56 PM

    OK, just to make sure I did not miss anything I did the following:

    • Removed the virtual machine I had created before from the console

    • Renamed the directory

    • Created a new dir for the new machine

    • Moved the vmdk file into this dir

    • Created a new virtual machine and at the end pointed it to the vmdk file

    • It was listed as SCSI

    • Closed Workstation

    • Ran Converter 3 aginst the new machine

    • Started Workstation and noted that the drive was still listed as SCSI

    • Booted the machine and am now looking at a black window with a single underline cursor...:(

    Then I repeated the above but this time when I created the new machine I used the simple wizard and here I could not select an existing disk so I let it create a new disk.

    At the end I then deleted the created vmdk file and renamed my existing one to the same name.

    Now the disk is listed as IDE.

    Convert and start results in the same black screen with a cursor.....



  • 10.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 02:31 PM

    the last part of your actions was not wise - do not rename vmdks manually.

    Things to check:

    does the disk have ntldr, ntdetect.com and boot.ini in the root of the disk ?

    is the partition set to active ?






    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay



  • 11.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 02:51 PM

    ntldr, ntdetect.com and boot.ini are all there.

    I tried to see if the partition was active in the following way before:

    • Connected the vmdk to another XP virtual machine as a second drive

    • Started it and went to Computer Management/Disk Management

    • There the drive was listed as containing one partition NTFS Active and about 100 Gb of nonpartitioned space.

    So I guess it is set as Active....

    Now I have also tried to do an XP repair by also adding the SCSI drivers from a floppy (the one downloadable from VMWare). This is discussed in a thread in the Workstation discussions.

    This made XP setup recognize the drive even though it was SCSI, which did not work before.

    I also went into the BIOS and made sure that the boot is to the SCSI drive 0:0.

    But after the repair install it still boots to a black screen with a single cursor. :smileysad:

    I MUST be doing something stupid here.....



  • 12.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 03:40 PM

    attach vmware.log from last failed start




    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay



  • 13.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 03:49 PM

    Log attached



  • 14.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 04:18 PM

    try to boot the VM from the floppy image I attached




    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay

    edit : removed the boot-floppy-image



  • 15.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 05:26 PM

    Thanks, I will do, but right now I am back home and have started moving the converted vmdk file off my main PC disk to make room for another conversion of the same drive, but this time with both partitions included.

    Moving big files between disks is not a quick process when the disks are USB connected. 32 minutes reported as the remaining time.... :smileysad:

    I looked in the floppy image and found just three files, ntldr, ntdetect.com and boot.ini

    The boot.ini looked like it was for a multiboot situation but I may be mistaken.

    Is the purpose of this exercise to figure out if the virtual machine detects the files at all?

    I mean, how can I boot the entire guest off of a floppy????



  • 16.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 07:04 PM

    THANKS!

    The floppy did the trick of at least connecting to the converted machine!

    But it needed the XP-SP3 CD again so I had to insert it for it to continue and then it looked like a fresh install or possibly an upgrade was taking place.

    When it finally rebooted I was out of the room so I did not have time to disconnect from the floppy, hence it booted from that again.

    But now it is actually running my old laptop in the virtual machine! :smileyhappy:

    While this was being installed I realized that there are a few things that might not be appropriate, for example I have VMWare Workstation installed on my laptop so now there is a workstation within a workstation, probably not a good idea...

    I realized that when I had mouse integration while the setup was running without installing the VMWare tools...

    Now I am going to look it over and then disconnect the floppy and try rebooting on its own.



  • 17.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 07:51 PM

    Situation is as follows:

    • I have successfully logged on to the converted virtual machine and performed some cleanup action on it including uninstalling VMWare Workstation.

    • But when I restart it again hangs on the boot screen without getting anywhere.:(

    • If I connect the floppy with the boot files then it boots to the multiboot screen with the 4 alternatives.

    • After the timeout my main machine boots up after displaing a long list of messages plus showing a strange screen talking about checking of the file system.

    Question:

    Now that it seems like the converted image works but just don't want to be booted automagically, how can I put the equivalent of the floppy on to the main vmdk disk image so it boots by itself?



  • 18.  RE: Is it possible to convert from a hard disk?
    Best Answer

    Posted Nov 24, 2009 08:41 PM

    there is no need to do this - why ?

    edit the floppy and set the timeout to 1 and preset the correct choice then it is as good as booting from disk.

    If you are interested in this for the learning effect I suggest to check the PBR of the boot-partition and recreate it if it is damaged - this is nothing that I could explain in a few minutes so research it yourself




    ___________________________________

    VMX-parameters- VMware-liveCD - VM-Sickbay



  • 19.  RE: Is it possible to convert from a hard disk?

    Posted Nov 24, 2009 08:57 PM

    Yes, you are right! :smileyhappy:

    I already edited out the extra operating system options and the flag to list the drivers and reduced the timeout too.

    Then I put the floppy in the VM folder and connected it to the floppy (permanently).

    Works like a charm!

    I want to extend my appreciation for the time you have spent helping me out today! Many thanks! :smileylaugh:

    Edited:

    For future references I would like to just list the files that were present on the virtual floppy disk...

    ntldr (from 2005-11-30 13:00)

    NTDETECT.COM (from 2005-11-30 13:00)

    boot.ini

    Contents of boot.ini after I edited out the choices:

    [d-12537]
    timeout=5
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="2k3 hd0 part 1" /noexecute=optout
    

    This works fine to boot up the unbootable virtual image.



  • 20.  RE: Is it possible to convert from a hard disk?

    Posted Nov 26, 2009 08:52 PM

    removed



  • 21.  RE: Is it possible to convert from a hard disk?

    Posted May 27, 2010 07:51 AM

    Hi All,

    I have been told to migrate a physical laptop having 3 drives( one OS(VISTA), another 3 gb for bitlocker and one drive with some data's) into VMware(virtual). bitlocker is enabled for the OS and full data is encrypted.

    If I get the VHD file after capturing all the things, then it can be converted into VMDK using Winimg software.

    But I am not getting the point how to migrate it into VMware VMDK file.

    PLs help me with this....

    thanks,

    Abhishek



  • 22.  RE: Is it possible to convert from a hard disk?

    Posted May 27, 2010 10:15 PM

    ? - please explain - a vmdk from winimage should be usable with VMware




    ___________________________________

    VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook



  • 23.  RE: Is it possible to convert from a hard disk?

    Posted May 28, 2010 05:18 AM

    Hi,

    I have used "vmware vcenter converter standalone" for migrating phyical machine to virtual. I have been told to migrate a physical machine with Vista into a virtual machine.

    So, for doing this I have installed client/server setup on source and server side. From server side I have controlled the migrating activity by giving IP address of source computer and its credentials...

    Process goes well uoto 95%, but it failed at that with the error " reconfiguration failed" . I checked in task sequence and error " unable to find the system volume, reconfiguration is not possible"

    Note, I have given saved location to the source machine only but on other drive and deselected that drive for migrating. I selected only c:\ other 2 drives deselected, CPU 1 , RAM 648MB....

    Pls help me in this....what could be the problem and how to fix it out.



  • 24.  RE: Is it possible to convert from a hard disk?

    Posted May 28, 2010 09:54 AM

    What happens if you try to boot that VM ?

    By far the easiest trick for your scenario is to use vmware-vdiskmanager for the imaging part.

    So, for doing this I have installed client/server setup on source and server side.

    sorry - that statement means nothing to me - please explain




    ___________________________________

    VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook



  • 25.  RE: Is it possible to convert from a hard disk?

    Posted May 28, 2010 11:21 AM

    There are two options if we go for installing Vmware Vcenter converter one is for Local host and other for Client/server. I have selected server/client installation for installing Vmware Vcenter converter standalone on server as well as client side.



  • 26.  RE: Is it possible to convert from a hard disk?

    Posted May 28, 2010 03:42 PM

    What happens if you try to boot that VM ?

    please answer that question first




    ___________________________________

    VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook