Problem migrating WinXP to .vdi

Discussions about using Windows guests in VirtualBox.
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Problem migrating WinXP to .vdi

Post by UncleBoarder »

I've read http://www.virtualbox.org/wiki/Migrate_Windows and I have one question...

Step 3 says I can use dd but also states "DO NOT image just the partition"... Can someone give an example of the dd syntax?

I've read the dd help, I'm not asking how to use it. I'm asking how to use it in this particular instance.
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem migrating WinXP to .vdi

Post by UncleBoarder »

That looks like a great idea, but...

I've been troubleshooting a VSS error for about 2 hours now with no success. And that means I can't use Disk2vhd. I generates an error "Error snapshotting volumes", and that's due to the VSS problem.

So my question stands. Maybe I can get it to work the old way with dd. Syntax?
Last edited by UncleBoarder on 29. Mar 2011, 20:16, edited 1 time in total.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Problem migrating WinXP to .vdi

Post by vbox4me2 »

Look at clonezilla then, that's basically an enhanced dd shell.
Or try dd if=\\.\PhysicalDrive0 of=D:\path\PhysicalDrive0.img
or search with google.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem migrating WinXP to .vdi

Post by mpack »

Another thing you could try is using CloneVDI with "\\.\PhysicalDrive0" as the source file name. CloneVDI does not use VSS, which means you must make sure to send the output to a different drive (otherwise it'll be modifying the drive its imaging... not sure what that would do!). Turn on CloneVDI's "compact" option for the copy, that will eliminate unused space and usually make the resulting VDI considerably smaller than a dd image.
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem migrating WinXP to .vdi

Post by UncleBoarder »

I'm not clear on your example... dd if=\\.\PhysicalDrive0 of=D:\path\PyhsicalDrive0.img

It's the source I'm confused on. Originally I tried...

dd if=/dev/sda2

But that's effectively copying the entire partition right?

How should I change my example above into something that will migrate properly?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem migrating WinXP to .vdi

Post by mpack »

UncleBoarder wrote:Originally I tried...
dd if=/dev/sda2
But that's effectively copying the entire partition right?
I thought you were trying to image a WinXP system, not a Linux one? On a Windows system the first drive (not partition) is identified using "\\.\PhysicalDrive0". /dev/sdax is Linux naming.

In any case it shouldn't matter. You do not want dd if you can avoid it.
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem migrating WinXP to .vdi

Post by UncleBoarder »

Maybe I'm confused on how this should work...

I AM trying to image a Windows drive but everything I've tried except Disk2VHD (which had errors) has problems with copying an operating system drive. So I thought I needed to run dd from linux. I booted to linux and accessed my windows drive (now referenced as sda2) to make the copy.

I've never seen that syntax, so that's very helpful!!

Should I be running dd as I am, from linux? Or running dd from within windows (trying to copy the same drive I booted from)?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem migrating WinXP to .vdi

Post by mpack »

UncleBoarder wrote:Should I be running dd as I am, from linux?
If you do prefer to use dd, then I imagine you would use the Windows port of dd. If you use dd from a Linux boot then I'll have to take your word for it how the drive is addressed.
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem migrating WinXP to .vdi

Post by UncleBoarder »

I will try Clonezilla tonight. But as you pointed out, that's basically a dd shell. I've already eliminated the other options presented...

Disk2VHD - Errors out.
CloneVDI - can't do a physical drive, only for .vdi files. (\\.\PhysicalDrive0 did not work)
GoVirtual - can't do the active system drive.

Do you have other suggestions?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem migrating WinXP to .vdi

Post by mpack »

I already told you in the support thread that CloneVDI does work with "\\.\PhysicalDrive0" as the source file. I tested it myself on a Win7 machine yesterday; on Win7 I admittedly did have to "run as administrator" as might be expected, but otherwise there was no surprise, and I told you about that too. Also, I just tested it again, this time on an XP host where the normal user account has admin rights, and again there was no problem - see attached picture below. Just make sure you get the source file name exactly right.

As to further suggestions: I can't think of any worthwhile suggestion you have not already had, but in any case I frankly don't see the point in offering you more complicated alternatives when you can't get the easy ones to work.
Attachments
Image1.jpg
Image1.jpg (64.38 KiB) Viewed 4767 times
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem migrating WinXP to .vdi

Post by UncleBoarder »

Thanks for sticking with me. I tried CloneVDI again and found that the "Proceed" button stays gray'd out until I clicked through the other info buttons at the bottom...

"Partition Info" "Header info" "Sector viewer"

Suddenly the "Proceed" button is available.

I'll try this later today. :-)

Thanks!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem migrating WinXP to .vdi

Post by mpack »

UncleBoarder wrote:I tried CloneVDI again and found that the "Proceed" button stays gray'd out until I clicked through the other info buttons at the bottom...
Sounds like a painting problem on your host. Usually a bad graphics driver, or perhaps buggy theme DLLs etc. You are running this on native Windows, right? The "\\.\PhysicalDrive0" trick will probably not work if you try it on Linux+Wine.
UncleBoarder
Posts: 69
Joined: 12. Aug 2010, 17:11
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem migrating WinXP to .vdi

Post by UncleBoarder »

Yes, native Windows... It doesn't look like a painting issue and I have no other video problems. Originally when I tried CloneVDI I put a xxxx.vdi file in as the source and the "Proceed" button DID work. Then I switched to \\.\PhysicalDrive0 and it gray'd again. I don't know... no matter, it DOES appear to be working now as you said it would.

But since it's a multi hour process, I'll run it tonight after work. And hopfully the only thing I'll add to this thread is when I'm done.

Thanks!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem migrating WinXP to .vdi

Post by mpack »

UncleBoarder wrote:But since it's a multi hour process, I'll run it tonight after work.
Remember to turn on the "Compact" option, as in the picture. That means you won't waste time copying unused space between drives. In my test earlier today that reduced the predicted time to completion from 16 hours to 24 minutes! Though of course the saving does depend on how full your source drive is.
Post Reply