Kvm vm clone

Source: Internet
Author: User


Assume that you have a VM1 Vm, and now you want to clone the VM2 VM. Perform the following steps:

1. Stop VM1


Virsh shutdown VM1

Domain VM1 is being Shutdown

[Email protected]: ~ # Virsh list -- all

ID name state

----------------------------------

-VM1 shut off

 

2. Clone

Create a VM2 directory first


Mkdir-P/var/lib/libvirt/images/VM2

Then run the virt-clone command (you may need to install apt-Get install stronginst)


Virt-clone-O VM1-N VM2 -- file/var/lib/libvirt/images/VM2/. IMG -- file/var/lib/libvirt/images/VM2/B. IMG

Cloning tmprmrzcr. qcow2 | 279 MB

Cloning tmpvjv5l4. qcow2 | 307 MB

 

Clone 'vm2' created successfully.

 

3. Start VM2 and modify the IP address and Host Name


This article is from the "Lonely (Technology Group: 1991706)" blog, please be sure to keep this source http://304076020.blog.51cto.com/7503470/1538948

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.