VM clone

To create and clone VMs

# apt-get install virtinst

Add new logical volume for VM clone: same size as original

# lvdisplay kvm2
  --- Logical volume ---
  LV Name                /dev/kvm2/tubu1
  VG Name                kvm2
  LV UUID                ******
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                7.81 GiB
  Current LE             2000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:2

# lvcreate -l 2000 -n tubu1-clone iscsi2

Clone VM

# virt-clone --original tubu1 --name tubu1-clone --file /dev/mapper/iscsi2-tubu1-clone --prompt

The new guest tubu1-clone is listed in KVM host and ready to run.

โ‡‘ Hypervisor

hypervisor/clone.txt ยท Last modified: 2012/09/04 12:39 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki