Virtual Machine Replication

Source: Internet
Author: User

 

First, create the data volume and swap volume of the VM:

#Lvcreate-l 128 M-N newvm-swap xenvg
#Lvcreate-L 4G-N newvm xenvg

Use virt-clone replication:

#Virt-clone-O testvm-N newvm-F/dev/xenvg/newvm-swap
Cloning testvm-disk | 4.0 GB 0:39
Cloning testvm-swap | 128 MB

Clone 'newvm 'Created successfully.

#XM list newvm
Name ID mem vcpus state time (s)
Newvm 512 2 0.0

Of course, the preceding steps can also be completed through DD:

# Dd If =/dev/xenvg/testvm of =/dev/xenvg/newvm
# Dd If =/dev/xenvg/testvm-swap of =/dev/xenvg/newvm-swap
# Cp/etc/xen/testvm/etc/xen/newvm
# Sed-I's/testvm/newvm/G'/etc/xen/newvm
# XM new/etc/xen/newvm

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.