Inventec NEW CIS


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • virtual machine extensions (VMX) SLA ( S ervice L evel A greement) A contract between the provider and the user who specifies the level of service that is expected during its term. SLAs are used by vendors and customers as well as internally by IT shops and their end users. They can specify bandwidth availability, response times for routine and ad hoc queries, response time for problem resolution (network down, machine failure, etc.) as well as attitudes and consideration of the technical staff. SLAs can be very general or extremely detailed, including the steps taken in the event of a failure. For example, if the problem persists after 30 minutes, a supervisor is notified; after one hour, the account rep is contacted, etc.
  • hypervisor A system program that provides a virtual machine environment. The term came from the IBM mainframe world, which first introduced the virtual machine (virtualization) concept in the form of VM, initially as software only and later enhanced with hardware circuits.
  • Virtualization Technology (VT) VT-x defines the extensions to the IA-32 Intel ® Architecture [3]. HVMs (hardware-based virtual machines)
  • Virtual Ethernet interfaces Xen creates, by default, eight pair of "connected virtual ethernet interfaces" for use by dom0. Think of them as two ethernet interfaces connected by an internal crossover ethernet cable. veth0 is connected to vif0.0, veth1 is connected to vif0.1, etc, up to veth7 -> vif0.7. You can use them by configuring IP and MAC addresses on the veth# end, then attaching the vif0.# end to a bridge.
  • Every time you create a running domU instance, it is assigned a new domain id number. You don't get to pick the number, sorry. The first domU will be id #1. The second one started will be #2, even if #1 isn't running anymore. For each new domU, Xen creates new "connected virtual ethernet interfaces", with one end of each pair is within the domU and the other end exists within dom0. For linux domU's, the device name it sees is named eth0. The other end of that virtual ethernet interface pair exists within dom0 as interface vif<id#>.0. For example, domU #5's eth0 is attached to vif5.0. If you create multiple network interfaces for a domU, it's ends will be eth0, eth1, etc, whereas the dom0 end will be vif<id#>.0, vif<id#>.1, etc. When a domU is shutdown, the virtual ethernet interfaces for it are deleted. MAC addresses Virtualised network interfaces in domains are given Ethernet MAC addresses. By default xend will select a random address, this will differ between instantiations of the domain. If it is required to have a fixed MAC address for a domain (e.g. for using with DHCP) then this can be configured using the mac= option to the vif configuration directive (e.g. vif = ['mac=aa:00:00:00:00:11']). When choosing MAC addresses to use, ensure you choose a unicast address. That is, one with the low bit of the first octet set to zero. For example, an address starting aa: is OK but ab: is not. It is best to keep to the range of addresses declared to be "locally assigned" (rather than allocated globally to hardware vendors). These have the second lowest bit set to one in the first octet. For example, aa: is OK, a8: isn't. In summary, an address of the following form should be OK: XY:XX:XX:XX:XX:XX where X is any hexadecimal digit, and Y is one of 2, 6, A or E.
  • The default Xen configuration uses bridging within domain 0 to allow all domains to appear on the network as individual hosts. If extensive use of iptables is made in domain 0 (e.g. a firewall) then this can affect bridging because bridged packets pass through the PREROUTING, FORWARD and POSTROUTING iptables chains. This means that packets being bridged between guest domains and the external network will need to be permitted to pass those chains. The most likely problem is the FORWARD chain being configured to DROP or REJECT packets (this is different from IP forwarding in the kernel). iptable FORWARDing can be enabled for all packets; to prevent the dom0 from acting as an IP router: echo 0 > /proc/sys/net/ipv4/ip_forward. A slightly more secure method is to allowing packet forwarding (at the iptables level) between the external physical interface and the vifs for the guests. For a machine with a single ethernet card this would be: iptables -A FORWARD -m physdev --physdev-in eth0 --physdev-out '!' eth0 -j ACCEPT iptables -A FORWARD -m physdev --physdev-out eth0 --physdev-in '!' eth0 -j ACCEPT (needs the ipt_physdev [aka xt_physdev] module to be available). network-bridge When xend starts up, it runs the network-bridge script, which: creates a new bridge named xenbr0 "real" ethernet interface eth0 is brought down the IP and MAC addresses of eth0 are copied to virtual network interface veth0 real interface eth0 is renamed peth0 virtual interface veth0 is renamed eth0 peth0 and vif0.0 are attached to bridge xenbr0 the bridge, peth0, eth0 and vif0.0 are brought up It is good to have the physical interface and the dom0 interface separated; thus you can e.g. setup a firewall on dom0 that does not affect the traffic to the domUs (just for protecting dom0 alone). vif-bridge When a domU starts up, xend (running in dom0) runs the vif-bridge script, which: attaches vif<id#>.0 to xenbr0 vif<id#>.0 is brought up VLANs Multiple tagged VLANs can be supported by configuring 802.1Q VLAN support into domain 0. A local interface in dom0 is needed for each desired VLAN although it need not have an IP address in dom0. A bridge can be set up for each VLAN, and guests can then connect the the appropriate bridge. My prefered method is to define the bridge as an interface which is not brought up automatically (e.g. for Debian /etc/network/interfaces, with no "auto" entry): iface xen-br293 inet manual up vconfig add eth0 293 up /etc/xen/scripts/network start netdev=eth0.293 bridge=xen-br293 antispoof=no up /sbin/ifconfig eth0.293 up down /etc/xen/scripts/network stop netdev=eth0.293 bridge=xen-br293 antispoof=no down vconfig rem eth0.293 I then add an init.d script to bring the interface up between xend and xendomains starting.
  • Instructions like CPUID, MOV from CR3, RDMSR, and WRMSR will trigger VM exits unconditionally to allow the VMM to control the behavior of the guest. The PSR.vm bit also controls the number of virtual-address bits that are available to software. When a VMM is running with PSR.vm = 0, all implemented virtual-address bits are available. When the guest OS is running with PSR.vm = 1, the uppermost implemented virtual-address bit is made unavailable to the guest HVMs (hardware-based virtual machines)
  • virtual-machine control structure (VMCS) Memory Management Unit (MMU) processor abstraction layer (PAL) Guest physical addresses (GPAs) Itanium processor family (IPF) Machine physical addresses (MPAs) Virtual Processor Descriptor (VPD) Page table entries (PTEs) System Abstraction Layer (SAL) Page directory entries (PTEs) Machine check architecture (MCA)
  • Today's OSs also use model-specific registers to detect the microcode version on the processor and to decide whether they need to perform a microcode update. VT-x defines the extensions to the IA-32 Intel ® Architecture [3]. VT-i defines the extensions to the Intel ® Itanium ® architecture [4].
  • For the IA-32 architecture, this module maintains a shadow page table for the guest. This is the actual page table used by the processor during VMX operation, containing page table entries (PTEs) with machine page-frame numbers. Every time the guest modifies its page mapping, either by changing the content of a translation, creating a new translation, or removing an existing translation, the virtual MMU module will capture the modification and adjust the shadow page tables accordingly. Since Xen already has shadow page table code for paravirtualized guests, we extended the code to support fully virtualization guests. The resultant code handles paravirtualized and unmodified guests in a unified fashion.
  • The Virtual I/O devices (device models) in Dom0 provide the abstraction of a PC platform to the HVM domain. Each HVM domain sees an abstraction of a PC platform with a keyboard, mouse, real-time clock, 8259 programmable interrupt controller, 8254 programmable interval timer, CMOS, IDE disk, floppy, CDROM, and VGA/graphics. To reduce the development effort, we reuse the device emulation module from the open source QEMU project [8]. Our basic design is to run an instance of the device models in Dom0 per HVM domain. Performance critical models like the Programmable Interrupt Timer (PIT) and the Programmable Interrupt Controller (PIC), are moved into the hypervisor.
  • You can try Xen 3.03 demo cd and test cd to test hareware capability. Demo CD Test CD
  • Here's a quick description of how the Xen 3.0 Test CD works: The CD will first boot into a setup environment that lets you choose a partition on detected hard disks on which it will store test results and some config files that it will use to proceed through the various test runs. It will create a directory called /xentestingcd on the chosen partition. Depending on the type of machine, the test will automatically reboot several times to run the next phase of the tests. (A grub menu is displayed, but you don't need to interact.) On completion of the tests, the CD will attempt to submit the results to our website via http. Note that the results will be also be left on the hard disk in the /xentestingcd directory, in case the attempt to automatically upload the results fails—for example, when there is no connection to the internet available. If you can, it would be great if you could copy that file (named xenresults.tar.bz2. abcde , where the extension is a randomly-generated string of characters) somewhere that you can upload it to us via the form here . For a more thorough discussion of the Test CD's operation and a list of known issues, see the Release Notes .
  • Usually official released tarball or RPMs does not contain SCSI or SAS devices modules.
  • If you are building a 64bit Xen , then you don’t need PAE support parameter. If you build from SLES9 SP3,then you will need to install bridge-utils,openssl-devel,python-devel,python-idle,dev86,SDL-devel packages.
  • CONFIGMODE=menuconfig can change to CONFIGMODE=xconfig if you want to use xconfig.
  • There are more available make target , you can use make help for more detail information.
  • Under SLES mkinitrd does not have –with=moudle_name parameter , you can use –M module_name instead.
  • dom0_mem=262144 : limit dom0 only use 256MB total memory console=vga : use vga as console,if you want to use serial as console , try console=ttys0
  • Windows can fully install from cdrom
  • Use iso file emulate cdrom step 1.#dd if=/dev/hdb of=/img/w2k3.iso BS=2M 2.Modify below entry in w2k3.hvm disk = [‘file:/img/w2k3.iso,hdb:cdrom,r’] cdrom = /img/w2k3.iso 3.Start guest domain
  • Linux need to use cdrom boot and install from pxe. (On Baker bay and Ayu) If use cdrom/dvdrom install , system will occur DSC timeout error. This should be bug in Xen VMX.
  • You can use “install=nfs:// netdevice=ethX” as kernel parameter pass to installer if you install SuSE linux. If you install Redhat linux , you can use “resolution=800x600” as kernel parameter. If you use vnc=1 and vncviewer=1 but vncviewer window does not appear after you create a guest domain, You can try to use command “vncviewer” by yourself.
  • If you use vnc=1 and vncviewer=1 but vncviewer window does not appear after you create a guest domain, You can try to use command “vncviewer” by yourself.
  • Q:I can't use more than 3 network interfaces in domU This is a limitation in Xen 3.
  • Inventec NEW CIS

    1. 1. Xen 3.0.3 with VMX Presented by psboy (Dec 7 th ,2006)
    2. 2. - Introduction to Xen 3.0.3 with VMX - Install/Build Domain 0 (Privileged Domain) - Install Domain U (Unprivileged Domain) - Operate Xen Virtual Machine / Xen VMX Server - Q & A Scheme
    3. 3. Introduction to Xen 3.0.3 with VMX <ul><li>Xen is an open-source hypervisor that enables increased server utilization and server consolidation by enabling multiple operating system images to simultaneously run on a single physical server. Xen provides resource guarantees to virtual servers to ensure that application layer SLAs are met, including CPU, memory and I/O guarantees. </li></ul><ul><li>Xen is the industry’s fastest and most secure infrastructure virtualization software technology, and has been endorsed and adopted by over 20 of the industry’s major vendors, including AMD, Dell, Egenera, Hewlett-Packard, IBM, Intel, Mellanox Technologies, Network Appliance, Novell, Red Hat, Sun Microsystems, TopSpin, Unisys and Voltaire. </li></ul>What is Xen?
    4. 4. Introduction to Xen 3.0.3 with VMX <ul><li>Xen is licensed under the GNU General Public License (GPL2) , and is available free for download. It is offered by XenSource and other vendors as a supported enterprise software product. </li></ul><ul><li>Xen was created in 2003 at the University of Cambridge Computer Laboratory in what’s known as the Xen Hypervisor project led by Ian Pratt. Additional team members include Keir Fraser, Steven Hand, and Christian Limpach. This same team founded XenSource with experienced Silicon Valley technology entrepreneurs Nick Gault and Simon Crosby. </li></ul>Who create Xen?
    5. 5. Introduction to Xen 3.0.3 with VMX What are the business benefits of adopting Xen? <ul><li>Increased server utilization : Data centers can achieve dramatic improvements in server utilization and enable server consolidation, reducing wasted capital costs and personnel management expenses. </li></ul><ul><li>Reduced burden on IT : By enabling server consolidation, Xen reduces the cost, complexity, and personnel time required for data center server management. XenSource’s virtualization infrastructure software solutions provide both Xen based virtualization for servers and management, and control and automation tools that allow IT organizations to “operationalize” virtualization in a seamless, low cost fashion. </li></ul><ul><li>Lowest TCO : Today virtualization has yet to enter the heart of the data center. There are two reasons: poor performance of proprietary hypervisors and their tremendous cost. Xen is the best performing hypervisor, and it’s free. That radically changes the economics of the adoption of virtualization. </li></ul>
    6. 6. Xen 3.0 features Introduction to Xen 3.0.3 with VMX <ul><li>Support for up to 32-way SMP guest </li></ul><ul><li>Intel® VT-x and AMD Pacifica hardware virtualization support </li></ul><ul><li>PAE support for 32 bit servers with over 4 GB memory </li></ul><ul><li>x86/64 support for both AMD64 and EM64T </li></ul>Xen 3.0.3 features <ul><li>New easy-to-use CPU scheduler including weights, caps and automatic load balancing </li></ul><ul><li>Much enhanced support for unmodified ('hvm') guests including windows and legacy linux systems </li></ul><ul><li>Support for sparse and copy-on-write disks </li></ul><ul><li>High performance networking using segmentation off-load </li></ul>
    7. 7. Xen Networking Introduction to Xen 3.0.3 with VMX
    8. 8. Logical network cards connected between dom0 and dom1 Introduction to Xen 3.0.3 with VMX
    9. 9. Illustration on network-bridge and vif-bridge: Introduction to Xen 3.0.3 with VMX
    10. 10. Intel Virtualization Technology Introduction to Xen 3.0.3 with VMX Xen 3.0 architecture
    11. 11. Introduction to Xen 3.0.3 with VMX VMCS Shadow Page Table
    12. 12. Introduction to Xen 3.0.3 with VMX <ul><li>For the IA-32 architecture, a VMCS structure is created for each CPU in a HVM domain </li></ul><ul><li>Instructions such as CPUID, MOV from/to CR3, MOV to CR0/CR4, RDMSR, WRMSR, HLT, INVLPG, MOV from CR8, MOV DR, and MWAIT are intercepted as VM exits. </li></ul><ul><li>Exceptions/faults, such as page fault, are intercepted as VM exits, and virtualized exceptions/faults are injected on VM entry to guests. </li></ul><ul><li>External interrupts unrelated to guests are intercepted as VM exits, and virtualized interrupts are injected on VM entry to the guests. </li></ul><ul><li>Read shadows are created for the guest CR0, CR4, and time stamp counter (TSC). Read accesses to such registers will not cause VM exit, but will return the shadow values. </li></ul>
    13. 13. Introduction to Xen 3.0.3 with VMX <ul><li>The virtual MMU module supports all page table formats that can be used by the guest OS </li></ul><ul><li>For IA-32 </li></ul><ul><li>it supports 2-level page tables with 4 KB page size for 32-bit guests. </li></ul><ul><li>For IA-32 Physical Address Extension (PAE) </li></ul><ul><li>it supports 2-level page tables with 4 KB page sizes for 32-bit guests. </li></ul><ul><li>it supports 3-level page tables with 4 KB and 2 MB page sizes for 32-bit PAE guests. </li></ul><ul><li>For Intel ® EM64T </li></ul><ul><li>it supports 2-level page tables with 4 KB page size for 32-bit guests. </li></ul><ul><li>it supports 3-level page tables with 4 KB and 2 MB page sizes for 32-bit PAE guests. </li></ul><ul><li>it supports 4-level page tables with 4 KB and 2 MB page sizes for 64-bit guests. </li></ul>
    14. 14. Introduction to Xen 3.0.3 with VMX Device IO Virtualization The primary function of the device model is to wait for an I/O event from the HVM guest and dispatch it to the appropriate device emulation model. Once the device emulation model completes the I/O request, it will respond back with the result. A shared memory between the device model and the Xen hypervisor is used for communication of I/O request and response. I/O Device virtualization model
    15. 15. Install Domain 0 (Privileged Domain) <ul><li>Before install Domain 0 </li></ul><ul><li>Unmodified operating systems are supported. Support is provided for running Windows on VT or AMD-V hardware. </li></ul><ul><li>Xen supports 32-bit processors with and without Physical Address Extension (PAE), 64-bit processors, and Symmetric Multiprocessing (SMP) guest operating systems. </li></ul><ul><li>Enterprise Linux guest operating systems supported: Red Hat Enterprise Linux 3.5, 4.1, SUSE Linux Enterprise Server 9.2; Also Fedora Core 4, CentOS 4, SUSE Open Linux 10, Debian and others. </li></ul><ul><li>Current test with Xen 3.03 for example , linux kernel </li></ul>
    16. 16. <ul><li>System requirement </li></ul><ul><li>Cpu need support VMX /SVM </li></ul><ul><ul><li>You can use command “cat /proc/cpuinfo”to see if your cpu have vmx/svm flag </li></ul></ul><ul><li>Chipset need support VMX </li></ul><ul><li>Bios need to enable VMX /SVM </li></ul><ul><ul><li>Intel VMX default is disable. </li></ul></ul><ul><ul><li>AMD SVM default is enable. </li></ul></ul><ul><li>You can try to use Xen Test CD first before test Xen HVM. </li></ul>Install Domain 0 (Privileged Domain)
    17. 17. Install Domain 0 (Privileged Domain) <ul><li>Several ways to install Domain 0 </li></ul><ul><li>Install from binary tarball </li></ul><ul><ul><li>Quick for installation but no preferred modules contain in official release </li></ul></ul><ul><li>Install from RPMs </li></ul><ul><ul><li>Quick for installation but no preferred modules contain in official release </li></ul></ul><ul><li>Install from source </li></ul><ul><ul><li>Kernel and module can customize and more flexible </li></ul></ul><ul><ul><li>Dom0 kernel and hypervisor tuning is available </li></ul></ul>
    18. 18. <ul><li>Step 0.1 </li></ul><ul><li>Download Xen 3.03 source from </li></ul><ul><li>Download linux- from </li></ul><ul><li>Step 0.2 </li></ul><ul><li>Install RHEL4 AS U4 32bit.(Full install) </li></ul><ul><ul><li>Recommend set your system resolution to 1024x768 for later install Domain U. </li></ul></ul><ul><ul><li>Don’t use whole disk as “/” (left some space for guest os ) </li></ul></ul>Install Domain 0 (Privileged Domain)
    19. 19. <ul><li>Step 1 </li></ul><ul><li>Extract xen-3.0.3_0-src.tgz. </li></ul><ul><ul><li>#gunzip xen-3.0.3_0-src.tgz. </li></ul></ul><ul><ul><li>#tar zxvf xen-3.0.3_0-src.tar. </li></ul></ul><ul><ul><li>#cd xen-3.0.3_0-src </li></ul></ul><ul><li>Copy linux- to xen-3.0.3_0-src directory. </li></ul><ul><ul><li>Don’t extract linux- !! </li></ul></ul>Install Domain 0 (Privileged Domain)
    20. 20. <ul><li>Step 2 Compile and install Xen and Dom0 kernel </li></ul><ul><li>Check if your system need PAE support.When system memory over 4G,you will need PAE support for high address memory. </li></ul><ul><ul><li>Use “XEN_TARGET_X86_PAE=y” to make parameter. </li></ul></ul><ul><ul><li>#XEN_TARGET_X86_PAE=y make world install </li></ul></ul><ul><li>Use the following command if you don’t need PAE support. </li></ul><ul><ul><li>#make world install </li></ul></ul>Install Domain 0 (Privileged Domain)
    21. 21. <ul><li>If you want to rebuild or clean source directory before compile , use the following command. </li></ul><ul><ul><li>#make clean world install </li></ul></ul><ul><li>If you want to customize your dom0 kernel config , use the following command. </li></ul><ul><ul><li>#make linux-2.6-xen-config CONFIGMODE=menuconfig </li></ul></ul><ul><ul><li>#make linux-2.6-xen-build </li></ul></ul><ul><ul><li>#make linux-2.6-xen-install </li></ul></ul>Install Domain 0 (Privileged Domain)
    22. 22. <ul><li>You can build dom0 and domU by KERNELS=“linux-2.6-xen0 linux-2.6-xenU” parameter. </li></ul><ul><ul><li>#KERNELS=“linux-2.6-xen0 linux-2.6-xenU” make world install </li></ul></ul><ul><li>To rebuild without change and clean source tree , use the following command. </li></ul><ul><ul><li>#make dist </li></ul></ul><ul><ul><li>#make install </li></ul></ul>Install Domain 0 (Privileged Domain)
    23. 23. <ul><li>Step 3 Make initial ram disk for domain 0 </li></ul><ul><li>If you want to use initial ram disk , your kernel configuration should contain BLK_DEV_RAM=y and BLK_DEV_INITRD=y setting , and BLK_DEV_RAM can not be compile as module. </li></ul><ul><ul><li>#depmod </li></ul></ul><ul><ul><li>#mkinitrd –f –with=ata_piix –with=scsi_mod /boot/initrd- </li></ul></ul><ul><li>-f: overwrite existing image file </li></ul><ul><li>--with=module_name : load module in the initial ram disk </li></ul>Install Domain 0 (Privileged Domain)
    24. 24. <ul><li>Step 4 Modify grub.conf </li></ul><ul><li>Grub config need to modify for apply compiled xen kernel and dom0 kernel </li></ul><ul><li>Add entry in grub.conf such like below: </li></ul><ul><ul><li>title Xen 3.0.3 </li></ul></ul><ul><ul><li>root (hd0,0) </li></ul></ul><ul><ul><li>kernel /xen-3.0.3-0.gz console=vga dom0_mem=262144 </li></ul></ul><ul><ul><li>module /vmlinuz- ro root=/dev/VolGroup00/LogVol01 rhgb console=tty0 </li></ul></ul><ul><ul><li>module /initrd- </li></ul></ul>Install Domain 0 (Privileged Domain)
    25. 25. <ul><li>Step 5 Disable tls library </li></ul><ul><ul><li>#mv /lib/tls /lib/tls.disabled </li></ul></ul><ul><li>Step 6 Reboot system and choose Xen 3.03 from grub boot menu </li></ul><ul><li>Step 7 Check your Domain 0 Xend service is running </li></ul><ul><ul><li>#chkconfig xend on </li></ul></ul><ul><ul><li>#service xend start </li></ul></ul>Install Domain 0 (Privileged Domain)
    26. 26. <ul><li>Before install Domain U </li></ul><ul><li>Check your hardware (bios) support VMX </li></ul><ul><ul><li>#xm info|grep xen_cap </li></ul></ul><ul><ul><li>xen_caps : xen-3.0-x86-32p hvm-3.0-x86-32 hvm-3.0-x86_32p </li></ul></ul><ul><ul><li>#xm dmesg|grep –i vmxon </li></ul></ul><ul><ul><li>(XEN) VMXON is done </li></ul></ul><ul><li>Each time you start a guest domain , Xen will random select a Mac 00:16:3E:XX:XX:XX if you didn’t set Mac in your guest domain config file. </li></ul>Install Domain U (Unprivileged Domain)
    27. 27. Install Domain U (Unprivileged Domain) <ul><li>Install windows based guest OS </li></ul><ul><li>(Install windows2003 RC2 as example) </li></ul><ul><li>Step 1 Create lvm partition for guest OS </li></ul><ul><ul><li>#lvcreate –L 10000 –n w2k3 VolGroup00 </li></ul></ul><ul><li>Step 2 Use xmexample.hvm as sample and modify it. </li></ul><ul><ul><li>#cp /etc/xen/xmexample.hvm /etc/xen/w2k3.hvm </li></ul></ul><ul><ul><li>Modify below entries in w2k3.hvm </li></ul></ul><ul><ul><li>memory = 512 </li></ul></ul><ul><ul><li>name = w2k3 </li></ul></ul><ul><ul><li>disk = [‘phy:/dev/VolGroup00/w2k3,hda,w’ ,‘phy:/dev/hdb,hdb:cdrom,r’] </li></ul></ul><ul><ul><li>cdrom = ‘/dev/hdb’ </li></ul></ul><ul><ul><li>boot= ‘d’ </li></ul></ul><ul><ul><li>sdl=1 </li></ul></ul>
    28. 28. Install Domain U (Unprivileged Domain) <ul><li>Step 3 Put windows 2003 RC2 cd into cdrom </li></ul><ul><ul><li>If /dev/hdb does not exist,use command “mknod /dev/hdb b 3 64” to create /dev/hdb device node. </li></ul></ul><ul><li>Step 4 Use xm command power on guest os </li></ul><ul><ul><li>#xm create /etc/xen/w2k3.hvm </li></ul></ul><ul><li>Step 5 Follow the popup window screen and continue install guest os </li></ul><ul><ul><li>Press any key when boot from windows 2003 cdrom. </li></ul></ul><ul><ul><li>After first time install complete and reboot , change boot = ‘d’ to boot = ‘c’. </li></ul></ul><ul><ul><li>You can use iso file emulate cdrom </li></ul></ul>
    29. 29. Install Domain U (Unprivileged Domain) <ul><li>Install linux based guest OS </li></ul><ul><li>(Install sles10 as example) </li></ul><ul><li>Step 1 Create lvm partition for guest OS </li></ul><ul><ul><li>#lvcreate –L 10000 –n sl10 VolGroup00 </li></ul></ul><ul><li>Step 2 Use xmexample.hvm as sample and modify it. </li></ul><ul><ul><li>#cp /etc/xen/xmexample.hvm /etc/xen/sl10.hvm </li></ul></ul><ul><ul><li>Modify below entries in sl10.hvm </li></ul></ul><ul><ul><li>memory = 512 </li></ul></ul><ul><ul><li>name = sl10 </li></ul></ul><ul><ul><li>disk = [‘phy:/dev/VolGroup00/sl10,hda,w’ ,‘phy:/dev/hdb,hdb:cdrom,r’] </li></ul></ul><ul><ul><li>cdrom = ‘/dev/hdb’ </li></ul></ul><ul><ul><li>boot= ‘d’ </li></ul></ul><ul><ul><li>vnc=1 </li></ul></ul><ul><ul><li>vncviewer=1 </li></ul></ul>
    30. 30. Install Domain U (Unprivileged Domain) <ul><li>If you have multiple nic devices , you need to modify xend-config.sxp , sl10.hvm , script/mynetwork-script . </li></ul><ul><li>Modify sl10.hvm </li></ul><ul><ul><li>vif= [‘type=ioemu , bridge=xenbr0’,’type=ioemu , bridge=xenbr1’] </li></ul></ul><ul><li>Add mynetwork-script to /etc/xen/script </li></ul><ul><li>#!/bin/sh mynetwork-script </li></ul><ul><li>dir=$(dirname “$0”) </li></ul><ul><li>“ $dir/network-bridge” “$@” vifnum=0 netdev=eth0 </li></ul><ul><li>“ $dir/network-bridge” “$@” vifnum=1 netdev=eth1 </li></ul><ul><li>Modify xend-config.sxp (search network-script) </li></ul><ul><li>(network-script mynetwork-script) </li></ul>
    31. 31. <ul><li>Step 3 Put SLES10 cd into cdrom </li></ul><ul><ul><li>If /dev/hdb does not exist,use command “mknod /dev/hdb b 3 64” to create /dev/hdb device node. </li></ul></ul><ul><li>Step 4 Use xm command power on guest os </li></ul><ul><ul><li>#xm create /etc/xen/sl10.hvm </li></ul></ul><ul><li>Step 5 Follow the popup window screen and continue install guest os </li></ul><ul><ul><li>Type linux when boot from SLES10 cdrom. </li></ul></ul><ul><ul><li>After first time install complete and reboot , change boot = ‘d’ to boot = ‘c’. </li></ul></ul><ul><ul><li>Suggest to adjust resolution to 800x600 , use “vga=0x314” </li></ul></ul><ul><ul><li>You can use iso file emulate cdrom </li></ul></ul>Install Domain U (Unprivileged Domain)
    32. 32. Operate Xen Virtual Machine / Xen VMX Server <ul><li>Booting domain 0 </li></ul><ul><ul><li>#service xend start </li></ul></ul><ul><li>Booting guest domain </li></ul><ul><ul><li>#xm create /etc/xen/xmexample.hvm </li></ul></ul><ul><ul><li>You need modify your guest domain config file before start it </li></ul></ul><ul><li>Stop guest domain </li></ul><ul><ul><li>Shutdown by init 0 command in guest OS </li></ul></ul><ul><ul><li>#xm destroy domain-name (Or xm shutdown domain-name) </li></ul></ul>
    33. 33. Operate Xen Virtual Machine / Xen VMX Server <ul><li>Booting domain 0 </li></ul><ul><ul><li>#service xend start </li></ul></ul><ul><li>Booting guest domain </li></ul><ul><ul><li>#xm create /etc/xen/xmexample.hvm </li></ul></ul><ul><ul><li>You need modify your guest domain config file before start it </li></ul></ul><ul><li>Stop guest domain </li></ul><ul><ul><li>Shutdown by init 0 command in guest OS </li></ul></ul><ul><ul><li>#xm destroy domain-name </li></ul></ul><ul><li>XM tool (use this tool to operate guest domain) </li></ul><ul><ul><li>#xm help </li></ul></ul>
    34. 34. Operate Xen Virtual Machine / XenEnterprise Server <ul><li>Basic Management Commands </li></ul><ul><li># xm list which lists all domains running in rows of the following format </li></ul><ul><li>The meaning of each field is as follows: </li></ul><ul><ul><li>name </li></ul></ul><ul><ul><li>The descriptive name of the virtual machine. </li></ul></ul><ul><li>domid </li></ul><ul><ul><li>The number of the domain ID this virtual machine is running in. </li></ul></ul><ul><li>memory </li></ul><ul><ul><li>Memory size in megabytes. </li></ul></ul><ul><li>vcpus </li></ul><ul><ul><li>The number of virtual CPUs this domain has. </li></ul></ul>
    35. 35. <ul><li>state </li></ul><ul><ul><li>Domain state consists of 5 fields: </li></ul></ul><ul><ul><li>r </li></ul></ul><ul><ul><li>running </li></ul></ul><ul><li>b </li></ul><ul><ul><li>blocked </li></ul></ul><ul><li>p </li></ul><ul><ul><li>paused </li></ul></ul><ul><li>s </li></ul><ul><ul><li>shutdown </li></ul></ul><ul><li>c </li></ul><ul><ul><li>crashed </li></ul></ul><ul><li>cputime </li></ul><ul><ul><li>How much CPU time (in seconds) the domain has used so far. </li></ul></ul>Operate Xen Virtual Machine / XenEnterprise Server
    36. 36. Operate Xen Virtual Machine / XenEnterprise Server # xm top Monitor a host and domains in real time # xm dmesg Read and/or clear Xend’s message buffer # xm info Get information about Xen host # xm uptime Print uptime for a domain
    37. 37. Operate Xen Virtual Machine / XenEnterprise Server <ul><li>More detail guest domain config file entry </li></ul><ul><li>vif </li></ul><ul><ul><li>List of MAC addresses (random addresses are assigned if not given) and bridges to use for the domain's network interfaces, e.g. vif = [ 'mac=00:16:3E:00:00:11, bridge=xen-br0', 'bridge=xen-br1' ] to assign a MAC address and bridge to the first interface and assign a different bridge to the second interface, leaving xend to choose the MAC address. </li></ul></ul><ul><li>disk </li></ul><ul><ul><li>List of block devices to export to the domain e.g. disk = [ 'phy:hda1,sda1,r' ] exports physical device /dev/hda1 to the domain as /dev/sda1 with read-only access. Exporting a disk read-write which is currently mounted is dangerous - if you are certain you wish to do this, you can specify w as the mode. </li></ul></ul><ul><li>memory </li></ul><ul><ul><li>Memory size in megabytes. </li></ul></ul><ul><li>extra </li></ul><ul><ul><li>Extra string to append to the kernel command line (if any) </li></ul></ul>
    38. 38. Question and Answer Thank You