Dynamically Provisioning Resources to KVM Hosted Linux Virtual Servers

Dynamically Provisioning Resources to KVM Hosted Linux Virtual Servers

Dynamically provisioning resources to KVM hosted Linux virtual servers Richard Young Executive I.T. Specialist IBM Systems Lab Services Virtualization and Linux 2019 IBM Systems Technical University October 7 - 11 | Las Vegas Session: l109937 Tue 3:15-4:15 Veronese 2506-Level 2 LinuxONE Fast Start for Linux admins Lectures here Labs here IBM Systems Technical University (c) IBM Corporation 2019 2 LinuxONE Fast Start for Linux admins – Badge requirements To earn a badge for this track, you must do l109257 L4E: Open ecosystem exploits scalability and encryption on IBM z14 the following: l109420 L4E: IBM LinuxONE 101 1. Enroll in the LinuxONE Fast Start l109928 L4E: Options to consider when architecting a LinuxONE deployment (send email to [email protected]) l109930 L4E: Pervasive encryption in a Linux on Z environment 2. Attend at least 9 of 12 lectures listed l109932 L4E: Dynamically provisioning resources with LPAR or z/VM here (name and signature on sign-in sheet l109933 L4E: Hardware Management Console tour for newbies or badge scan) l109934 L4E: What is unique about Linux on Z - A Linux admin perspective 3. Complete all required lab exercises. You l109935 L4E: Simplify deployment with IBM Dynamic Partition will be assigned to one of 3 lab time slots. Manager Lab instructors will record your name after l109936 L4E: Networking with KVM -- So many choices! you show them you have completed those l109937 L4E: Dynamically provisioning resources with KVM exercises. l110571 L4E: Lab: Working with Dynamic Partition Manager on LinuxONE z109804 L4E: IBM z/VM virtualization basics z110037 L4E: Monitoring and Managing z/VM for Linux Virtual Servers IBM Systems Technical University (c) IBM Corporation 2019 3 Agenda 1 The Value of Dynamically Provisioning and Deprovisioning Resources 2 Channels and ignored devices 3 Dynamically Adjusting Disk Storage Resources 4 Dynamically Adjusting Networking Resources 5 Dynamically Adjusting Memory Resources 6 Dynamically Adjusting CPU Resources 7 Live migrating the workload to the available resource 2019 IBM Systems Technical University Agenda 1 The Value of Dynamically Provisioning and Deprovisioning Resources 2 Channels and ignored devices 3 Dynamically Adjusting Disk Storage Resources 4 Dynamically Adjusting Networking Resources 5 Dynamically Adjusting Memory Resources 6 Dynamically Adjusting CPU Resources 7 Live migrating the workload to the available resource 2019 IBM Systems Technical University Dynamic Resource Configuration • Helps to avoid Linux guest restarts and potential outage/downtime resource allocation changes • Accommodate unplanned increases in application workload demands or application that consume more resources than expected resource • It can allow for more efficient overall hypervisor operation (reduced operational overhead) • Automated policy based reconfiguration is more responsive than manual adjustments. • May provide assistance with upgrades by provisioning lower levels of resources both before a virtual server is in production and after it is removed from production. 2019 IBM Systems Technical University Agenda 1 The Value of Dynamically Provisioning and Deprovisioning Resources 2 Channels and ignored devices 3 Dynamically Adjusting Disk Storage Resources 4 Dynamically Adjusting Networking Resources 5 Dynamically Adjusting Memory Resources 6 Dynamically Adjusting CPU Resources 7 Live migrating the workload to the available resource 2019 IBM Systems Technical University Dynamically Provisioning Resources - Channels • All (non-PCI) IO devices are attached via a defined channel • In a native LPAR implementation you may need to change the channel (CHPID) state from Linux • Be aware that lscss does not display the CHPID state • Use chchp and lschp 2019 IBM Systems Technical University Ignored Devices • This example is from a 1st level Linux in a LPAR • Ignore <> offline • A cio_ignore list was used on boot to restrict the available devices • This list can be dynamically modified to make new devices available • While a disk example is shown, cio_ignore applies to all IO devices • There is a cio_ignore command and you do not have to use cat and echo 2019 IBM Systems Technical University Ignore Devices • There is a cio_ignore command and you do not have to use cat and echo • Most important for a first level Linux • -l lists • -u builds blacklist based on offline devices • -p purges from linux access until removed from blacklist • -r removes from blacklist • Don’t leave other systems devices exposed 2019 IBM Systems Technical University Ignoring devices • The cio_ignore list is shown on the kernel parameters line of the zipl.conf • Be sure to update it with newly (de)provisioned devices as you change the configuration of your system • Ignore list very important for first level Linux systems • Much less important for virtual servers running under a hypervisor 2019 IBM Systems Technical University Agenda 1 The Value of Dynamically Provisioning and Deprovisioning Resources 2 Channels and ignored devices 3 Dynamically Adjusting Disk Storage Resources 4 Dynamically Adjusting Networking Resources 5 Dynamically Adjusting Memory Resources 6 Dynamically Adjusting CPU Resources 7 Live migrating the workload to the available resource 2019 IBM Systems Technical University Dynamically Adding Disk Resources in a KVM environment — Disk Storage Resource Types • ECKD o Full Volume o Partition o Images files • SCSI Luns o Full LUN device via FCP o Partial LUN device via FCP o Images files • Virtual CD/DVD • Network attached storage — All types can be dynamically added — General Process • Add resource from hypervisor • Make new resource available to guest domain • Bring virtual device online in virtual server • Provision as usual 2019 IBM Systems Technical University Virtual CDROM in Virtual Machine Manager (aka Virt Manager) 2019 IBM Systems Technical University 14 © Copyright IBM Corporation 2019 Dynamic addition thru Virt Manager Attaching an ISO image to a guest with an existing virtual CDROM device works Trying to dynamically add a CDROM device via Virtual Machine Manager fails However there is another way 2019 IBM Systems Technical University 15 © Copyright IBM Corporation 2019 Before mounting ISO on guest device 2019 IBM Systems Technical University 16 © Copyright IBM Corporation 2019 Dynamically attach ISO to existing CDROM device – Virt Manager If the device already exists in the guest domain it is a simple matter of browsing for the desired ISO and clicking apply Whether the cdrom/iso is automatically mounted on a filesystem location is a function of guest 2019 IBM Systems Technical University 17 © Copyright IBM Corporation 2019 After adding ISO image and mounted on filesystem on guest Before adding ISO image After adding ISO image 2019 IBM Systems Technical University 18 © Copyright IBM Corporation 2019 Sample domain XML for virtual cdrom and iso image • Example of resulting XML generated by Virtual Machine Manager <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/RHEL-ALT-7.5-20180308.0-Server-s390x-dvd1.iso'/> <target dev='sda' bus='scsi'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 2019 IBM Systems Technical University 19 © Copyright IBM Corporation 2019 Adding device and attaching ISO directly via virsh • Does not dynamically attach as an IDE, only SCSI • Defines device and attach the ISO [root@lbskvm2 /]# virsh attach-disk guest1 /var/lib/libvirt/images/RHEL-ALT-7.5-20180308.0- Server-s390x-dvd1.iso sda --type cdrom Disk attached successfully [root@lbskvm2 /]# ssh ryoung1@guest1 ryoung1@guest1's password: Last login: Mon Apr 15 12:06:48 2019 from gateway [ryoung1@guest1 ~]$ sudo su [sudo] password for ryoung1: [root@guest1 ryoung1]# blkid /dev/vda1: UUID="8e5020b1-1be0-4f04-a1cf-ff8a6f284ff8" TYPE="xfs" /dev/vda2: UUID="7446f77f-2bb8-48b2-b4a7-520d44ebce66" TYPE="swap" /dev/vda3: UUID="5169d08e-bbab-4875-9df3-ee236acc0a82" TYPE="xfs" /dev/vdb1: UUID="BoFb06-qEM6-PjAT-9RkQ-slY2-77Pk-3o8Rbw" TYPE="LVM2_member" /dev/sr0: UUID="2018-03-08-07-42-03-00" LABEL="RHEL-ALT-7.5 Server.s390x" TYPE="iso9660" [root@guest1 ryoung1]# 2019 IBM Systems Technical University 20 © Copyright IBM Corporation 2019 Fiber attached Virtual Disk Storage Resources <disk type='block' device='disk'> d0 d1 d2 d3 <driver name='qemu' type='raw' cache='none‘ iothread=‘1’/> <source dev='/dev/disk/by-id/dm-uuid-mpath- vda vda vda vda 36005076309ffc56b0000000000000305'/> Guests <target dev='vda' bus='virtio'/> <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> </disk> .img .img <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none‘ iothread=‘1’/> <source dev='/dev/disk/by-id/ccw-0X9FC0'/> lvm lvm <target dev='vda' bus='virtio'/> dm-0 <address type='ccw' cssid='0xfe' ssid='0x0' dm-1 mpatha devno='0x0002'/> mpathb </disk> dasda dasdb <disk type='file' device='disk'> multipathd multipathd <driver name='qemu' type='qcow2‘ cache=‘none’ iothread=‘1’ /> <source file='/var/lib/libvirt/images/vs1_qcow2.img'/> <target dev='vda' bus='virtio'/> FCP FCP Ficon Ficon Ficon Ficon FCP FCP <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='qcow2‘ cache=‘none’ iothread=‘1’/> <source file='/var/lib/libvirt/images/vs1_qcow2.img'/> ECKD <target dev='vda' bus='virtio'/> ECKD SCSI <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/> LUN ECKD LUN </disk> ECKD Hypervisor Hypervisor Layer 2018 IBM Systems Lab Services / © 2018

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    107 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us