29
VMware Virtual Infrastructure orn Clausen [email protected]

VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMware Virtual Infrastructure

Jorn [email protected]

Page 2: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Produktpalette VMware

• verschiedene Hypervisoren:

– hosted: VMware Server / Workstation / Fusion

– bare metal: ESX / ESXi

• VMware Infrastructure 3:

– ESX(i) + Virtual Center + Infrastructure Client

– Virtual SMP, Update Manager, Consolidated Backup

– VMotion, Storage VMotion

– DRS (Dynamic Resource Scheduler)

– HA (High Availability)

• buzzword fur VMI4 vSphere 4.0: Continuous Availability

VMware Virtual Infrastructure 2/19

Page 3: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMware Infrastructure

Console

VM

ESX

VM

VMware Virtual Infrastructure 3/19

Page 4: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMware Infrastructure

Console

VM

ESX

VM

VI Client

VMware Virtual Infrastructure 3/19

Page 5: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMware Infrastructure

Console

VM

ESX

VM

VI Client

ESX

VirtualCenter

VM

VM

Console

VMware Virtual Infrastructure 3/19

Page 6: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMware Infrastructure

Console

VM

ESX

VM

VI Client

ESX

VirtualCenter

VM

VM

Console

VMware Virtual Infrastructure 3/19

Page 7: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMware Infrastructure

Console

VM

ESX

VM

VI Client

ESX

VirtualCenter

VM

VM

Console

VI Client

VMware Virtual Infrastructure 3/19

Page 8: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Administration

• Benutzerverwaltung durch

– ESX-Server (Unix-Accounts)

– Virtual Center (Windows-Benutzer)

– Active Directory

• Zuordnung von Rechten zu Rollen

• Zuweisung von Rollen an Benutzer/Gruppen

• Partitionierung des ESX-Clusters in Resource Pools

• Zuweisung von CPU- und Speicher-Anteilen

VMware Virtual Infrastructure 4/19

Page 9: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Architektur ESX(i)-Server

System

NetworkDiskCPU Memory

VMkernel

Hardware Interface LayerMonitor (VMM)

Virtual Machine

Guest

Operating

System

Guest

Operating

x86 Hardware

VMware Virtual Infrastructure 5/19

Page 10: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Architektur ESX(i)-Server

System

NetworkDiskCPU Memory

VMkernel

Hardware Interface LayerMonitor (VMM)

Virtual Machine

Guest

Operating

System

Guest

Operating

x86 Hardware

Console

Service

VMware Virtual Infrastructure 5/19

Page 11: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Architektur ESX(i)-Server

System

NetworkDiskCPU Memory

VMkernel

Hardware Interface LayerMonitor (VMM)

Virtual Machine

Guest

Operating

System

Guest

Operating

x86 Hardware

Console

Service

VMware Tools

VMware Virtual Infrastructure 5/19

Page 12: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Virtualisierung der CPU

• kernel und userland verteilen sich auf Ringe

• Hypervisor verdrangt Gast-Betriebssystem in hoheren Ring

Ring 3

VMMOS

App App App App AppApp

Guest OS

Ring 0

Ring 1

Ring 2

• klassischer Virtualisierungsansatz: trap and emulate

• kritische Instruktion lost trap aus, der von VMM abgefangen wird

VMware Virtual Infrastructure 6/19

Page 13: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Virtualisierung der x86-CPU

• 17 kritische Instruktionen

– losen keinen trap aus

– haben in Ring 6= 0 andere Semantik

• Losungen:

– Paravirtualisierung

– Anderung der x86-Architektur:”Ring -1“ (Intel VT, AMD-V)

Root Mode

Guest OS

App App App

Ring 0

Ring 1

Ring 2

Ring 3

VMM

– VMware: binary translation

VMware Virtual Infrastructure 7/19

Page 14: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

binary translation

• Abfolge von x86-Anweisungen wird in translation units aufgeteilt

• Uberprufung auf kritische Instruktionen und Speicherzugriffe

• modifizerter Code wird in translation cache abgelegt

• Ubersetzung ist lazy:

– bestimmte Teile werden eventuell nie ubersetzt (z.B. Fehlerbehandlung)

– haufig verwendete Teile lassen sich gut cachen

• selbstmodifizierender Code? Vorlaufer Embra:

– Uberwachung des Speichers mit Original-Code auf Schreiboperationen

– komplette Loschung des translation cache bei Anderung

• andere Beispiele fur BT: Virtual PC/VirtualBox, JVM, Transmeta Crusoe

VMware Virtual Infrastructure 8/19

Page 15: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Virtualisierung der Festplatte• innerhalb der VM: SCSI-Controller (LSI oder BusLogic) mit Festplatten

• Virtual Machine Disk Format (VMDK)

– snapshots durch copy-on-write

– Dateien innerhalb eines Wirts-Filesystems

• NFS oder VMFS

• Virtual Machine File System (VMFS)

– lokale Festplatten, Fibre Channel oder iSCSI

– optimiert fur große Dateien

– gleichzeitiger Zugriff durch mehrere ESX-Server

• Raw Device Mapping

• NAS/SAN ermoglicht einfache Migration einer VM

VMware Virtual Infrastructure 9/19

Page 16: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Speicherverwaltung ohne Virtualisierung

Process 1 Process 2 Operating System

physical memory

virtual memory ... ...

VMware Virtual Infrastructure 10/19

Page 17: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Speicherverwaltung ohne Virtualisierung

Process 1 Process 2 Operating System

physical memory

virtual memory ... ...page table

VMware Virtual Infrastructure 10/19

Page 18: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Speicherverwaltung ohne Virtualisierung

Process 1 Process 2 Operating System

physical memory

virtual memory ... ...page table

TLB

VMware Virtual Infrastructure 10/19

Page 19: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Speicherverwaltung ohne Virtualisierung

Process 1 Process 2 Operating System

physical memory

virtual memory ... ...page table

TLB

swap

VMware Virtual Infrastructure 10/19

Page 20: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Speicherverwaltung mit Virtualisierung

machine memory

Process 1.1 Process 1.2page table

Guest OS 1

... ...

Process 2.1 Process 2.2page table

Guest OS 2

... ...

virtualswap

virtualswap

virtual memory

physical memory

swap

• machine memory nicht unbedingt Summe der physical memories

• page sharing

• double paging problem: swapping des VMM moglichst vermeiden

VMware Virtual Infrastructure 11/19

Page 21: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Speicherverwaltung VMware

• derzeit nicht moglich: dynamische Anderung des physikalischen Speichers

• ballooning

– via VMware Tools wird Speicher innerhalb der VM alloziert

– Gast-Bestriebssystem beginnt, Speicher auszulagern

– freigewordener Speicher kann anderen VMs zugewiesen werden

– Verkleinerung des Ballons, wenn Speicher wieder ausreicht

• idle memory tax

– tatsachliche Speichernutzung wird durch provozierte page faults ermittelt

– unbenutzter Speicher wird per ballooning zuruckgefordert

VMware Virtual Infrastructure 12/19

Page 22: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Virtualisierung des Netzwerks• innerhalb der VM: AMD Lance PCNet32, Intel E1000 oder vmxnet

• in der Virtual Infrastructure: vSwitch

• Verbindung von VMs untereinander

• Verbindung von VMs mit physikalischen NICs des ESX-Servers

• NIC teaming

• VLAN taggingV

LAN

2

Console

VM1

VM2

VM3

VM4

vSwitch 1

vSwitch 2

vSwitch 3

nic0

nic1

nic2

Console

VM1

VM2

vSwitch 1 nic0

VM3

VM4

nic2

nic1vSwitch 2

VLA

N1

VMware Virtual Infrastructure 13/19

Page 23: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMotion

• Live-Migration einer VM zwischen zwei ESX-Servern

• Voraussetzungen:

– identisches Storage-Backend auf beiden ESX-Servern

– identische Netzwerk-Konfiguration auf beiden ESX-Servern

– (gleiche Prozessoren in beiden ESX-Servern)

• empfohlen: dediziertes Migrations-Netzwerk

• Ausfallzeit typischerweise unter einer Sekunde

• sollte innerhalb der Toleranz von ublichen Protokollen liegen

• technische Voraussetzungen fur standige Schatten-Kopie einer VM

VMware Virtual Infrastructure 14/19

Page 24: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

VMotion, cont.

Transfer von”working set“ und Meta-Daten

... ...

Transfer aller Seiten

Transfer veranderter Seiten

Start der Ziel-VM

Stopp der Quell-VM

Wiederholung, bis stabiler Zustand erreicht

VMware Virtual Infrastructure 15/19

Page 25: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Demonstration

VMware Virtual Infrastructure 16/19

Page 26: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Berichte von der Front

• snapshots und Migrations-Techniken

• weitere Leistungseinbußen durch snapshots

• virtuelles SMP

• Delegation von Rechten an”Kunden“

VMware Virtual Infrastructure 17/19

Page 27: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Berichte von der Front

• snapshots und Migrations-Techniken

• weitere Leistungseinbußen durch snapshots

• virtuelles SMP

• Delegation von Rechten an”Kunden“

• Fazit: Uberlege Dir ein Betriebskonzept!!!

VMware Virtual Infrastructure 17/19

Page 28: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Literatur• VMware Infrastructure 3 Documentation

http://www.vmware.com/support/pubs/vi pages/vi pubs 35u2.html

• VMware ESX Server 2 – Architecture and Performance Implicationshttp://www.vmware.com/pdf/esx2 performance implications.pdf

• Security Design of the VMware Infrastructure 3 Architecturehttp://www.vmware.com/pdf/vi3 security architecture wp.pdf

• Understanding Full Virtualization, Paravirtualization, and Hardware Assisthttp://www.vmware.com/files/pdf/VMware paravirtualization.pdf

• A Comparison of Software and Hardware Techniques for x86 Virtualizationhttp://www.vmware.com/pdf/asplos235 adams.pdf

• Analysis of the Intel Pentium’s Ability to Support a Secure Virtual Machine Monitorhttp://www.usenix.org/events/sec2000/robin.html

• Embra: Fast and Flexible Machine Simulationhttp://www.cs.utexas.edu/users/witchel/pubs/SIGMetrics96-embra.pdf

• Virtualizing I/O Devices on VMware Workstations’s Hosted Virtual Machine Monitorhttp://www.usenix.org/publications/library/proceedings/usenix01/sugerman.html

VMware Virtual Infrastructure 18/19

Page 29: VMware Virtual Infrastructure - oe-files.de · • VMware Infrastructure 3: – ESX(i) + Virtual Center + Infrastructure Client – Virtual SMP, Update Manager, Consolidated Backup

Literatur, cont.

• Memory Resource Management in VMware ESX Serverhttp://www.usenix.org/publications/library/proceedings/osdi02/tech/waldspurger.html

• The Role of Memory in VMware ESX Server 3http://www.vmware.com/pdf/esx3 memory.pdf

• VMware Virtual Networking Conceptshttp://www.vmware.com/files/pdf/virtual networking concepts.pdf

• Fast Transparent Migration for Virtual Machineshttp://www.usenix.org/events/usenix05/tech/general/nelson.html

• Live Migration of Virtual Machineshttp://www.usenix.org/events/nsdi05/tech/clark.html

• Xen und VMware ESX: Sicherheitsprobleme in x86-VirtualisierungsumgebungenBest Practice #24: Absicherung von VMware ESX Servernhttp://www.gai-netconsult.de/de/download/security/secjournal/index.html

VMware Virtual Infrastructure 19/19