Deploy and test ovirt using nested virtualization environments. Mark Wu wudxw@linux.vnet.ibm.com

Similar documents
Introduction to Virtualization & KVM

KVM Virtualization in RHEL 7 Made Easy

Virtualization Management the ovirt way

Linux Virtualization Nesting and Management

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

Introduction to KVM. By Sheng-wei Lee #

ovirt and Gluster hyper-converged! HA solution for maximum resource utilization

Virtualization in Linux KVM + QEMU

ovirt and Gluster hyper-converged! HA solution for maximum resource utilization

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

ovirt Introduction James Rankin Product Manager Red Hat Virtualization Management the ovirt way

Introduction to ovirt

KVM Virtualization in RHEL 6 Made Easy

ovirt: Open Your Virtual Data Center

Virtual Systems with qemu

Preparation Guide. How to prepare your environment for an OnApp Cloud v3.0 (beta) deployment.

Deploying Red Hat Enterprise Virtualization On Tintri VMstore Systems Best Practices Guide

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

Open Source Datacenter Conference 2011 System Management with RHN Satellite. Dirk Herrmann, Solution Architect, Red Hat

Virtualization & Cloud Computing (2W-VnCC)

Nested Virtualization

Nested Virtualization

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

Options in Open Source Virtualization and Cloud Computing. Andrew Hadinyoto Republic Polytechnic

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

2972 Linux Options and Best Practices for Scaleup Virtualization

ovirt self-hosted engine seamless deployment

How To Install Eucalyptus (Cont'D) On A Cloud) On An Ubuntu Or Linux (Contd) Or A Windows 7 (Cont') (Cont'T) (Bsd) (Dll) (Amd)

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

KVM Architecture Overview

Automated deployment of virtualization-based research models of distributed computer systems

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

Virtualization management web application software (ovirt)

RUNNING vtvax FOR WINDOWS

Open Source Virtualization with ovirt. DI (FH) René Koch Systems Engineer Siedl Networks GmbH Grazer Linuxtage,

Mirantis

Supported File Systems

KVM, OpenStack, and the Open Cloud

Enterprise-Class Virtualization with Open Source Technologies

Virtualization: Know your options on Ubuntu. Nick Barcet. Ubuntu Server Product Manager

The QEMU/KVM Hypervisor

OPEN SOURCE VIRTUALIZATION TRENDS. SYAMSUL ANUAR ABD NASIR Warix Technologies / Fedora Community Malaysia

Cloud Computing for Control Systems CERN Openlab Summer Student Program 9/9/2011 ARSALAAN AHMED SHAIKH

Virtualization on Linux Using KVM and libvirt. Matt Surico Long Island Linux Users Group 11 March, 2014

RED HAT ENTERPRISE VIRTUALIZATION

Deployment of Private, Hybrid & Public Clouds with OpenNebula

Cloud-init. Marc Skinner - Principal Solutions Architect Michael Heldebrant - Solutions Architect Red Hat

Getting cross-platform: bringing virtualization management to the PPC world

Solution for private cloud computing

Cloud Implementation using OpenNebula

Hadoop on OpenStack Cloud. Dmitry Mescheryakov Software

Enabling Technologies for Distributed and Cloud Computing

Enabling Technologies for Distributed Computing

Syncplicity On-Premise Storage Connector

Converting Linux and Windows Physical and Virtual Machines to Oracle VM Virtual Machines. An Oracle Technical White Paper December 2008

VMware vsphere 5.0 Boot Camp

Building a Penetration Testing Virtual Computer Laboratory

OGF25/EGEE User Forum Catania, Italy 2 March 2009

Virtualization and Performance NSRC

October Gluster Virtual Storage Appliance User Guide

EXPLORING LINUX KERNEL: THE EASY WAY!

KVM, OpenStack, and the Open Cloud

Cloud Computing with Red Hat Solutions. Sivaram Shunmugam Red Hat Asia Pacific Pte Ltd.

CS312 Solutions #6. March 13, 2015

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

An Oracle White Paper October Oracle VM 3: Quick Start Guide

INTRODUCTION TO CLOUD MANAGEMENT

Implementing and Troubleshooting the Cisco Cloud Infrastructure **Part of CCNP Cloud Certification Track**

A technical whitepaper describing steps to setup a Private Cloud using the Eucalyptus Private Cloud Software and Xen hypervisor.

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Postgres on OpenStack

Event Listener based UCS Integration with OpenStack

Onboarding VMs to Cisco OpenStack Private Cloud

RED HAT ENTERPRISE VIRTUALIZATION FOR SERVERS: COMPETITIVE FEATURES

Full and Para Virtualization

opening the clouds qualitative overview of the state-of-the-art open source cloud management platforms. ACM, middleware 2009 conference

Release Notes for Fuel and Fuel Web Version 3.0.1

Develop a process for applying updates to systems, including verifying properties of the update. Create File Systems

Virtualization. Types of Interfaces

A Virtualized Linux Integrity Subsystem for Trusted Cloud Computing

Open Source Virtualization

Getting Started Using Project Photon on VMware Fusion/Workstation

Oracle Linux Advanced Administration

How To Install Project Photon On Vsphere 5.5 & 6.0 (Vmware Vspher) With Docker (Virtual) On Linux (Amd64) On A Ubuntu Vspheon Vspheres 5.4

Virtualization in Linux

Installing & Using KVM with Virtual Machine Manager COSC 495

AFACT Cloud Computing Working Group. Chia Hung Kao Institute for Information Industry

Beyond the Hypervisor

CloudPlatform (powered by Apache CloudStack) Version 4.2 Administrator's Guide

PARALLELS SERVER 4 BARE METAL README

Xen Virtualization Software

OpenNebula Open Souce Solution for DC Virtualization

Transcription:

Deploy and test ovirt using nested virtualization environments Mark Wu wudxw@linux.vnet.ibm.com 1

Agenda Nested KVM Kickstart & Cobbler Kickstart files for VMs Install and clone ovirt VMs Integration test with Igor Q & A 2

Nested Virtualization Running multiple unmodified hypervisors with their associated unmodified VM s Why? Operating systems are already hypervisors (Windows 7 with XP mode, Linux/KVM) To be able to run other hypervisors in clouds Live migration of hypervisors and their vms Testing, demonstrating, debugging hypervisors and virtualization setups 3

Nested VMX Merged in kernel 3.1 No hardware support Multiplex hardware Follows the trap and emulate model L1 Guest Hypervisor L2 Guest OS VMCS Memory Table 1-2 State Flow: L0 intercepts the 'vmlaunch' instruction which L1 execute to run L2 L0 generates VMCS0-2 by merging VMCS1-2 and VMCS0-1 and then launches L2 L0 VMCS 0-1 State Memory Table VMCS Host Hypervisor Hardware Memory Table 0-2 State 4

How to enable nested KVM? (For VMX) Enable the nested switch of kvm_intel.ko enable it at runtime modprobe -r kvm_intel Verify modprobe kvm_intel nested=1 $cat /sys/module/kvm_intel/parameters/nested => Y Persist the change echo options kvm-intel nested=1 >/etc/modprobe.d/kvmintel.conf Qemu command line 5 qemu -cpu host qemu -cpu qemu64,+vmx

How to enable nested KVM? (cont'd) Libvirt XML Use host CPU model <cpu mode='host-model'/> Specify a CPU model <cpu match='exact'> <model>core2duo</model> <feature policy='require' name='vmx'/> </cpu> 6 Verify in guest cat /proc/cpuinfo grep vmx qemu-kvm should not complain about no access to KVM kernel module

Kickstart & Cobbler Kickstart Using 'answer file' to installer to do fully automatic installations Used with PXE Cobbler A provisioning (installation) and update server Supports deployments via: PXE (network booting) Virtualization (Xen, QEMU/KVM, or Vmware) (by koan) Re-installs of existing Linux systems (by koan) Update server features 7 yum mirroring Integrate mirrors with kickstart

Cobbler concepts Distributions contain information about what kernel and initrd are used, plus metadata Profiles associate a Distribution with a kickstart file and optionally customize the metadata further. Systems associate a MAC, IP, and other networking details with a profile Repositories contain yum mirror information 8

Setup cobbler server for ovirt mount -o loop Fedora-18-x86_64-DVD.iso /mnt cobbler import --path=/mnt --name=fedora18 arch=x86_64 cobbler repo add --name=ovirt-3.2 --mirror=http://resources.ovirt.org/releases/3.2/rpm/fedora/18/ cobbler repo add name=glustefs --mirror=http://download.gluster.org/pub/gluster/glusterfs/qareleases/3.4.0alpha/fedora/fedora-18/x86_64/ cobbler repo add --name=fedora18-everything --mirror=http://mirrors.163.com/fedora/releases/18/everything/x86_64/os --mirrorlocally=n cobbler repo add --name=fedora18-updates --mirror=http://mirrors.163.com/fedora/updates/18/x86_64/ --mirror-locally=n cobbler reposync 9 cobbler profile add --name=fedora18-engine --distro=fedora18-x86_64 --virt-ram=2048 --virt-type=qemu --virt-file-size=20 --virt-cpus=2 --virt-path=/var/lib/libvirt/images/ --virtdisk-driver=qcow2 virt-bridge=virbr-ovirt --repos="ovirt-3.2 fedora18-everything fedora18-updates" kickstart=/var/lib/cobbler/kickstarts/engine.ks...

Cobbler Web UI 10

Kickstart file for ovirt engine Key packages: ovirt-engine firefox spice-xpi Prepare an answer file in %post section 11 cat >/home/ovirtadm/engine/answer <<EOF [general]... HOST_FQDN=ENGINE_FQDN # Replace with hostname before running engine-setup AUTH_PASS=ovirt DC_TYPE=NFS DB_REMOTE_INSTALL=local DB_LOCAL_PASS=ovirt NFS_MP=/var/lib/export/iso... EOF

Kickstart file for VDSM Key packages vdsm vdsm-cli vdsm-gluster -NetworkManager Inject ssh public key cat >>.ssh/authorized_keys << END_AUTHORIZED_KEYS ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQmD6md... (replace it with the ssh public key on your management host. END_AUTHORIZED_KEYS chmod 600.ssh/authorized_keys 12 if -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled; then chcon -R -h -t home_ssh_t.ssh fi

Kickstart file for storage server Key packages nfs-utils targetcli Create volume group for NFS part pv.02 --size=83920 volgroup vg_iscsi pv.02 logvol /ovirt-iso --fstype ext4 --vgname=vg_nfs --name=lv1 --size=20480 logvol /ovirt-data --fstype ext4 --vgname=vg_nfs --name=lv2 --size=20480 --grow Enable NFS service 13 chown 36:36 /ovirt-data /ovirt-iso echo "/ovirt-data *(rw)" > /etc/exports echo "/ovirt-iso *(rw)" >> /etc/exports systemctl enable targetcli.service systemctl start targetcli.service

Kickstart file for storage server (Cont'd) Create volume group for iscsi target Setup iscsi target via LIO LIO is the standard and unified SCSI Target in Linux Supports different fabrics as the frontend of the SCSI target by fabric modules: Fibre Channel, FcoE, iscsi, vhost, etc. Backstores implement methods of accessing data on devices. block, fileio, pscsi, ramdisk, etc 14 Configured by targetcli. targetcli "/backstores/block create name=block01 dev=/dev/iscsi/lv01" targetcli "/iscsi create wwn=iqn.2013-04.org.ovirt.storage-server:t01" targetcli "/iscsi/iqn.2013-04.org.ovirt.storage-server:t01/tpg1/luns create storage_object=/backstores/block/block01" targetcli "/iscsi/iqn.2013-04.org.ovirt.storage-server:t01/tpg1/portals create"... targetcli "/ saveconfig"

VM Network 15 Make use of libvirt's NATed virtual network. Set mac, ip, and hostname mapping for VMs <network> <name>ovirt-test</name> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr-ovirt' stp='on' delay='0' /> <mac address='52:54:00:ba:19:df'/> <domain name='test.ovirt.org'/> <ip address='192.168.247.1' netmask='255.255.255.0'> <dhcp> <host mac='52:54:00:70:9e:33' name='engine1' ip='192.168.247.2' /> <host mac='52:54:00:9a:82:be' name='storage1' ip='192.168.247.3' /> <host mac='52:54:00:e1:dc:f4' name='host1'' ip='192.168.247.4' /> <host mac='52:54:00:1b:3a:a2' name='host2' ip='192.168.247.5' /> </dhcp> </ip> </network>

Create ovirt VMs Using virt-install virt-install --name engine-base --vcpus 2 ram 2048 --disk path=/var/lib/libvirt/engine-base.qcow2,format=qcow2,bus=virtio,cache=none -w network=ovirt-test --accelerate --location $(INSTALL_TREE) --os-variant fedora18 --extra-args ks=http://cobbler-server/engine.ks --noreboot Using koan koan --server 192.168.247.1 --virt --profile=fedora18-engine --virt-type=kvm qemudisk-type=virtio virt-name=engine-base koan --server 192.168.247.1 --virt --profile=fedora18-vdsm --virt-type=kvm qemudisk-type=virtio virt-name=vdsm-base Update CPU model to enable nested KVM for VMs running VDSM 16

Clone ovirt VMs Clone images based on the base Vms qemu-img create -f qcow2 -b /var/lib/libvirt/image/engine-base /var/lib/libvirt/engine-foo.qcow2 Append a new dhcp entry (mac, ip and hostname) to virtual network for the new vm. Clone new vm virt-clone --connect qemu:///system -o engine-base -n engine1 -f /var/lib/libvirt/image/engine-foo.qcow2 --preserve-data --mac MAC Update configurations inside guests guest-mount Run guest commands via ssh, like engine-setup 17

Put things together & Demo Create VM network and base Vms ovirt-setup.py setup ovirt-setup.py create-base --type engine --name engine-base --profile fedora18-engine ovirt-setup.py create-base --type vdsm --name vdsm-base --profile fedora18-vdsm ovirt-setup.py create-base --type storage --name storage-base --profile fedora18-storage 18 Clone a new ovirt setup ovirt-setup.py clone-vm --base engine-base --name engine1 ovirt-setup.py clone-vm --base vdsm-base --name vdsm1 ovirt-setup.py clone-vm --base vdsm-base --name vdsm2 ovirt-setup.py clone-vm --base storage-base --name storage1

ovirt cluster level tests ovirt-engine-sdk an auto-generated python API which uses REST-API to perform operations against ovirt-engine Examples Create iscsi Data Center if api.datacenters.add(params.datacenter(name=dc_name, storage_type='iscsi', version=version)): print 'iscsi Data Center was created successfully' Create Cluster if api.clusters.add(params.cluster(name=cluster_name, cpu=params.cpu(id=cpu_type), data_center=api.datacenters.get(dc_name), version=version)): print 'Cluster was created successfully' 19

Igor Used for auto testing for ovirt Node/REHV-H Automate deployment, installation Installation via PXE Import ISO using livecd-to-pxeboot Create profile and system in Cobbler. Run installation or update Works for virtual guests and real hardware Libvirt for virtual guests Testsuite life-cycle management 20

Proposed solution for ovirt functional test Expand Igor's test plan for ovirt functional tests Allow specify the specs of test environment Allow creating test vm based on a template Allow creating vm template if it doesn't exist Skipped system installation Ship igor-client in ovirt-engine VM Associate test cases with host name Run test suites based on ovirt engine SDK Run update rpm packages as a 'setup' test 21

Test flow with Igor using nested KVM 22

Resources The Turtles Project: Design and Implementation of Nest ed Virtualization http://fedoraproject.org/wiki/anaconda/kickstart http://www.cobblerd.org/ http://www.ovirt.org/testing/pythonapi Automated Testing of ovirt Node https://github.com/wudx05/ovirt-setup 23

Thanks for Listening! Q & A http://www.ovirt.org wudxw@linux.vnet.ibm.com 24