Installation and management of xen in fedora18 ############################## xeninstallation ### ########################## disable the firewall and selinux # iptables-F # serviceiptablessave # vim install and manage xen in/etc/selinux/confi fedora18 ########################### ### xen installation ############################# disable the firewall and selinux # iptables-F # service iptables save # vim/etc/selinux/config SELINUXTYPE = permissive xen installation # yum update # yum-y install xen-hypervisor kernel-xen libvirt-daemon- xen virt-manager virt-viewer libvirt-python-embedded Inst libvirt-daemon-config-network libvirt-daemon-driver-network # yum-y install tigervnc default Start of xen (grub2) configuration # GRUB_DEFAULT = "saved" # grub2-mkconfig-o/boot/grub2/grub. cfg # grep ^ menuentry/boot/grub2/grub. cfg | cut-d "'"-f2 xend service configuration # systemctl enable xend. service # systemctl start xend. service # systemctl status xend. install service xen-tools # yum-y install debootstrap perl-Text-Templateh perl-Config-IniFiles perl-File-Slurp perl-File-Which perl-Data-Dumper # wget http://xen-tools.org/software/xen-tools/xen-tools-4.3.1.tar.gz# Tar zxvf xen-tools-4.3.1.tar.gz # cd xen-tools-4.3.1 # make install ############################# xen configuration file ############################## fedora18, path for storing the configuration file of the xen virtual machine:/var/lib/xend/domains/"uuid". path for storing the image: in/var/lib/xen/images/"virtual name" rhel5.4, the path for storing the configuration file of the xen virtual machine is/etc/xen/"virtual name". the path for storing the image is as follows: /var/lib/xen/images/"virtual name". Therefore,/var/lib/xend/domains/"uuid" must be transferred to/etc/xen/"virtual name "., The instance "virtual name" is vm0 {1 .. 5}, a total of 5 virtual machines, so there are the following script # vim fedora-xen-virt-manager.sh #! /Bin/bash xenfile =/etc/xen/vm0 {1 .. 5} if [-f $ xenfile] then rm-rf $ xenfile if for I in vm0 {1 .. 5} do virsh dumpxml $ I>/root/$ I. xml cd/root virsh domxml-to-native xen-xm $ I. xml>/etc/xen/$ I done ############################## xen manage ############################### xm list # xm create DomainName # xm console DomainName # xm destroy DomainName # xm reboot DomainName # xm shutdown DomainName # xm pause DomainName # xm unpause DomainName # xm save DomainName # xm restore DomainName # xm rename DomainName # virt-install- p-n vm01-f/var/lib/xen/images/vm01.img-s 4-r 512 -- vcpus = 2-B br0-l ftp://192.168.254.254/pub -X "ks = ftp://192.168.254.254/pub /Ks. cfg "# virt-clone-o vm01-n vm02-f/var/lib/xen/images/vm02.img ################ ############# xen network configuration ####################### ####### add an Eni to vm01 # vim/etc/xen/vm01vif = ["mac = 00: 16: 36: 88: 76: d4, bridge = br0, script = vif-bridge "," mac = 00: 16: 36: 77: 66: d5, bridge = virbr0, script = vif-bridge "] # cp/etc/libvirt/qemu/networks/default. xml/etc/libvirt/qemu/networks/virbr1.xml # vim/etc/libvirt/qemu/networks/virbr1.xml Virbr1 703619d1-1b15-4621-acc6-6f2d88f51eb9 # Ln-s/etc/libvirt/qemu/networks/virbr1.xml/etc/libvirt/qemu/networks/autostart/virbr1.xml Summary: under fedora18, the "virtual system manager" in graphical mode is kvm. to install and configure virtual machines in xen mode, you still need to perform operations on the character interface. therefore, write this article to facilitate future lookup.
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