[SOLVED] P2V Disk sizes

Discussions related to using VirtualBox on Linux hosts.
Post Reply
chameau
Posts: 30
Joined: 11. Aug 2019, 18:53
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 7 pro

[SOLVED] P2V Disk sizes

Post by chameau »

I'm trying to convert an old install of Windows XP into a VM. I remember reading somewhere about disk size limitation of 127GB This limitation does not concern me as I'm well below that, but I'm still a bit confused about the relationship between physical disk size and virtual disk size.

The physical partition (C: drive) is 138GB with 95GB free, so app 43GB of data

The destination partition on a linux mint laptop is only app 60GB free.

My question is, do I need to shrink the physical C drive down to about 45GB before converting it to a VHD (using Disk2VHD)? or does the VM only consider the size of the actual data in C drive?

I actually already done a conversion (before I remembered about the disk sizes) of the 138GB C drive and the VHD is only 30GB? (maybe some compression?)
I did not yet try to install it, as I feared I would get an out of disk space error
Last edited by chameau on 19. Mar 2020, 12:05, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: P2V Disk sizes

Post by scottgus1 »

Googling

disk size limitation of 127GB

leads to https://social.technet.microsoft.com/Fo ... rverhyperv where it is said:
The 127 Gb limit for the maximum size of a VHD was a limitation of the implementation of Virtual Server and VirtualPC - 127 Gb was the maximum size an ATA interface could support, therefore was an old ceiling.
'Tis a moot point now.

See https://www.virtualbox.org/wiki/Migrate_Windows there's things to do to XP before you migrate it to the VHD. Most of it is old, but the point #1 is still very valid:
1. Run the MergeIDE utility as mentioned above on existing windows machine.
A VHD of the existing disk with 43GB of data on it should be about 43GB in size, assuming there's a "only copy used sectors" or some such present & activated.

Be sure to Disk2VHD all the partitions: just the C drive will not boot the XP OS.

You should use either Virtualbox's clone command or Mpack's CloneVDI (use CloneVDI it's easier) to make a .vdi out of that .vhd for the guest to use instead. vhd's have a design flaw that may cause total disk failure if the host has a disk glitch while the vhd is expanding.

The partitions in the VHD will be 138GB and will try to fill up that much over time, so you will want to shrink that main partition to the size you want the final virtual drive to be on the host PC, to prevent unexpected disk trouble in the guest one day. Booting the guest with Gparted will probably be necessary.
chameau
Posts: 30
Joined: 11. Aug 2019, 18:53
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 7 pro

Re: P2V Disk sizes

Post by chameau »

Ok the 127GB limitation does no longer apply - got it thank you.
Be sure to Disk2VHD all the partitions: just the C drive will not boot the XP OS.
Its a 1TB drive on a pre-uefi motherboard (the hdd controler is set IDE) the partitions are all NTFS and the boot loader is MBR. When I first installed Windows XP, I crated 2 partition: C drive of 138GB that contains Windows and other Apps, and the rest of the drive as L drive that is not-used (I actually moved the 'Pagefile' to it some years ago, but I can easily remove it). The thinking at the time was that Windows will load quicker if on a smaller partition. The computer also has a second physical HDD also 1TB that contains various data only partitions (NTFS). That was an easier and safer way for backups and imaging. So you're saying that 'Disk2VHD' is not smart enough to pull in the MBR along with the C drive? There were only 2 tick boxes to chose from in D2V: C drive and L drive and there was no option for 'whole disk' and I can't have a 1TB virtual drive in a 60GB partition! The laptop where I want to create the VM has only 1 small SSD of 180GB running Linux Mint in its usual partitions (root, swap, home).
So if you're right, the only thing i can do is delete L partition, shrink C drive to what I need and make the resulting space 'unallocated' and then D2V that (still will only have option to tick C drive)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: P2V Disk sizes

Post by scottgus1 »

Here's what Disk2VHD looks like on my tablet:
Disk2VHD window.png
Disk2VHD window.png (96.09 KiB) Viewed 3086 times
I see four boxes to check, three on my main drive and the fourth (E:) is my SD card. I would check the first three to copy my main drive.

If your drive L: is also on your main drive I think you can skip it. Be sure to check the C: drive, and if there are other small system partitions check them too. When I self-installed XP in the past I think there were no other partitions in the front of C: like 7, 8, 10 like to make. If all you see is two checkboxes, C and L, then just check C.

Leave Shadow copy checked. Use Mpack's CloneVDI to male a VDI copy of the VHD or VHDX. Use the VDI in your guest.

One other thing, run MergeIDE in the existing XP before Disk2VHDing, or the copy won't boot. See How to migrate existing Windows installations to VirtualBox, XP section, point #1. (Most of the rest is old, but point #1 still applies for XP.)
chameau
Posts: 30
Joined: 11. Aug 2019, 18:53
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 7 pro

Re: P2V Disk sizes

Post by chameau »

Ok
I deleted the Pagefile from the L drive and recreated it on the C drive.
I moved the MSOCache from the L drive to the C drive.
I uninstalled a few apps I won't need.
I clean out the leftovers (CClearner, manually delete leftover folders and/or files, manually cleaned leftover entries from registry, cleaned out start menu, etc... re-run CCleaner).
Defragged C drive (standard XP tool) Now only 23GB.
Make backup image of C drive (using old Norton Ghost 15).
Delete L drive and shrunk down C drive to 31GB (using old Partition Magic) the rest of physical drive is now unallocated.
Run 'MergeIDE' re-started a few times,
Tested and run a few apps to make sure everything is still working as expected.
Make a second backup image of the shrunk C drive.
Open D2V (but did not run the conversion) now only 3 tick boxes C drive and E & F drives (the data drives on the second physical hdd).

Before I proceed with the conversion - 2 more questions:

1) Do I need to do something about the HAL? or is that also old news? the VirtuakBox version is 61.4

2) The white elephant in the room - Reactivation of Windows. If I need to reactivate after installing in VB is that actually still possible? I assume the activation servers are long gone, and do any of the phone activation numbers still work (I'm located in Australia)? I read many post on how to avoid reactivation when cloning or reinstalling an existing VM of Windows 7 and up (not sure if it applies to XP as well). Involves adding/modifying a 'Hardware UUID' before installing the OS in a VM or modifying before cloning.
Is there a way I could recreate the same hardware environment in VirtualBox as in my currently in my physical before adding the virtual hard drive (the VDI file I will create)? I know that changing the hdd does not trigger reactivation, I done it before. Also there would not be any hardware conflicts as the VM Host is a different computer from the one I pull Windows XP off.
Thanks
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: P2V Disk sizes

Post by scottgus1 »

The HAL question is still a situation with XP, if XP on the physical PC has one CPU core and you want to give it 2 in Virtualbox. If you have a 1-core XP and want to have 2 in Virtualbox, get XP to boot in Virtualbox with one core first, then set to 2 cores and run HALu.

Also take note of the 'agp440.sys / intelppm.sys' part, might interfere.

Theoretically, XP can still be activated by phone, but I haven't tried so I can't say for certain. If not, look at Windows XP: In both VM and native section 7 for clues to avoid reactivation. It may be possible to run DMIdecode on the XP PC, then use the 'vboxmanage setextradata' commands in Virtualbox.
chameau
Posts: 30
Joined: 11. Aug 2019, 18:53
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 7 pro

Re: P2V Disk sizes

Post by chameau »

Thanks for the replies :)
The computers aren't that old, I think they are both 4 cores.

The computer that currently has XP install on has a i5-3470 3.20Ghz CPU on a Gigabyte Z68A-D3-B3 motherboard. The graphics card is a NVIDIA GeForce GTX 550 Ti on a PCIe slot (the motherboard has no AGP slot, so I can probably ignore the agp440.sys part).

The receiving computer is a Lenovo Thinkpad X230t laptop, the CPU is a i5-3320m 2.60Ghz, I think the graphics is an inbuilt Intel.

I will follow your links in relation to activation and report back when done. Thanks again for your assistance.

Cheers
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: P2V Disk sizes

Post by scottgus1 »

That's a pretty decent source PC! You probably don't have to deal with the HAL then.

If you have any trouble let us know, we'll try to help.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: P2V Disk sizes

Post by mpack »

chameau wrote:Thanks for the replies :)
The computers aren't that old, I think they are both 4 cores.
I don't know if you thought that addressed the HAL issue, but it doesn't. What matters is whether XP was originally installed from scratch on that PC, or whether the XP image was migrated there from an earlier single core PC. And if so, was the HAL replaced at that time? XP will not adapt automatically: if it is using a single core HAL then it can't use multiple cores.
chameau
Posts: 30
Joined: 11. Aug 2019, 18:53
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 7 pro

Re: P2V Disk sizes

Post by chameau »

Hummm stretching my memories, not sure if it's new install or copy? it's a no name brand pc (Custom build in 2011)?

Update: found the invoice and there was a charge for copy from existing hdd to new hdd.

So how do I check what HAL is currently running?

Ok I did some digging on the XP machine

First I searched for HAL and I found all the variation in 2 location
C:\windows\$ntservicePackUninstall$ (in blue colour font)
C:\windows\servicepackfiles\i386
Both locations contain: hal.dll, halacpi.dll, halaacpi.dll, hal.dll.000, halapic.dll, halmacpi.dll, halmps.dll, halsp.dll

Second I open My computer/system properties/hardware/device manager and under computer it list: ACPI Multiprocessor PC
That confirms that the computer hardware can use multi-processing, but I'm not sure where to look to see if Windows XP is using halacpi or what hal? any suggestions would be welcome. thanks
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: P2V Disk sizes

Post by scottgus1 »

If I understand things (and I may not), check if the physical XP PC's Task Manager CPU usage graph sees just one big processor or can TM be set to see all four processors? If the four separate graphs show, then you have the multi-processor HAL. If the XP PC will respond to the power button being pressed and XP puts up the Sleep/Reboot/Shut-down box, then you have the ACPI HAL. More info on HALs in the Migrating tutorial above.

That said, you can change the XP HAL after you get it into Virtualbox with HALu. See viewtopic.php?f=1&t=24823&start=15#p111502. and do the final unzip to a no-spaces-named folder on the C drive of the XP guest (like "C:\HALu\") as HALu had a glitch where it didn't like spaces in the path when I used it on a Windows Server 2003 guest (XP is a derivative of 2003).
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: P2V Disk sizes

Post by mpack »

chameau wrote:I open My computer/system properties/hardware/device manager and under computer it list: ACPI Multiprocessor PC
Yes, that confirms that XP is already configured to support multiple CPUs or cores (halacpi). No need for further action on that.
chameau
Posts: 30
Joined: 11. Aug 2019, 18:53
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 7 pro

Re: P2V Disk sizes

Post by chameau »

Ok I successfully imported a running install of Windows XP into a VirtualBox VM following your good advice here on this forum. I did not have a 'HAL' issue Windows XP loaded and opened without any complaints and from a short initial trial, it appears to be fully working - that is apart from an 'Activation' issue. As soon as it opened I was assaulted by a statement that following to many hardware changes, I need to reactivate and I have 3 days to do so!!? That is way too short a time and as I have other priorities right now, I deleted the VM (including all files) and I will get back to it at a later time, after I research possible ways to avoid reactivation!

Thank you all for your help. I will mark this post as solved.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [SOLVED] P2V Disk sizes

Post by mpack »

XP is exactly correct. It is not the same hardware.
Post Reply