How do I transfer an ol XP install to a VirtualBox XP VM

tankman1989

Active Member
Reaction score
5
I have a customer who has a lot of legacy apps that won't run on 64bit OS's so I installed Virtual box and installed XP Pro.

I needed to get her data off her machine so I put her HD into a Ubuntu server and I copied all the files from her system drive (the other drive is restore partition) to a folder in my home directory. I don't know if the command that I used is good enough, Here is what I did:
Code:
/mnt/oldsystemdrive# cp -rv ./* /home/myname/customerbackup/

Now I know that there are other commands like DD and what not that do a bit for bit copy but I think that would have copied the entire 180GB partition instead of the 20GB that she had.

Now if this data is "good to go" then what is the next step? I figure I can transfer the files from my Linux server to my new machine running VirtualBox with the new XP Pro VM. I'm just not sure about transferring things like registry, program files, etc, stuff that installs and such.

Would it be possible to just make a VM out of the files that I copied?

I apologize for being so out of touch with VM procedures and backing up / transferring system files/registry/program files, etc.
 
You have a copy of all her files however you are missing the boot record, partition table, file allocation table off of the hard drive. You couldn't just copy what you have on the ubuntu server into a VMware image and have a working system you would have to create an image file using DD or ntfsclone

dd the first megabyte or so to get the boot record and partition table

Code:
dd if=/dev/sda of=./diskimage.img bs=4096 count=2000

which will grab the first 8mb off the hard drive.

then run ntfsclone on the ntfs partition you want to save to get a shrunk down image (it only grabs the used parts) of the partition.

in the VM load up a hard drive the same size as the computer you are currently imaging off of*.

load up a linux livecd and dd your image onto the drive.

Code:
dd if=diskimage.img of=/dev/sda bs=4096

you may have to reboot at this point to get the partition tables of the hard drive to be recognized you can test with ...

Code:
fdisk -l

...if that shows up you can then use ntfsclone to put your image of the ntfs partition back into the spot on the vmhard drive.

And you are done if you are okay having a very large VM disk

*You can shrink the partitions using ntfsresize or (recommended) gparted and leaving a lot of unallocated space at the end.

From there add a second hard drive to the VM that's the size +10mb of the resized partitions.

Code:
dd if=/dev/sda of=/dev/sdb bs=4096

when it's done you can delete the first disk and you now have a virtual machine that can operate and not be full size of the original computers disk.


There is probably an easier way to do all this though, I would think if you have the drive slaved you could do some physical2virtual utility to get it done. But this is how I would do it absent such a tool.
 
Last edited:
I have a customer who has a lot of legacy apps that won't run on 64bit OS's so I installed Virtual box and installed XP Pro.

I needed to get her data off her machine so I put her HD into a Ubuntu server and I copied all the files from her system drive (the other drive is restore partition) to a folder in my home directory. I don't know if the command that I used is good enough, Here is what I did:
Code:
/mnt/oldsystemdrive# cp -rv ./* /home/myname/customerbackup/

Now I know that there are other commands like DD and what not that do a bit for bit copy but I think that would have copied the entire 180GB partition instead of the 20GB that she had.

Now if this data is "good to go" then what is the next step? I figure I can transfer the files from my Linux server to my new machine running VirtualBox with the new XP Pro VM. I'm just not sure about transferring things like registry, program files, etc, stuff that installs and such.

Would it be possible to just make a VM out of the files that I copied?

I apologize for being so out of touch with VM procedures and backing up / transferring system files/registry/program files, etc.
Could use VMware converter, run this on the machine you want to create virtual machine from, then use VMware player.
 
I use True Image with universal restore.

Create image.
Create VM with blank HDD
Boot VM from TI ISO
Restore image to blank virtual hdd.

Works 9/10 times.

I save really infected customer images and play with different AV and tools.
 
I have a customer who has a lot of legacy apps that won't run on 64bit OS's so I installed Virtual box and installed XP Pro.

I needed to get her data off her machine so I put her HD into a Ubuntu server and I copied all the files from her system drive (the other drive is restore partition) to a folder in my home directory. I don't know if the command that I used is good enough, Here is what I did:
Code:
/mnt/oldsystemdrive# cp -rv ./* /home/myname/customerbackup/

Now I know that there are other commands like DD and what not that do a bit for bit copy but I think that would have copied the entire 180GB partition instead of the 20GB that she had.

Now if this data is "good to go" then what is the next step? I figure I can transfer the files from my Linux server to my new machine running VirtualBox with the new XP Pro VM. I'm just not sure about transferring things like registry, program files, etc, stuff that installs and such.

Would it be possible to just make a VM out of the files that I copied?

I apologize for being so out of touch with VM procedures and backing up / transferring system files/registry/program files, etc.

This might be of interest to you: http://www.paragon-software.com/home/go-virtual/download.html

Works like a charm.

Rick
 
From what you describe, the files you have already copies won't to you much good unless you want to spend ages installing all the same programs etc. on that vm.

Virtualbox can natively use its own .vdi, VmWare's .vmdk, VirtualPC's .vhd as well as .hdd images.

If you have access to the old (working) machine, probably the easiest way is to use VMware Converter.

If you only have to the old hard disk, you can use True Image with Universal Restore. If you don't have that Acronis tool, I have successfully converted disk images made with Clonezilla to Virtualbox VMs but that does involve the same amount of work as taking a HDD from a PC with a dead mobo and getting Windows working with a new mobo. It can be done, but XP doesn't make it that easy (Vista+ or Linux handles something like that much easier).
 
From what you describe, the files you have already copies won't to you much good unless you want to spend ages installing all the same programs etc. on that vm.

Virtualbox can natively use its own .vdi, VmWare's .vmdk, VirtualPC's .vhd as well as .hdd images.

If you have access to the old (working) machine, probably the easiest way is to use VMware Converter.

If you only have to the old hard disk, you can use True Image with Universal Restore. If you don't have that Acronis tool, I have successfully converted disk images made with Clonezilla to Virtualbox VMs but that does involve the same amount of work as taking a HDD from a PC with a dead mobo and getting Windows working with a new mobo. It can be done, but XP doesn't make it that easy (Vista+ or Linux handles something like that much easier).

Paragon will convert a slaved drive to a VM. Do it with some frequency.

Rick
 
This might be of interest to you: http://www.paragon-software.com/home/go-virtual/download.html

Works like a charm.

Rick

I had to do a Physical2virtual job the other day

Loved that program. Worked like a charm. It+Vmware player and it was done.

I had to boot into UBCD4Win afterwards inside the VM it made and run the tool that updates the mass-storage (was getting stop error 0x00000000000zero0000zerozero000007f).

Afterwards worked like a charm. Used it on a slaved disk even.
 
Last edited:
You could also create and mount a new .VHD in Disk Management, clone the XP drive to it, unmount the .VHD, and attach it to whatever virtual machine you want in VBox/VPC.

I've done that with an old Vista drive and VBox before just to test, so I imagine XP should give you no headaches at all.
 
so what happens when XP realises that it's running on completely different hardware and triggers activation? I've had this happen before a while ago and it wouldn't let me activate and could never get into Normal mode, just Safe mode as administrator
 
well at that point you activate it.

I had to do it over phone for the one customer I had. But it activated just like normal.

Then it booted and I installed the VMware tools so it had the drivers needed for video, and ethernet.

One thing I would be weary of is in device manager under "Computer" if it says single processor, don't add a second processor to the VM. Well not unless you want to completely redo a HAL. (I don't have XP in front of me so not sure what the exact wording is for single or multi processor HAL's)
 
I did that, but it wasn't having any of it and ended up rudely hanging up on me

I think it mentioned something about software piracy even though it was a genuine installation of XP Home
 
I have a 100% success rate.

(However since I've only really done it once that isn't saying a whole lot).


The one time I had done a repair install on someones computer and realized their key was a pirated vlk it asked if I wanted to speak with an agent, I imagine you can try that as well.
 
I have a customer who has a lot of legacy apps that won't run on 64bit OS's so I installed Virtual box and installed XP Pro.

I needed to get her data off her machine so I put her HD into a Ubuntu server and I copied all the files from her system drive (the other drive is restore partition) to a folder in my home directory. I don't know if the command that I used is good enough, Here is what I did:
Code:
/mnt/oldsystemdrive# cp -rv ./* /home/myname/customerbackup/

Now I know that there are other commands like DD and what not that do a bit for bit copy but I think that would have copied the entire 180GB partition instead of the 20GB that she had.

Now if this data is "good to go" then what is the next step? I figure I can transfer the files from my Linux server to my new machine running VirtualBox with the new XP Pro VM. I'm just not sure about transferring things like registry, program files, etc, stuff that installs and such.

Would it be possible to just make a VM out of the files that I copied?

I apologize for being so out of touch with VM procedures and backing up / transferring system files/registry/program files, etc.

Why dont you downgrade her new computer to Windows XP. It looks like she already have a valid COA for Windows XP. If hunting for the drivers are the issue you can use DriverPacks to slip stream the SATA/LAN/WLAN/Video/Audio drivers using nLite then you can perform the installation.

It looks like the needs of your customer is more localized to Windows XP than to Windows 7. She is not yet ready to move to Window 7. As a business user she qualifies for a downgrade rights to XP.

Thats what I do to business customers that have programs that can't run under Windows 7. And remember, even though Windows 7 comes with "XP mode" it over taxes the system performance, it makes the system run slower because it has to virtualize another PC within a PC, it would be much better to just downgrade to XP, all of her current software will run plus her legacy application all within one single environment, and plus watch her system boot in less than 20 seconds under Windows XP, it will literally fly, and its a bonus you can use for your favor too, as she will be recommending to you future customers saying "look how this guy left my computer, its now blazing fast, boots up real quick and applications just starts the nano second I double click its icon", yeah, I know its a good feeling, you can leverage Windows XP low resource usage + nLite specialized tweaks in making your computer computer's blazing fast. Just be sure to install Mozilla Firefox and tell her to only use that browser for security reasons.

Remember, if you can resolve her problem without the NEED to VISUALIZE it will be simpler for her.
 
Back
Top