Hot Clone or Live Clone

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
BobCrandell
Posts: 10
Joined: 28. Jan 2021, 17:46

Hot Clone or Live Clone

Post by BobCrandell »

Hi Guys,

I just discovered that Synology cat clone a VM while it's running. I have a client that is a 24/7 operation and this would be ideal for them.

How long would it take to make this happen in VirtualBox?
Thanks for a great product.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Hot Clone or Live Clone

Post by scottgus1 »

BobCrandell wrote:Synology cat clone a VM while it's running
For me, Synology googles to a NAS company, not a hypervisor. They could play tricks with copying the VM disk while the VM is running, setting up a "volume shadow copy" or "snapshot" or some such, so writes to the VM don't get written while the disk is being copied.

If this isn't the Synology you are referring to, please let us know what you're using.

You can try an Enhancement post on the Bugtracker. However, it may take some time for the idea to get traction if it ever does. And a solid reason for it would be needed.

In addition to the usual caveats about cloning (UUIDs would be different, possibly causing licensing issues in the VM) here's something else:

While an OS is running, very often it is writing to its disk. OS's dating back to DOS or earlier have built-in or can have installed file systems, databases, etc, that require careful writing environments. Back when I still ran Windows ME, if the computer crashed it had to go through a Scandisk to check for bung-ups on the file system. XP had an MSI database. Email programs have their databases, etc.

What happens if a program is writing a series of records to a database, or writing a long file like a DVD VOB, and the storage device the virtual disk is stored on starts a volume shadow copy, or a snapshot, or whatever term it uses for copying an active disk? The OS doesn't know about this so it keeps writing. Half of the records don't get written to the source disk. The DVD VOB cuts off half-way. Go to use that copied disk, and half of the records are missing as well as half of the movie.

The only safe way way one can copy a running OS is to tell the OS it's about to happen, so the OS can finish up its writes, pause for a moment, report back that it is done, then the copy can start. 3rd-party backup software can do this inside the running OS.

If your Synology is a NAS, it is very likely not triggering a 3rd-party live backup situation, so your copied data is dirty.

Virtualbox would have to be programmed to trigger the "Volume Shadow Service" in Windows, or whatever other OS's call their version of such a setup, using a new function in Guest Additions. Then the clone could take place. The clone would be a running VM, like a Virtualbox Snapshot of a running VM. Other things that would have to be handled are network troubles from copied IP addresses and network names, and on-the-fly changes in MAC addresses, active USB devices, etc. which may not be handleable in the VM OS.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Hot Clone or Live Clone

Post by mpack »

Before we get too far down this rabbit hole: cloning and backing up are not synonyms. Cloning modifies the copied files in order to create an independant VM. This is not something you want from a backup.

Also, a reference to the Synology docs would have been nice, because I doubt the accuracy of the leading claim in this topic. Synology relies on RAID for file integrity, not file copying. A NAS can of course be used for backing up of live PCs, but that's any PC, not just VMs.
Post Reply