Xen installation and management under fedora18

Source: Internet
Author: User

Xen installation and management in 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-netw Ork # yum-y install tigervnc xen default startup (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/"vir For tual name,/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 p Ause 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 <network> <name> virbr1 </name> <uuid> restart </ uuid> <bridge name = "virbr1"/> <forward/> <I P address = "192.168.123.1" netmask = "255.255.255.0"> <dhcp> <range start = "192.168.123.2" end = "192.168.123.254"/> </dhcp> </ip> </network> # ln-s/etc/libvirt/qemu/networks/virbr1.xml/etc/libvirt/qemu/networks/autostart/virbr1.xml summary: in fedora18, kvm is used to call the "virtual system manager" in a graphical mode. to install and configure virtual machines in xen, you must perform operations on the Character interface. Therefore, write this article to facilitate future lookup.

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.