0

I successful converted a machine from physical to virtual. The physical machine has one hard disk with two partitions.
I made a fixed vhd of 300gb and I see 2 partition, one of the system and the other one is unallocated. I don't want to create a new partition, I want only one with the full space. I tried with partition magic but it says that there aren't any parittion to merge.

This is what I see in disk management enter image description here

Kreker
  • 458
  • 4
  • 10
  • 22

1 Answers1

1

What you want to do is expand the existing partition to consume the entire disk. From Windows Server 2008 onwards, you could expand the system partition online, so we need to know which OS your VM is running. If it is running Windows 2003 R2 and older, your options are to either use a 3rd party tool or booting the VM using WinPE and expanding the partition offline using diskpart from within WinPE. The latter is quite easy to do.

The process is described in this document: How to extend a data volume in Windows Server 2003, in Windows XP, in Windows 2000, and in Windows Server 2008

Trondh
  • 4,201
  • 24
  • 27
  • Thanks for the answer! The OS installed is Windows XP SP3, the host is Windows Server 2012. So the only method is to use winpe or a live cd? I can't with the system running use software like partition manager? – Kreker Oct 10 '13 at 12:42
  • you should be able to, yes. "3rd party tool OR booting the VM using WinPE". Partition Manager qualifies as a 3rd party tool. – Trondh Oct 10 '13 at 12:50
  • but partition magic is running on the vm, so impossible if the disk is activated, right? – Kreker Oct 10 '13 at 12:54
  • Those 3rd party tools should be able to do it inside the running VM (they basically use their own boot manager to carry out the instructions on reboot). You should choose the option "extend partition" or similar. – Trondh Oct 10 '13 at 13:03
  • Partition magic syas that there aren't partition for extending. I run the vm with a live cd (hiren boot) with minixp, run diskparted and it says that it can't to. this is the message I got "diskpart failed to extend volume. please make sure the volume is valid for extending". I see a volume of 300gb and 202free, disk says volume 1 size 98gb – Kreker Oct 10 '13 at 13:20
  • I would try WinPE then. – Trondh Oct 10 '13 at 13:24
  • what's the difference? It always use diskpart. I think there is something wrong with the p2v process... I got the same error with diskpart in windows xp – Kreker Oct 10 '13 at 13:29
  • WinPe is offline, that's the difference. I'm not sure how partition magic works, but I know how WinPe and diskpart works, so that's my suggestion. – Trondh Oct 10 '13 at 13:34
  • I ran diskpart offline, Hirens boot cd is like Winpe. The error is the same, online or offline, diskpart can't extend the partition. There is something somewhere else – Kreker Oct 10 '13 at 13:36
  • Can you show the exact commands you ran? your whole diskpart session. – Trondh Oct 10 '13 at 13:54
  • 1
    You can also shutdown the VM and mount the VHD directly on the hyper-v host and try and perform the partition extension from there: http://blog.christosoft.de/2013/04/enlarge-vhd-drives/ – Trondh Oct 10 '13 at 13:57
  • select volume 1 \ extend – Kreker Oct 11 '13 at 13:37