Mailinglist Archive: opensuse (3354 mails)

< Previous Next >
Re: [opensuse] Clone an existing webserver into a virtual machine
  • From: Anders Norrbring <lists@xxxxxxxxxxxx>
  • Date: Thu, 22 Mar 2007 18:30:21 +0100
  • Message-id: <4602BD2D.80203@xxxxxxxxxxxx>
Johannes Nohl skrev:
Are you using VMware? If so, use their P2V utility.
Last time I did an operation like that, I copied the entire disk to
file, then unpacked that file onto a 2:nd disk in the VM.

No, I wanted to use VirtualBox.

Much like 'dd if=/dev/hdx | gzip > /path/to/image.gz', then unpack with
'gzip -dc /path/to/image.gz | dd of=/dev/hdx' on the VMs 2:nd disk.
After that, shut down the VM, take away the 1:st disk and make the 2:nd
one the primary.

Thanks. This sounds good. But I have a further question: Can image.gz
exist on the same partition as the one to clone (or is rawwriting to
istself then)? The machine has only one (big) partition.


Nope, that won't work.. dd copies the disk bit-by-bit, so you'd loop it. However, you can redirect the output via scp to save it another box. ;)


Anders Norrbring
Norrbring Consulting
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups