Edit: ...no more. 1. Introduction First of all. HAVE A BACKUP OF YOUR DATA! There are some chances to destroy them. I've decided to migrate completely to Linux and run still needed Windows installations only in VirtualBox. So I have to convert my Windows Installations to Virtual Disk Images and manage these VDIs, e.g. increase, decrease or change their type from dynamically expanding to fixed-size etc. I have summarized my experience and information to this here in the hope it may also be helpful for others. In my examples below I use a Debian etch host system with Windows XP as guest, so Ubuntu should also work direct with them. But with another environment please adapt them to your needs. First solutions I have posted here: modify a VDI http://forums.virtualbox.org/viewtopic.php?t=364 import native WinXP http://forums.virtualbox.org/viewtopic.php?t=1404 Here is another solution from rcman80: http://forums.virtualbox.org/viewtopic.php?t=1878 litemotiv describes another way with HDClone (freeware 4mb) on this topic page 2: http://forums.virtualbox.org/viewtopic.php?t=585 Aaron_Mason describes an interesting way to convert from vmware to VirtualBox with rsync: http://forums.virtualbox.org/viewtopic.php?t=3808 This howto http://www.virtualbox.org/wiki/Migrate_Windows assumes that we already have an image.vdi but don't declare how to get it. Many thanks to QBikal for his excellent work to the internals of a virtual disk image! http://forums.virtualbox.org/viewtopic.php?t=52 I've tried to use with documentation at http://www.virtualbox.org/ticket/696. I do this: Code: Select all
Code: Select all
2. Abstract Independent of the current used operating systems you should be able to adapt my examples below to your needs if you understand the general procedure. 1. Do everything with the target operating system, e.g. partition and format virtual disks, copy data etc. 2. attach the source disks and the target disks as second and third passive devices to your managing virtual machine. So it is ensured that there are no files in access. 3. Modify a Virtual Disk Image This is the basic procedure. You copy all data from the old VDI to a new one and use that instead of the old one. Dependent on how you create the new one (bigger, smaler, new type) you can increase, decrease or modify the type of the VDI. 1. have a managing WinXP virtual machine 2. create a new VDI of the size and type you want 3. detach your working VDI from your working VM 4. attach your working VDI to the managing VM as primary slave 5. attach the new (modified) VDI to the managing VM as secondary slave 6. start the managing VM 7. partition and format the target drive F: (the new modified one!) 8. don't forget to set it active (set boot flag) in the disk manager if you want to boot from it later 9. to really copy all flags and whistles I use Code: Select all
10. shut down the managing VM 11. detach the new (modified) VDI from the managing VM 12. attach the new (modified) VDI to your working VM as primary master 13. start your working VM with the modified virtual disk that's it and only some clicks except the boring wait for xcopy. 4. Import a native installation from a physical disk partition The trick is to access the physical disk partition in the managing VM through raw hard disk access and copy that data into a virtual disk image. 1. have a managing WinXP virtual machine 2. create a writethrough virtual disk for the physical partition. You must be a member of the group disk (there are NO line breaks!) Code: Select all
3. create a target disk image that can hold all stored files from the physical partition 4. attach the physical disk as primary slave 5. attach the target disk image as secondary slave follow step 6. to 11. from section 3. 12. create a new VM with the coppied virtual drive as primary master 13. mount the Windows Setup CD 14. repair your copy, see http://www.virtualbox.org/wiki/Migrate_Windows that's it and should always work as long as repair does it. 5. Import a native installation from a raw disk image This is a little bit sophisticated because we can't access the raw image directly in a virtual machine to copy its data into a VDI. A raw disk image is something like made with dd, e.g. Code: Select all
1. have a managing WinXP virtual machine 2. Have the raw image 3. Create a fixed-size virtual disk image a little bit greater than your raw image (e.g. raw image = 10 GB, vdi = 11 GB). For further use it is important to use fixed-size! 4. Attach this new empty VDI to the managing machine as primary slave 5. start the managing VM 6. partition and format the fixed-size drive D: (the empty one!) 7. don't forget to set it active (set boot flag) in the disk manager if you want to boot from it later 8. shut down the managing VM 9. Grep the magic string "eb 52 90 4e 54 46 53" (= ".R.NTFS") with hexdump from the first MB of the VDI to get the offset the raw data starts at. The cryptic options for hexdump are only to get the offset in decimal and not in default hex (there are NO line breaks!). Code: Select all
Code: Select all
10. Copy your raw image into the VDI at the found offset. This only works with a fixed-size virtual disk image! (there are NO line breaks!) Code: Select all
12. Attach this working VDI to the managing machine as Secondary Slave. 13. Boot into the managing machine and check if the fixed VDI shows the copied data. You should do any check/repair actions on it. For this example I do: Code: Select all
follow step 12. to 14. from section 4. That's it. I have tried to repair the fixed-size VDI in the VM after step 10. above and boot it but with no success. Code: Select all
Hope I haven't made a mistake in my description. For me it works. |
HOWTO: manage VDIs and import native installations
HOWTO: manage VDIs and import native installations
Still working on this.
Last edited by Ingo on 8. Jan 2009, 14:02, edited 3 times in total.
Problems and Solutions
Problems and Solutions
P: After cloning an installation from a physical partition (section 4.) the WinXP Setup CD does not provide a repair option.
S: I imported the second partition from a dual boot installation. The essential boot files boot.ini, ntldr, NTDETECT.COM are only reside on the first boot-parttition. I copied these files to the drive (partition) I want to import and copied the drive again into a virtual disk image (section 4.).
P: After cloning an installation from a physical partition (section 4.) I repaired it successful. But he boot process fails with a BSOD complaining about intelppm.sys.
S: Disable intelppm.sys
http://forums.virtualbox.org/viewtopic.php?p=7155#7155
P: After cloning an installation from a physical partition (section 4.) the WinXP Setup CD does not provide a repair option.
S: I imported the second partition from a dual boot installation. The essential boot files boot.ini, ntldr, NTDETECT.COM are only reside on the first boot-parttition. I copied these files to the drive (partition) I want to import and copied the drive again into a virtual disk image (section 4.).
P: After cloning an installation from a physical partition (section 4.) I repaired it successful. But he boot process fails with a BSOD complaining about intelppm.sys.
S: Disable intelppm.sys
http://forums.virtualbox.org/viewtopic.php?p=7155#7155
Boot halts on MUP.sys
Ingo,
I have followed instruction from manual (9.9.2 Access to individual physical hard disk partitions) and have created the VMDK file from raw phisical partition, then I have created the VM using such file. The fact is....XP halts on MUP.sys driver during the boot.
Linux host: kubuntu 8.10
XP guest already working in dual boot from first HD partition
Vbox 2.10
PC Intel dual core 3GhZ with 2G RAM
1GB ram dedicated to VM
What else you may need ? Please let me know.
I am trying to get rid of this problem. FYI when I create a new VM from scratch (by installing a new XP OP) everything works fine ;(((
Thanks
Paolo
I have followed instruction from manual (9.9.2 Access to individual physical hard disk partitions) and have created the VMDK file from raw phisical partition, then I have created the VM using such file. The fact is....XP halts on MUP.sys driver during the boot.
Linux host: kubuntu 8.10
XP guest already working in dual boot from first HD partition
Vbox 2.10
PC Intel dual core 3GhZ with 2G RAM
1GB ram dedicated to VM
What else you may need ? Please let me know.
I am trying to get rid of this problem. FYI when I create a new VM from scratch (by installing a new XP OP) everything works fine ;(((
Thanks
Paolo
Hi Paolo,
it's over a year ago I used it this way and I'm not so familiar with the newest version of VirtualBox. So I'm afraid I can't really help you. But nevertheless let me try to understand your problem.
You have made a VMDK to access a physical partition on your hard drive. Then you created a virtual machine which used the physical partition (not a disk image file) as its hard drive. What is on the partition? Did you install the operating system in your VM to the partition? Or is there an "old" OS installation and you try to boot it with a virtual machine? The latter won't work because there is a completely different (virtual) hardware.
it's over a year ago I used it this way and I'm not so familiar with the newest version of VirtualBox. So I'm afraid I can't really help you. But nevertheless let me try to understand your problem.
You have made a VMDK to access a physical partition on your hard drive. Then you created a virtual machine which used the physical partition (not a disk image file) as its hard drive. What is on the partition? Did you install the operating system in your VM to the partition? Or is there an "old" OS installation and you try to boot it with a virtual machine? The latter won't work because there is a completely different (virtual) hardware.
The simplest way to a complex system is to start with a simple system.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Check the sticky in the Windows Guests forum. That has a more recent howto on how to accomplish this.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Posts: 1
- Joined: 5. Jun 2009, 19:30
- Primary OS: Ubuntu 8.04
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: XP
Re: HOWTO: manage VDIs and import native installations
Hi all. Ubuntu host and windows xp guest. Unfortunately I found this guide too late. I used another one found through google and that is what I did:
- create 2 hardware profiles in the windows xp native
- add the ubuntu user to the disk group.
- create vmdk file with VBoxManage
- register it in the virtual disks
- start virtualbox and boot into windows xp
it is working inside virtualbox and it boots. The only problem is that I cannot get the ethernet /internet to work. ANy hint?
The other problem is that if I try to boot windows natively, it freezes at startup screen and not responding in any way (even the reset button or the hardware on/of button), the only way to restart is to unplug power cable.
Any help? thanks in advance
- create 2 hardware profiles in the windows xp native
- add the ubuntu user to the disk group.
- create vmdk file with VBoxManage
- register it in the virtual disks
- start virtualbox and boot into windows xp
it is working inside virtualbox and it boots. The only problem is that I cannot get the ethernet /internet to work. ANy hint?
The other problem is that if I try to boot windows natively, it freezes at startup screen and not responding in any way (even the reset button or the hardware on/of button), the only way to restart is to unplug power cable.
Any help? thanks in advance
-
- Posts: 57
- Joined: 27. Apr 2008, 15:19
OS X 10.7.x or 10.8 (Build 12A269) in VirtualBox
In Ask Different: How can I install Mac OS X Lion in VirtualBox, or any other type of virtual machine?
Amongst the answers:
* 10.7.x or 10.8 (Build 12A269) in VirtualBox
– uses VBoxManage convertfromraw with stdin
Amongst the answers:
* 10.7.x or 10.8 (Build 12A269) in VirtualBox
– uses VBoxManage convertfromraw with stdin
-
- Posts: 5
- Joined: 12. Aug 2012, 08:29
Re: HOWTO: manage VDIs and import native installations
It is very helpful!