Skip to content

abbbi/vmsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vmsync

incrementally replicate libvirt based virtual machines to remote hosts using dirty bitmaps.

This utility can be used to sync or "replicate" virtual machines to other libvirt hosts. On the first execution, a complete (full) replication will be executed and an dirty bitmap is created. For any following command calls, it will only synchronize incremental changes since the last checkpoint.

Workflow

The current operation workflow is:

  • Identify the virtual disks (qcow2 images only)
  • Create a checkpoint and pull based libvirt backup job, expose checkpoint via NBD
  • Connect to the source NBD port and query block regions
  • Connect to the remote system via SSH and create qcow files on target system
  • Start an NBD target service backing the qcow2 files on the target system
  • Synchronize block regions
  • Stop backup job
  • Stop target NDB Service
  • Define VM on target system with latest configuration

Example command:

./vmsync -source-domain SOURCE_DOMAIN \
        -source-uri qemu+ssh://hostA/system \
        -target-domain TARGET_DOMAIN \          # optional, otherwise use original VM name
        -target-uri qemu+ssh://hostB/system \
        -ssh-user root                          # user for all ssh related

Build

Several components are required to build from source, see the provided Dockerfiles for example.

About

incrementally replicate libvirt based virtual machines to remote hosts using dirty bitmaps.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors