JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

System Administration Commands - Part 2

System Administration Commands - Part 3

txzonemgr(1M)

tzreload(1M)

tzselect(1M)

uadmin(1M)

ucodeadm(1M)

ufsdump(1M)

ufsrestore(1M)

umount(1M)

umountall(1M)

umount_smbfs(1M)

unlink(1M)

unshare(1M)

unshareall(1M)

unshare_nfs(1M)

update_drv(1M)

updatehome(1M)

updatemanager(1M)

updatemedia(1M)

useradd(1M)

userdel(1M)

usermod(1M)

utmp2wtmp(1M)

utmpd(1M)

uucheck(1M)

uucico(1M)

uucleanup(1M)

uucpd(1M)

uusched(1M)

Uutry(1M)

uutry(1M)

uuxqt(1M)

vdiskadm(1M)

virsh(1M)

virt-clone(1M)

virt-convert(1M)

virtinfo(1M)

virt-install(1M)

vmstat(1M)

vntsd(1M)

volcopy(1M)

volcopy_ufs(1M)

vrrpadm(1M)

vrrpd(1M)

vscanadm(1M)

vscand(1M)

vtdaemon(1M)

wall(1M)

wanboot_keygen(1M)

wanboot_keymgmt(1M)

wanboot_p12split(1M)

wanbootutil(1M)

wbemadmin(1M)

wbemconfig(1M)

wbemlogviewer(1M)

wcadmin(1M)

whodo(1M)

wificonfig(1M)

wpad(1M)

wracct(1M)

wtmpfix(1M)

wusbadm(1M)

xenconsoled(1M)

xend(1M)

xenstored(1M)

xentop(1M)

xm(1M)

ypbind(1M)

ypinit(1M)

ypmake(1M)

ypmap2src(1M)

yppasswdd(1M)

yppoll(1M)

yppush(1M)

ypserv(1M)

ypset(1M)

ypstart(1M)

ypstop(1M)

ypupdated(1M)

ypxfr(1M)

ypxfr_1perday(1M)

ypxfr_1perhour(1M)

ypxfr_2perday(1M)

ypxfrd(1M)

zdb(1M)

zdump(1M)

zfs(1M)

zic(1M)

zoneadm(1M)

zoneadmd(1M)

zonecfg(1M)

zonestatd(1M)

zpool(1M)

zstreamdump(1M)

zuludaemon(1M)

virt-clone

- clone virtual machine images

Synopsis

/usr/bin/virt-clone [option]

Description

The virt-clone utility is a command line tool for cloning existing virtual machine images. virt-clone copies disk images of an existing virtual machine and defines a new guest with an identical virtual hardware configuration. Elements that require uniqueness are updated to avoid a clash between old and new guests.

With appropriate command-line arguments, virt-clone can run completely unattended, with the guest automatically starting itself as well. This allows for easy automation of guest installs.

If you do not specify options to virt-clone, the command runs interactively, prompting for input as required.

To run virt-clone, you must become superuser or assume the Primary Administrator role.

Options

The following options are supported:

--connect=URI

Connect to the hypervisor at URI.

-d, --debug

Display debugging information when running the install process.

-f disk_image, --file=disk_image

Path to the file, disk partition, or logical volume to use as the backing store for the guest's virtual disk. If the original guest has multiple disks, this parameter must be repeated multiple times, once per disk in the original virtual machine.

-–force-copy=target

Force to copy devices (for example, if hdc is a read-only CD–ROM device, specify -–force-copy=hdc)

-h, --help

Display the help message and exit.

-m mac_addr, --mac=mac_addr

Fixed MAC address for the guest. If the keyword random is specified, a random address will be used.

-n name, --name=name

Name of the new guest virtual machine instance. This must be unique among all guests known to the hypervisor on this machine, including those not currently active. To redefine an existing guest, use the virsh(1M) tool to shut it down and delete it prior to running virt-clone. This parameter will be prompted for if omitted on the command line.

--nonsparse

Do not use a sparse file for the clone's disk image.

-o original_guest, --original=original_guest

Name or UUID for the original guest to be cloned. This guest must be shut down since it is not possible to safely clone active guests.

--original-xml=filename

The libvirt guest XML file to use as the original guest. The guest does not need to be defined on the libvirt connection.

--preserve-data

Preserve a new file to use as the disk image for the new guest.

-u UUID, --uuid=UUID

UUID for the guest; if none is specified, a random UUID is generated. If you specify UUID, use a 32-digit hexadecimal number. Keep in mind that UUIDs are intended to be unique across the entire data center, and indeed, the world.

Examples

Example 1 Cloning a Guest with a Single Disk

The following command clones a guest named demo, which has a single disk to copy.

# virt-clone \ --original demo \ --name newdemo \ --file /var/lib/xen/images/newdemo.img

Example 2 Cloning a Guest with Multiple Disks

The following command clones a guest named demo, with has multiple disks to copy.

# virt-clone \ --original demo \ --name newdemo \ --file /var/lib/xen/images/newdemo.img \ --file /var/lib/xen/images/newdata.img

Example 3 Cloning to a Device with Comparable Disk Space

The following command clones a guest to a physical device that has at least as much disk space as had the original guest. . If the destination device is has more space, the new guest can do a file system resize when it boots.

# virt-clone \ --name demo \ --file /dev/HostVG/DemoVM \ --mac 00:16:3e:34:11:54

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/xvm/header-xvm
Interface Stability
Volatile

See Also

virsh(1M), virt-install(1M), xm(1M), xVM(5), attributes(5), xVM(5)