clone VM on PowerKVM

Clone VM created on PowerKVM using virt-clone

1) Create a VM using any management layer.

For ex: Kimchi: https://psuriset.wordpress.com/2014/08/09/kimchi-on-powerkvm/

2) To clone a VM, source VM should be either in shut off stage or pause stage

[root@powerkvm ]# virsh # list –all
Id    Name                           State
—————————————————-
4     r6                            running
–     r61                            shut off

3) virt-clone –original r61 –name r62 –file /var/lib/libvirt/images/r62.image
Allocating ‘r62.image’                                                                                                                                   |  30 GB  00:00:23

Clone ‘r62’ created successfully.

4) Access console

virsh # start r62
Domain r62 started

virsh # console r62
Connected to domain r62
Escape character is ^]

localhost login:

5) if user wish to clone multiple VM’s , just write a bash script.

For ex: Create 20 VM’s.

i=1;while [ $i -lt 20 ]; do virt-clone –original r6 –name r6-$i –file /var/lib/libvirt/images/r6-$i.image; let i=i+1; done

 

 

 

Advertisements

One thought on “clone VM on PowerKVM

  1. Pingback: Bring Up PowerKVM | Pradeep K Surisetty

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s