User Mode Linux, VMWare and Wine



Similar documents
Advanced Server Virtualization: Vmware and Microsoft Platforms in the Virtual Data Center

Table of Contents Introduction and System Requirements 9 Installing VMware Server 35

User-Mode Linux. Jeff Dike. Abstract. 2 Devices. 1 Introduction

2.2 File Systems. 2.1 (VDE) Virtual Distributed Ethernet

Example of Standard API

How to install software on VMware ESXi 4.0/4.1

W H I T E P A P E R. Best Practices for Building Virtual Appliances

Enterprise-Class Virtualization with Open Source Technologies

EXPLORING LINUX KERNEL: THE EASY WAY!

The QEMU/KVM Hypervisor

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

Cisco Nexus 1000V Virtual Ethernet Module Software Installation Guide, Release 4.0(4)SV1(1)

A Comparison of VMware and {Virtual Server}

Retrospect 7.7 User s Guide Addendum

Running virtualized native drivers in User Mode Linux p.1/30

LANDesk White Paper. LANDesk Management Suite for Lenovo Secure Managed Client

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Professional Xen Visualization

PCI Express SATA / esata 6Gb/s RAID Card User Manual

Option nv, Gaston Geenslaan 14, B-3001 Leuven Tel Fax Page 1 of 14

Network Licensing. White Paper 0-15Apr014ks(WP02_Network) Network Licensing with the CRYPTO-BOX. White Paper

Backup & Disaster Recovery Appliance User Guide

TGL VMware Presentation. Guangzhou Macau Hong Kong Shanghai Beijing

CDH installation & Application Test Report

LSN 10 Linux Overview

PARALLELS SERVER 4 BARE METAL README

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

PARALLELS SERVER BARE METAL 5.0 README

CrossOver Compared to Competing Emulation Solutions

Version 1.0. File System. Network Settings

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Lecture 5. User-Mode Linux. Jeff Dike. November 7, Operating Systems Practical. OSP Lecture 5, UML 1/33

RecoveryVault Express Client User Manual

Virtualization. Michael Tsai 2015/06/08

Table of Contents. Online backup Manager User s Guide

Virtual Private Systems for FreeBSD

Online Backup Linux Client User Manual

Incremental Backup Script. Jason Healy, Director of Networks and Systems

Chapter 2 System Structures

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Chapter 14 Virtual Machines

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

Using Integrated Lights-Out in a VMware ESX environment

Online Backup Client User Manual

Building a Penetration Testing Virtual Computer Laboratory

FileCruiser Backup & Restoring Guide

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Enabling NetFlow on Virtual Switches ESX Server 3.5

Using the IPMI interface

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Deploying Windows Streaming Media Servers NLB Cluster and metasan

Virtual Systems with qemu

VMWARE Introduction ESX Server Architecture and the design of Virtual Machines

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

The RT module VT6000 (VT6050 / VT6010) can be used to enhance the RT. performance of CANoe by distributing the real-time part of CANoe to a

IBM WebSphere Application Server Version 7.0

HOWTO: Set up a Vyatta device with ThreatSTOP in bridge mode

Configuring iscsi Multipath

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Guest Operating System. Installation Guide

Virtualization of Linux based computers: the Linux-VServer project

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

Acronis Backup & Recovery 10 Advanced Server Virtual Edition. Quick Start Guide

Acronis Backup & Recovery 10 Workstation. Installation Guide

VMware vsphere 5 Quick Start Guide

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

M.Sc. IT Semester III VIRTUALIZATION QUESTION BANK Unit 1 1. What is virtualization? Explain the five stage virtualization process. 2.

9 Headless Systems & Remote Management

USB 2.0 Flash Drive User Manual

PowerPanel Business Edition Installation Guide

P2V Best Practices. Joe Christie Technical Trainer

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Linux Basics

VIRTUOZZO TM FOR LINUX 2.6.1

1. Product Information

Reboot the ExtraHop System and Test Hardware with the Rescue USB Flash Drive

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Online Backup Client User Manual Linux

System Structures. Services Interface Structure

Management of VMware ESXi. on HP ProLiant Servers

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

How to Use? SKALICLOUD DEMO

Using VMware Player. VMware Player. What Is VMware Player?

Centralized Mac Home Directories On Windows Servers: Using Windows To Serve The Mac

Novell Remote Manager Administration Guide

SUSE LINUX Enterprise Server for SGI Altix Systems

SonicWALL SRA Virtual Appliance Getting Started Guide

VMware/Hyper-V Backup Plug-in User Guide

Upgrading Cisco UCS Central

Online Backup Client User Manual

Acronis Backup & Recovery 11

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

SSL VPN. Virtual Appliance Installation Guide. Virtual Private Networks

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Regional SEE-GRID-SCI Training for Site Administrators Institute of Physics Belgrade March 5-6, 2009

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Transcription:

User Mode Linux, VMWare and Wine Virtual Machines Under Linux Brad Marshall bmarshal@pisoftware.com Plugged In Software SAGE-AU p. 1/43

Contents What is UML What use is UML What hardware can UML support Installing UML Networking Copy on Write Host file access Serial Lines and Consoles Management Console SKAS and TT Mode Running X Compiling a UML kernel SAGE-AU p. 2/43

What is UML? Port of linux kernel to linux system calls, rather than hardware Gives a virtual OS - no machine emulation layer Disk storage is done via files on host system Can control what hardware the virtual machine can access Won t damage real computers hardware or software Runs own scheduler and VM UML kernel and processes run as processes on host kernel Can run as any user SAGE-AU p. 3/43

UML Architecture Process 2... Process 1 UML Linux Kernel Hardware SAGE-AU p. 4/43

What use is UML? Safe way of running Linux distributions Kernel development and debugging Process debugging Learning Secure sandbox / jail Honeypots Test environment Disaster recovery practice ISP s virtual hosting... whatever! SAGE-AU p. 5/43

What hardware can UML support? Block devices Consoles and serial lines Network devices SCSI devices USB devices Sound cards PCI hardware (in progress) SAGE-AU p. 6/43

Installing UML Host machine needs 2.2.15 or 2.3.22 (or later) Patch available for older kernels Minimum needed: UML kernel Root filesystem to boot Optional host kernel patch for skas (Separate Kernel Address Space) SAGE-AU p. 7/43

UML Utilities uml_moo - merge COW file with its backing file uml_mconsole - attach to UML management console uml_switch - switch daemon uml_net - setuid helper for network setup tunctl - create and control persistent TUN/TAP interfaces SAGE-AU p. 8/43

Networking Transports can provide network to: Local host Other machines on local net Rest of the internet Done using one of the available transports: Exchange packets with host ethertap TUN/TAP slip slirp pcap Virtual network Multicast switch daemon Uses uml_net setuid helper for configuration SAGE-AU p. 9/43

Choosing a transport ethertap if you want access to the host networking and it is running 2.2 TUN/TAP if you want access to the host networking and it is running 2.4. Can use a preconfigured device, which doesn t require uml_net Multicast if you want a purely virtual network and you don t want to set up anything but the UML a switch daemon if you want a purely virtual network and you don t mind running the daemon in order to get somewhat better performance SAGE-AU p. 10/43

Choosing a transport cont slip there is no particular reason to run the slip backend unless ethertap and TUN/TAP are just not available for some reason slirp if you don t have root access on the host to setup networking, or if you don t want to allocate an IP to your UML pcap not much use for actual network connectivity, but great for monitoring traffic on the host SAGE-AU p. 11/43

UML Networking Kernel Boot Args General format eth<n>=<transport>,<transport args> Multicast eth<n>=mcast TAP/TUN eth<n>=tuntap,<ip address> Ethertap eth<n>=ethertap,<device>,<ethernet address>,<tap IP address> SAGE-AU p. 12/43

UML Networking Kernel Boot Args Switch daemon eth<n>=daemon,<ethernet address>,<socket type>,<control socket>,<data socket> Slip eth<n>=slip,<slip IP> Slirp eth<n>=slirp,<ethernet address>,<slirp path> Pcap eth<n>=pcap,<host interface>,<filter expression>,<option1>,<option2> SAGE-AU p. 13/43

Sharing filesystems between UMLs Uses copy-on-write layering in the ubd block device Layers a private read-write device over a shared read-only device Useful when using lots of virtual machines - saves lots of disk space Writes are done to private device, reads from either Do not boot directly from read-only backing files - will invalidate any COW files that use it SAGE-AU p. 14/43

Creating COW files To create COW file, boot with ubd0=root_fs_cow,root_fs_debian_22 After creation, only need: ubd0=root_fs_cow Name of backing file is stored in COW file header To merge a COW file and backing file: uml_moo <COW file> <new backing file> SAGE-AU p. 15/43

Host File Access hostfs allows mounting of files from host filesystem Check hostfs is available on virtual machine by looking at /proc/filesystem Mount it by: mount none /mnt/host -t hostfs If you want to mount a subdirectory: mount none /mnt/host -t hostfs -o /path SAGE-AU p. 16/43

Serial Lines and Consoles Can attach serial lines and consoles to a variety of host I/O channels ptys ttys file descriptors ports Done via a command line option, of format <device>=<channel> Consoles use device con, serial lines use ssl Use device number to talk about specific device, without specifies all SAGE-AU p. 17/43

Serial Lines and Consoles Channels Pseudo terminals - <device>=pts Terminals - <device>=tty:<tty device> Xterms - <device>=xterm Port - <device>=port:<port no> File descriptors - <device>=<fd> Nothing - <device>=null None - <device>=none Specify different input and output channels by putting a comma between them SAGE-AU p. 18/43

Management Console Low level interface to kernel, like SysRq Allows you to: get the kernel version add and remove devices halt or reboot the machine send SysRq commands pause and resume the UML make online backups without shutting down the UML receive notifications of events of interest from within UML Needs uml_console (part of uml utilities) and CONFIG_MCONSOLE SAGE-AU p. 19/43

Management Console Usage When booting UML, there will be a line like: mconsole (version 2) initialized on /home/brad/.uml/4uuehn/mconsole Can specify unique machine id passing umid=debian Attach by calling uml_console with mconsole socket or umid $ uml_console debian SAGE-AU p. 20/43

Mconsole Commands version Prints UML version halt and reboot Shuts down machine instantly config Adds a new device or queries config of existing one remove Removes device from system SAGE-AU p. 21/43

Mconsole Commands cont sysrq Takes one letter argument, calls kernel s SysRq driver help Gives help cad Calls Control-Alt-Delete on UML instance stop and go Pauses until go is run SAGE-AU p. 22/43

Tracing Thread Mode Each UML process is also a process on host Tracing thread that does system call tracing on UML processes Tracing thread nullified system calls, caused process to enter UML kernel (mapped to upper part of address space) Problems: UML kernel is present in address space of its processes, and by default is writeable UML s jail fixes this by making it read-only, but at a performance cost Kernel can still be read and found out that it is a UML UML uses signals to send control to UML kernel during system call or interrupt SAGE-AU p. 23/43

Seperate Kernel Address Space Mode UML kernel runs in diff host address space from processes Address space is identical to what it would be on the host Requires kernel patch on host On virtual machine, make sure you have CONFIG_MODE_SKAS Will fall back to TT mode if host doesn t have support On bootup, will see: Checking for the skas3 patch in the host...found Checking for /proc/mm...found SAGE-AU p. 24/43

Running X Run X clients on host X server Setup network as normal Set the display to the host s X server then run clients as normal $ export DISPLAY=host-ip:0 Run a local virtual X server Setup networking as normal Run Xnest Set the display to Xnest, then run clients as normal $ export DISPLAY=:0 SAGE-AU p. 25/43

Compiling a UML kernel $ tar xvfj linux-2.4.20.tar.bz2 $ cd /path/to/kernel $ zcat uml-patch.gz patch -p1 $ make config ARCH=um $ make linux ARCH=um $ make modules ARCH=um $ sudo mount /path/to/root_fs \ /path/to/mnt -o loop $ make modules_install \ INSTALL_MOD_PATH=/path/to/mnt/ \ ARCH=um SAGE-AU p. 26/43

Building a UML filesystem mkrootfs - command line utility for building multiple filesystems UML Builder - Step by step UML filesystem builder gbootroot - GUI app for creating UML filesystems and boot disks rootstrap - Debian filesystem creation util SAGE-AU p. 27/43

UML Honeypot Allows the use of one host for the honeypot Traffic logged from that host via iptables Intruder can get root on UML without endangering host Kernel option, honeypot, to rearrange address space to allow stack smash exploits to work Kernel option, jail, protects kernel memory from processes Useful UML features for honeypots tty logging - logs all tty traffic out to host hppfs - HoneyPot ProcFS - allows /proc to be modified skas mode - process address space is identical to host SAGE-AU p. 28/43

UML Future SMP Emulate more processes than host has Clustering Run UML across multiple hosts (and multiple OSes) Security Honeypot Jailed services Sandbox hostfs extensions Access to local and remote filesystems (rsync, ssh) Mount databases as filesystem SAGE-AU p. 29/43

UML Future cont Ports to other OSes Windows Non-i386 linux Embed UML into applications Mount application as filesystem, modify it via fs See connections as processes Providing colocation Already happening - some ISPs providing services using UML SAGE-AU p. 30/43

UML Conclusion Implementing UML has shown up bugs in Linux kernel Running applications in UML makes debugging easier Good for securely hosting services Can give Linux the ability to move into areas it wasn t Ability to run virtual machines can give good test environments Still in early stages of development SAGE-AU p. 31/43

VMWare Provides a virtual machine to install an OS on 3 main products Workstation Run multiple OSes on the desktop GSX Server For providing virtual servers on enterprise hardware Provides support for clustering of virtual machines ESX Server Has own operating system Guarenteed service levels for virtual machines Provides remote management functionality SAGE-AU p. 32/43

VMWare Booting SAGE-AU p. 33/43

VMWare BIOS SAGE-AU p. 34/43

VMWare Login SAGE-AU p. 35/43

VMWare Tools Useful utilities available in vmware tools Includes: SVGA driver Guest OS service Tools control panel SAGE-AU p. 36/43

VMWare Toolbox SAGE-AU p. 37/43

VMWare Toolbox SAGE-AU p. 38/43

VMWare Toolbox SAGE-AU p. 39/43

Wine Implementation of Windows win32 and win16 API on linux Supports Win32 (Win9x/NT and XP), Win3.x and DOS Doesn t require MS Windows to run Can use native system DLLs if available Graphics - DirectX and OpenGL Supports networking, sound, serial ports, etc SAGE-AU p. 40/43

Wine Versions ReWind Forked version of Wine from when it changed from X11 license to LGPL Transgaming WineX Designed for games Includes Direct3D and copy protection support Codeweavers Wine preview Nice setup program for easy install Codeweavers CrossOver plugin Used to run Win32 browser plugins in Linux, eg QuickTime Codeweavers Office Good support for MS Office SAGE-AU p. 41/43

URLs User Mode Linux http://user-mode-linux.sourceforge.net/ http://www.usermodelinux.org/ VMWare http://www.vmware.com/ Wine http://www.winehq.com/ SAGE-AU p. 42/43

Questions? Questions? SAGE-AU p. 43/43