Cloning a virtual machine

Source: Internet
Author: User

cloning a virtual machine
virt-clone--original centos6.6_1--name template--file/data/clone1 (. img. qcow2)
if the sub-machine Centos6.6_1 has not been shut down, you need to shut down the computer, otherwise it will be error:
the ERROR must pause or close the domain where you want to clone the device.
the way to turn off the sub-machine is:
Virsh shutdown Centos6.6_1


The Mac and UID of the clone host Nic need to be commented out.

Vim/etc/udev/rules.d/70-persistent-net.rules defines the configuration file for the NIC.



Note: By default, we have no way in the host directly shutdown themselves, we need to rely on the Acpid service on the sub-machine can, this service is to let the host can go to call the sub-machine power off the interface. So,on the sub-machineThe Acpid service needs to be installed and started.
log in to the sub-machine first:
Virsh Console Centos6.6_1
after logging in, install the Acpid service:
Yum install-y acpid
Start:
/etc/init.d/acpid Start
Press CTRL] to exit
at this time to execute Virsh shutdown Centos6.6_1 is OK.

after cloning, Virsh list all will find clone1 this sub-machine, through the command

Virsh start clone1 can turn on the sub-machine.


Cloning a virtual machine

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.