志豪 2009.09.15.  Categories of Virtual Machine  Virtual Machine manager: Xen  Xen architecture  Xen component  Xen API  XenAccess Library  reference.

Slides:



Advertisements
Similar presentations
Operating System Level Virtualization Reza Farivar.
Advertisements

Virtual Machine Technology Dr. Gregor von Laszewski Dr. Lizhe Wang.
OPEN-SOURCE SOFTWARE TOOLKITS FOR CREATING AND MANAGING DISTRIBUTED HETEROGENEOUS CLOUD INFRASTRUCTURES A.V. Pyarn Lomonosov Moscow State University,
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
NWCLUG 01/05/2010 Jared Moore Xen Open Source Virtualization.
VIRTUALIZATION WITH SOLARIS A.V.Bogdanov, PyaeSoneKoKo State Marine Technical University, St.petersburg.
Virtual Machine Overview
Introduction to Virtualization
Network Implementation for Xen and KVM Class project for E : Network System Design and Implantation 12 Apr 2010 Kangkook Jee (kj2181)
COMS E Cloud Computing and Data Center Networking Sambit Sahu
MapR – HADOOP DEVELOPMENT IN A VIRTUAL MACHINE Thomas Tiahrt, MA, PhD CSC482 Introduction to Text Analytics.
Virtual Machines. Virtualization Virtualization deals with “extending or replacing an existing interface so as to mimic the behavior of another system”
Virtualization B. Ramamurthy. References Practical Virtualization Solutions: Virtualization from the Trenches by K. Hess and A. Newman, Prentice-Hall.
Virtualization for Cloud Computing
A Brief Introduction To Virtualization Technologies Yin Yunqiao HP.
LINUX Virtualization Running other code under LINUX.
To run the program: To run the program: You need the OS: You need the OS:
Virtualization. What is Virtualization Virtualization is a technique of partitioning or dividing the resources of a single server into multiple segregated.
Tanenbaum 8.3 See references
Operating System Virtualization
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
An Introduction to Xen Prof. Chih-Hung Wu
ICT Day Term 4,  Virtualisation is growing in usage.  Current CPU’s are designed to support Virtualisation.  Businesses are looking at virtualisation.
SAIGONTECH COPPERATIVE EDUCATION NETWORKING Spring 2010 Seminar #1 VIRTUALIZATION EVERYWHERE.
Enabling Technologies for Distributed and Cloud Computing Dr. Sanjay P. Ahuja, Ph.D FIS Distinguished Professor of Computer Science School of.
Attilio Rao FreeBSD developers summit 2012 FreeBSD Xen status update.
Xen Overview for Campus Grids Andrew Warfield University of Cambridge Computer Laboratory.
Secure & flexible monitoring of virtual machine University of Mazandran Science & Tecnology By : Esmaill Khanlarpour January.
การติดตั้งและทดสอบการทำคลัสเต อร์เสมือนบน Xen, ROCKS, และไท ยกริด Roll Implementation of Virtualization Clusters based on Xen, ROCKS, and ThaiGrid Roll.
Xen Virtualization Last Update Copyright 2011 Kenneth M. Chipps Ph.D.
Smartening the Environment using Wireless Sensor Networks in a Developing Country Presented By Al-Sakib Khan Pathan, Ph.D. Department of Computer Science.
Virtualization for Adaptability Project Presentation CS848 Fall 2006 Umar Farooq Minhas 29 Nov 2006 David R. Cheriton School of Computer Science University.
Virtual Machine and its Role in Distributed Systems.
INTRODUCTION TO VIRTUALIZATION KRISTEN WILLIAMS MOSES IKE.
COMS E Cloud Computing and Data Center Networking Sambit Sahu
Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton.
Performance – Last Lecture Bottom line performance measure is time Performance A = 1/Execution Time A Comparing Performance N = Performance A / Performance.
Other useful commands netstat ps tail kill. netstat Print network connections, routing tables, interface statistics, masquerade connections, and multicast.
Introduction to virtualization
Full and Para Virtualization
OS Project 0 February 25, Outline  Linux Installation  Linux Kernel Compilation  System Call Development  Kernel Modules / 452.
© Copyright 2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted Module 7.
Enabling Technologies for Distributed Computing Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing,
Virtualization One computer can do the job of multiple computers, by sharing the resources of a single computer across multiple environments. Turning hardware.
Libvirt management Andrea Chierici Virtualization tutorial Catania 1-3 dicember 2010.
1 PERFORMANCE DIFFERENTIATION OF NETWORK I/O in XEN by Kuriakose Mathew ( )‏ under the supervision of Prof. Purushottam Kulkarni and Prof. Varsha.
VIRTUAL MACHINE – VMWARE. VIRTUAL MACHINE (VM) What is a VM? – A virtual machine (VM) is a software implementation of a computing environment in which.
CLUG TALK Virtualbox Tuesday, 29 September 2009 One of the Jonathans.
Open Source Virtualization Andrey Meganov RHCA, RHCX Consultant / VDEL
Virtualization Neependra Khare
Virtualization - an introduction Gordon Ross Computing Service.
Welcome to the Virtual Machine Mark Cyzyk The Sheridan Libraries Johns Hopkins University.
Linux on AMD64, Michal Ludvig, Auckland LUG, 05 / 09 / 1 Linux on AMD64 Michal Ludvig
Taking full advantage of QEMU in Xen Daniel P. Berrange Xen Summit, November 2007.
XEN – The Art of Virtualisation. So what is Virtualisation? ● Makes use of spare capacity ● Run multiple instances of OSes simultaneously ● Multitasking.
Virtualization Mini Summit, Austin 2008 mmm, tasty penguins...
Virtualization for Cloud Computing
Virtualization.
Virtualization in Grid Rock
CSC 482/582: Computer Security
Xen and the Art of Virtualization
Virtualization overview
Virtual Servers.
libvirt: Stable API Management of hypervisor(s)
An introduction... Mike Latimer Sr. Engineering Manager SUSE
Running other code under LINUX
CIT 480: Securing Computer Systems
OS Virtualization.
Virtual machines benefits
NSLS II High Data Rate Workshop May 2016
Presentation transcript:

志豪

 Categories of Virtual Machine  Virtual Machine manager: Xen  Xen architecture  Xen component  Xen API  XenAccess Library  reference

 Full virtualization  VMware Workstation, VirtualBox VMware WorkstationVirtualBox  Hardware-assisted virtualization  Xen, Linux KVM XenLinux KVM  Partial virtualization  Paravirtualization  Operating system-level virtualization  OpenVZ OpenVZ

 Virtualization  Para-virtualization  64-bit architecture  32-bit architecture with PAE ~]# cat /proc/cpuinfo | grep flags flags : fpu tsc msr pae mce cx8 mtrr mca cmov pat pse36 mmx fxsr sse up

 Virtualization  Full-virtualization  Virtualization Technolegy (Intel)  SVM (AMD) 在 Intel Core 2 Duo 的 CPU 主機上面測試 CPU 旗標: ~]# cat /proc/cpuinfo | grep flags flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm

 Xen Hypervisor  Domain 0  Domain Management and Control (Xen DM&C)  Domain U (Dom U) PV Guest  Domain U (Dom U) HVM Guest

 Xen Hypervisor

 Domain 0

 Domain U  PV Guest

 Domain U  HVM Guest

 Domain Management and Control  Xend  Libxenctrl

 Domain Management and Control  Xm  Xenstored  Qemu-dm  Xen Virtual Firmware  Xen Operation

 Domain 0 and Domain U Communication

 Xen Management Architecture

 XenAPI Class Hierarchy

 Xen installed and running  libxml2  libcurl2  modify configuration

In /etc/xen/xend-config.sxp: (xen-api-server ( (9363 pam ‘^localhost$ example\\.com$’) (9367 pam '' /etc/xen/xen-api.key /etc/xen/xen-api.crt) (unix none))) Xen-API XML-RPC over HTTP / TCP on port 9363, using PAM and an allowed-hosts specifier HTTP over TLS over TCP on port 9367, using PAM and the specified keys Xen-API XML-RPC over a Unix domain socket at /var/run/xend/xen- api.sock, unauthenticated

xmlInitParser(); xen_init(); curl_global_init(CURL_GLOBAL_ALL); xen_session *session = xen_session_login_with_password(call_func, NULL, username, password); xen_vm vm; if (!xen_vm_get_by_uuid(session, &vm, uuid)) { /* Error */ } xen_vm_record *vm_record; if (!xen_vm_get_record(session, &vm_record, vm)) { /* Error */ } if (!xen_vm_start(session, vm)) { /* Error */ }

 Configuration file  /etc/xenaccess.conf  Data structure  xa_instance  xa_linux_taskaddr  xa_windows_peb  XenAccess API definition  xenaccess.h

 /etc/xenaccess.conf Fedora-HVM { sysmap = "/boot/System.map fc6"; ostype = "Linux"; linux_tasks = 268; linux_mm = 276; linux_pid = 312; linux_pgd = 40; linux_addr = 132; }

 Code sample ( process-list ) #include

 Code sample ( process-list ) #define TASKS_OFFSET 24 * 4 #define PID_OFFSET 39 * 4 #define NAME_OFFSET 108 * 4 #define ActiveProcessLinks_OFFSET 0x88 #define UniqueProcessId_OFFSET 0x84 #define ImageFileName_OFFSET 0x174

 Code sample ( process-list ) uint32_t dom = atoi(argv[1]); if (xa_init_vm_id_strict(dom, &xai) == XA_FAILURE){ perror("failed to init XenAccess library"); goto error_exit; }

 Code sample ( process-list ) memory = xa_access_kernel_sym(&xai, "init_task", &offset, PROT_READ); memcpy(&next_process, memory + offset + TASKS_OFFSET, 4); list_head = next_process; munmap(memory, xai.page_size);

 Code sample ( process-list ) while (1){ memory = xa_access_kernel_va(&xai, next_process, &offset, PROT_READ); memcpy(&next_process, memory + offset, 4); if (list_head == next_process){ break; } name = (char *) (memory + offset + NAME_OFFSET - TASKS_OFFSET); memcpy(&pid, memory + offset + PID_OFFSET - TASKS_OFFSET, 4); printf("[%5d] %s\n", pid, name); munmap(memory, xai.page_size); }

 Code sample ( process-list ) if (memory) munmap(memory, xai.page_size); xa_destroy(&xai);

 Running the example libxa]# xm list Name ID Mem(MiB)VCPUs State Time(s) Domain r Fedora-HVM b fc b libxa]#

 Running the example examples]#./process-list 5 [ 1] init [ 2] migration/0 [ 3] ksoftirqd/0 [ 4] watchdog/0 [ 5] events/0 [ 6] khelper [ 7] kthread [ 8] xenwatch [ 9] xenbus [ 15] kblockd/0 [ 57] pdflush [ 58] pdflush [ 60] aio/0 [ 59] kswapd0 [ 578] kseriod [ 685] kpsmoused [ 710] khubd [ 978] dhclient [ 1006] syslogd [ 1009] klogd [ 1021] sshd [ 1027] mingetty

 鳥哥的 linux 私房菜 – 利用 Xen 設計虛擬機器 鳥哥的 linux 私房菜 – 利用 Xen 設計虛擬機器  XenAPI – Xen Wiki XenAPI – Xen Wiki  Xen Architecture – Xen Wiki Xen Architecture – Xen Wiki  Xen Management API Xen Management API  Xen User & Interface manual  Can find at Xen package  XenAccess Library XenAccess Library