Best way to copy VM while it is live?

General support questions
Post Reply
Posts: 3
Joined: 2017/07/06 00:18:48

Best way to copy VM while it is live?

Post by valkaben » 2018/06/13 17:07:32

Hello, I'd like to backup my CentOS6 KVM at work which is our DNS and DHCP server. If it turns off, we'll have a bit of chaos at work so I don't want to turn it off. I would like to back up the virtual machine image though. I was considering snapshotting it but I did notice snapshot freezes the virtual machines and temporarily makes it inactive. I can't have that happen.

I know of LVM snapshots but the previous sysadmin did not leave any room in the volume group so I am unable to do that. Any other tips to back up a live running VM?

Posts: 1009
Joined: 2013/09/06 03:12:10

Re: Best way to copy VM while it is live?

Post by Whoever » 2018/06/14 03:26:02

Some ideas:
1. Add a hard drive and extend the volume group so that there is room for an LVM snapshot. LVM snapshots don't require much space.
2. If the image is a qemu image, then you can snapshot it directly.
3. I haven't tried this, but, assuming you have disk space in a filesystem, you might be able to create a large file, set up a loopback device that points to the points to the file, then add the loopback device to your volume group, to extend it sufficiently to hold a snapshot for a short time.

Post Reply