1

I have to create virtual copy of existing server (for testing purpose).

I have two (physical host) hosts:

  • main - this one will be used as source for virtual machine disk image. It has standard Ubuntu 10.04 installation. It uses LVM.
  • second - this one will be used as hypervisor host. It's also vanilla Ubuntu 10.04 installation. I plan to install kvm and crate guest machine that will be copy of main machine.

I would like to do it with out shutting down main machine.

I know I can use mondo for this (http://www.mondorescue.org/docs/p2v.pdf). But I wonder if is possible only with using LVM snapshots. That is to create LVM snapshot of main and use it for creating virtual machine on second?

If LVM option is possible, could you please give me some links to tutorials that describes this procedure?

Dave M
  • 4,494
  • 21
  • 30
  • 30
Maciek Sawicki
  • 760
  • 1
  • 8
  • 21
  • What services are running on the "main" host? Databases are notoriously hard to capture as a disk image. – DerfK Jan 24 '11 at 13:29
  • some websites in developmend (django with mysql), redmine, mercurial. Traffic is low, so theoretically (during night) it could be some time window without any db access. In worst case i can shout down the main host, but would prefer to try doing it live. – Maciek Sawicki Jan 24 '11 at 13:40

2 Answers2

1

I decided I will shutdown my machine and boot it from live CD. But I found some interesting how to for windows: http://www.petri.co.il/physical-to-virtual-with-disk2vhd.htm

There is also interesting tool from vmware that can do what I need (migrate linux machine) but it needs windows to be used as VM host - http://www.vmware.com/products/converter/

Maciek Sawicki
  • 760
  • 1
  • 8
  • 21
1

I wrote a step-by-step detailed answer of how I solved a very similar challenge on the question: Turning a running Linux system into a KVM instance on another machine. I hope it proves a useful answer for this question too.

Goal of the answer: to take a physical Linux P node running live-production and virtualise it. Without having to create and allocate multi terabyte disks, nor have to use md raid in the V guest, because the target hypervisor (Proxmox 5) used ZoL/ZFS. Also wanted to mitigate downtime/reboots on the running P node.

Kyle
  • 494
  • 1
  • 5
  • 13