Discussion:
Copying Partition with Linux dd command? Resizing virtual disk.
(too old to reply)
Lorenz Berger
2004-06-24 08:16:35 UTC
Permalink
Hi everybody,

I'd like to make a complete copy of my system partition in a W2K guest.
Purpose is increasing the size of C:.

I saw that there is a command line resizing tool in VMWare 4.5.2, but I
have some _.vmdk*.REDO* files that take a lot of space (in addition to
the .vmdk files for C). I don't know how to get rid of these REDO files,
so I thought creating a new virtual disk and making a copy of the
existing partition is the easiest way.

As I don't own any Partition tools (Ghost, ...) I'd like to achieve this
with a Linux boot-CD and use the dd command.
Question: would that also take care of the partition table and MBR?
Because otherwise I guess, my Windows won't boot after I switch to the
new virtual harddisk.

Could anyone give me some hints how the commands would look like with
"dd if=...." for copying a complete virtual harddisk?

Also it would be nice to know how I can get rid of the .REDO files? I
don't want to switch back to any snapshot and currently in the snapshot
feature is disabled for this virtual machine (although I once had it
enabled).

Many thanks in advance,
Lorenz
Spiro Trikaliotis
2004-06-24 12:54:32 UTC
Permalink
["Followup-To:" vmware.for-windowsnt.configuration set.]
Post by Lorenz Berger
I saw that there is a command line resizing tool in VMWare 4.5.2, but I
have some _.vmdk*.REDO* files that take a lot of space (in addition to
the .vmdk files for C). I don't know how to get rid of these REDO files,
These REDO files are part of your snapshot. If you remove the snapshot
from this disc, the REDO files will be gone.
Post by Lorenz Berger
so I thought creating a new virtual disk and making a copy of the
existing partition is the easiest way.
No, it's not the easiest. See above.
Post by Lorenz Berger
As I don't own any Partition tools (Ghost, ...) I'd like to achieve this
with a Linux boot-CD and use the dd command.
Question: would that also take care of the partition table and MBR?
If you copy the complete HD, then it takes care of the MBR (the
partition table itself is part of the MBR).
Post by Lorenz Berger
Could anyone give me some hints how the commands would look like with
"dd if=...." for copying a complete virtual harddisk?
dd if=/dev/hda of=/dev/hdb

if both HDs are IDE, the "original" is on primary IDE bus and master,
the "copy" is on primary IDE bus and slave.

hdc is secondary master, hdd secondary slave.


If you use SCSI HDs, change the hda to sda, sdb, sdc, and so on.

If you only want to copy partitions, these are called hda1, hda2, ...,
and so on (you get the idea)? You can look at them with fdisk /dev/hda
for the primary master, and so on.
Post by Lorenz Berger
Also it would be nice to know how I can get rid of the .REDO files? I
don't want to switch back to any snapshot and currently in the
snapshot feature is disabled for this virtual machine (although I once
had it enabled).
I can't believe it. If you remove the snapshot, the .REDO files are
gone. Well, that's almost true. If your VM is undoable, then you get
.REDO files while the VM is running.
Post by Lorenz Berger
Many thanks in advance,
HTH,
Spiro.
--
Spiro R. Trikaliotis
http://www.trikaliotis.net/
Loading...