1VIRT-CLONE(1) Virtual Machine Install Tools VIRT-CLONE(1)
2
3
4
6 virt-clone - clone existing virtual machine images
7
9 virt-clone [OPTION]...
10
12 virt-clone is a command line tool for cloning existing virtual machine
13 images using the "libvirt" hypervisor management library. It will copy
14 the disk images of any existing virtual machine, and define a new guest
15 with an identical virtual hardware configuration. Elements which
16 require uniqueness will be updated to avoid a clash between old and new
17 guests.
18
19 Given suitable command line arguments, "virt-clone" is capable of run‐
20 ning completely unattended, with the guest 'kickstarting' itself too.
21 This allows for easy automation of guest installs. A companion tool
22 "virt-clone(1)" is provided for cloning pre-existing guests if their
23 installation cannot be easily automated from pristine media.
24
26 Any of the options can be omitted, in which case "virt-clone" will run
27 interactively prompting for input as required.
28
29 -h, --help
30 Show the help message and exit
31
32 -o ORIGINAL_GUEST, --original=ORIGINAL_GUEST
33 Name or uuid for the original guest to be cloned. This guest must
34 be shut off since it is not possible to safely clone active guests
35 at this time.
36
37 -n NAME, --name=NAME
38 Name of the new guest virtual machine instance. This must be unique
39 amongst all guests known to the hypervisor on this machine, includ‐
40 ing those not currently active. To re-define an existing guest, use
41 the virsh(1) tool to shut it down & delete it prior to running
42 "virt-clone". This parameter will be prompted for if omitted on the
43 command line.
44
45 -u UUID, --uuid=UUID
46 UUID for the guest; if none is given a random UUID will be gener‐
47 ated. If you specify UUID, you should use a 32-digit hexadecimal
48 number. UUID are intended to be unique across the entire data cen‐
49 ter, and indeed world. Bear this in mind if manually specifying a
50 UUID
51
52 -f DISKFILE, --file=DISKFILE
53 Path to the file, disk partition, or logical volume to use as the
54 backing store for the guest's virtual disk. If the original guest
55 has multiple disks, this parameter must be repeated multiple times,
56 once per disk in the original virtual machine.
57
58 -m MAC, --mac=MAC
59 Fixed MAC address for the guest; If this parameter is omitted, or
60 the value "RANDOM" is specified a suitable address will be randomly
61 generated. For Xen virtual machines it is required that the first 3
62 pairs in the MAC address be the sequence '00:16:3e', while for QEMU
63 or KVM virtual machines it must be '54:52:00'.
64
65 --connect=CONNECT Connect to hypervisor with URI
66 Connect to a non-default hypervisor. The default connection is cho‐
67 sen based on the following rules:
68
69 xen If running on a host with the Xen kernel (checks against
70 /proc/xen)
71
72 qemu:///system
73 If running on a bare metal kernel as root
74
75 qemu:///session
76 If running on a bare metal kernel as non-root
77
78 It is only necessary to provide the "--connect" argument if this
79 default prioritization is incorrect, eg if wanting to use QEMU
80 while on a Xen kernel.
81
82 -d, --debug
83 Print debugging information to the terminal when running the
84 install process. The debugging information is also stored in
85 "$HOME/.virtinst/virt-clone.log" even if this parameter is omitted.
86
88 Clone the guest called "demo" which has a single disk to copy
89
90 # virt-clone \
91 --original demo \
92 --name newdemo \
93 --file /var/lib/xen/images/newdemo.img
94
95 Clone a QEMU guest with multiple disks
96
97 # virt-clone \
98 --connect qemu:///system \
99 --original demo \
100 --name newdemo \
101 --file /var/lib/xen/images/newdemo.img \
102 --file /var/lib/xen/images/newdata.img
103
104 Clone a guest to a physical device which is at least as big as the
105 original guests disks. If the destination device is bigger, the new
106 guest can do a filesystem resize when it boots.
107
108 # virt-clone \
109 --connect qemu:///system \
110 --name demo \
111 --file /dev/HostVG/DemoVM \
112 --mac 54:52:00:34:11:54
113
115 Written by Kazuki Mizushima, and a team of many other contributors. See
116 the AUTHORS file in the source distribution for the complete list of
117 credits.
118
120 Report bugs to the mailing list "http://www.redhat.com/mail‐
121 man/listinfo/et-mgmt-tools" or directly to BugZilla
122 "http://bugzilla.redhat.com/bugzilla/" against the "Fedora" product,
123 and the "python-virtinst" component.
124
126 Copyright (C) Fujitsu Limited 2007, and various contributors. This is
127 free software. You may redistribute copies of it under the terms of the
128 GNU General Public License "http://www.gnu.org/licenses/gpl.html".
129 There is NO WARRANTY, to the extent permitted by law.
130
132 virsh(1), "virt-install(1)", "virt-manager(1)", the project website
133 "http://virt-manager.org"
134
135
136
137perl v5.8.8 2007-11-20 VIRT-CLONE(1)