In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this "Xen virtual machine cloning method" article, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Xen virtual machine cloning method" article.
Xen is an open source project developed by the computer Lab of Cambridge University. Is a software layer that runs directly on computer hardware to replace the operating system. It can run multiple guest operating systems (Guest OS) concurrently on computer hardware.
Check to see if the virt-clone command exists rpm-qa | grep 'virtinst\ | libvirt'libvirt-0.8.2-29.el5_9.1libvirt-python-0.8.2-29.el5_9.1python-virtinst-0.400.3-13.el5...
# or
Which virt-clone/usr/bin/virt-clone
# if the virt-clone command is not found, you need to install libvirt and virtinst through yum
Yum install virtinst libvirt-y check the virtual machine xm list that has run on xen server.
# if we need to clone linux-node1, we need to suspend or stop linux-node1 first
Xm shutdown linux-node1
Or
# virsh-c xen:///Welcome to virsh, the virtualization interactive terminal.Type: 'help' for help with commands'quit' to quitvirsh # shutdown linux-node1Domain linux-node1 is being shutdownvirsh # quit use the virt-clone command to clone the xen virtual machine
# Note: make sure that the cloned xen virtual machine has been hung up and stopped
# Clone a linux-node2 with linux-node1, first create the hard disk needed by linux-node2, and then use lvm to create
Lvcreate-n linux-node2-L 40G vg_fzxen1lvdsipaly
# vg_fzxen1 is the name of vg_group. It is recommended that the size of the linux-node2 disk should be the same. View the lvdisplay after creation as shown below.
# Clone linux-node1
Root@fz-xen1 [10:21:25]: ~ $virt-clone-- connect xen:///-- promptWhat is the name of the original virtual machine?linux-node1What is the name for the cloned virtual machine?linux-node2What would you like to use as the cloned disk (file path) for'/ dev/vg_fzxen1/linux-node1'?/dev/vg_fzxen1/linux-node2 … Clone 'linux-node2' created successfully.
# A successful clone will prompt
# you can also directly clone linux-node1 to linux-node2 through the following command
Virt-clone-- original linux-node1-- name linux-node2-- file / dev/vg_fzxen1/linux-node2 launch linux-node2xm start linux-node2
# View linux-node1,linux-node2 status
Set up the linux-node2 network
# Connect to linux-node2
Xm console linux-node2
# check the MAC address
Ifconfig-a | grep HWaddreth0 Link encap:Ethernet HWaddr 00:16:3E:0F:07:2A
# add the found MAC address to ifcfg-eth0, change the original MAC address, comment UUID, modify IPADDR, and then restart network
/ etc/init.d/network restart
# ping Baidu tests whether it can be used normally after the network restart is completed, and tests whether it can be used in person
Xen Monitoring Command xm listxm uptime
# Real-time monitoring the cpu and memory usage of vm
Xm top
# display xen server information
Xm info
# View logs
Xm log
# View help
Xm-- help | less above is the content of this article on "how to clone Xen virtual machines". I believe you all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to learn more about related knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.