Home

virtclone

Virt-clone is a command-line utility in the libvirt virtualization toolkit used to clone existing virtual machines managed by libvirt on Linux hosts running QEMU/KVM. It automates the duplication of a VM's configuration and its disk image to create a new, independently managed guest, often sharing storage only through backing files where supported.

How it works: Virt-clone reads the XML description of a source virtual machine, then creates a new

Usage: Typical usage is: virt-clone --original sourcevm --name newvm --file /var/lib/libvirt/images/newvm.img. The --file option is optional;

Limitations and considerations: Cloning consumes additional storage and may require significant time for large disks. If

See also: libvirt, QEMU, virt-manager, virt-builder, qcow2.

domain
definition
with
a
distinct
name
and
a
new
UUID.
It
duplicates
the
disk
image(s)
for
the
new
VM,
either
by
performing
a
full
copy
or
by
creating
a
linked
clone
if
the
storage
format
(such
as
qcow2)
and
filesystem
allow
it.
The
tool
can
generate
new
MAC
addresses
for
network
interfaces
and
adjusts
other
identity
details
to
prevent
conflicts.
Depending
on
options,
it
may
also
modify
the
VM’s
hostname
or
initial
networking
configuration.
without
it,
virt-clone
chooses
a
default
path.
The
command
may
require
the
source
VM
to
be
stopped
to
ensure
a
clean
clone,
though
some
storage
backends
support
online
cloning
via
snapshots.
After
cloning,
you
can
start
the
new
VM
and
customize
its
network
and
OS
settings
as
needed.
a
linked
clone
is
used,
the
clone
relies
on
the
base
image
for
data,
which
can
affect
backups
and
updates.
You
must
ensure
unique
MAC
addresses
and
often
adjust
the
guest
OS
network
configuration,
hostname,
and
licensing
as
appropriate.
The
exact
behavior
can
vary
across
libvirt
versions
and
storage
backends.