9
Xen Juan Ortega

Xen

Embed Size (px)

DESCRIPTION

Xen. Juan Ortega. Virtualization?. Virtual Machine vs Hypervisor. Desktop virtualization. Hypervisor. Types of Virtualization. Full Virtualization Runs unmodified OS “hosts” as a userspace program to emulate the machine. Some like QEMU can simulate different processors. - PowerPoint PPT Presentation

Citation preview

Page 1: Xen

XenJuan Ortega

Page 2: Xen

Virtualization?

Page 3: Xen

Virtual Machine vs Hypervisor

Desktop virtualization

Hypervisor

Page 4: Xen

Full VirtualizationRuns unmodified OS “hosts” as a userspace program to emulate the machine. Some like QEMU can simulate different processors.

Types of Virtualization

OS-level VirtualizationEmulates a complete OS userspace using operating system facilities.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-build.htmlv

ParavirtualizationRelies on modified operating system kernels to work with the hypervisor.

Page 5: Xen

Hosts-Supported Systems

dom0

Novell’s SUSE Linux Red Hat Enterprise Linux 5

(RHEL5) Fedora Ubuntu (partial) Debian Gentoo Arch Linux openSUSE OpenSolaris OpenBSD? NetBSD Linux 3.0 +

Guests-Supported Systems

domU

Minix Plan 9 NetBSD OpenBSD FreeBSD (experimental) OpenSolaris NetWare GNU Hurd OZONE (old) Linux 3.0 +

Unmodified Guest OS using Hardware virtualization

(HVM)

Allows Guest OSs like Windows to run in “bare metal”. Vt-X and SVM

Page 6: Xen

Getting started

$ xm listName ID Mem VCPU State Time(s)Domain-0 0 934 2 r----- 37.6--------------------------------------------------------------$ cat /etc/xen/config_examplename = “guest name”kernel = /boot/vmlinuz-2.6-xen.gzmaxmem = 256memory = 256vcpus = 1vfb = [ ]disk = [“tap:aio:/opt/xen/images/disk.img,xvda,w”]vif = [“mac=00:16:3e:63:b7:a0, bridge=xenbr0”]---------------------------------------------------------------------------$ cm create –c /etc/xen/config_example

Page 7: Xen

StorageFile as a block device.

$ dd if=/dev/zero of=/opt/xen/drive_disk.img bs=10M count=1024$ xm block-attack 0 tap:aio:/opt/xen/drive_disk.img /dev/xvda1 w 0$ mkfs.ext4 /dev/xvda1$ mount /dev/xvda1 /mnt/

$ cp –a /opt/xen/images/centos-<version>/* /mnt/disk = [‘tap:aio:/opt/xen/drive_disk.img’]$ xm create –c dive_disk

LVM as device-independent physical devices.$ lsmod or $ modprobe dm_mod$ pvcreate /dev/sdb1$ vgcreate disk_drive /dev/sdb1$ lvcreate –L <disk size> -nName disk_drive$ mount /dev/disk_drive/Name /mnt/hdDisk = [‘phy:/dev/disk_drive/None,sdb1,w’]

Page 8: Xen

NetworkEach VM can have up to 8 interfaces.vif = [‘’, ‘’, ‘’]

vif = [‘ip=“10.0.0.1”,mac=“ae:00:01:02:03:04”’]

xm network-attach script=network bridge bridge=xenbr0

Page 9: Xen

Management

vlrt-manager