Advanced virtualisation: performance, live migration and high availability
You tune VM performance with virtio, CPU pinning, huge pages and NUMA, migrate live and keep VMs running when a host fails.
Level 501 · 15 lessons · 12 practice labs
Lessons
Performance
- virtio drivers and why they matter
- CPU pinning and NUMA alignment
- Huge pages for VMs
- Disk cache and I/O modes
- Short task: measure and tune a slow database VM
Migration
- Live migration: how it works and what it needs
- Migrating with and without shared storage
- Short task: move a running VM to the other host without downtime
Availability
- High availability and fencing
- VM resources with Pacemaker
- Consistent backups of a running VM
- Short task: make VMs come up on the other host when one fails
Wrap-up
- Virtualisation security: sVirt and unprivileged QEMU
- Capacity planning and overcommit
- Capstone: a small two-host virtualisation cluster that migrates and survives a failure
Practice labs
- Pin virtual CPUs to physical cores: Pin the vCPUs of a latency-sensitive VM to dedicated cores and verify the placement.
- Tune memory with huge pages and NUMA placement: Back a VM with huge pages, bind its memory to one NUMA node and compare measurements before and after.
- Improve the virtual disk I/O path by measuring: Change cache mode, I/O threads and virtio options one at a time and prove the best combination with fio measurements.
- Move a running VM to the other host: Live-migrate a VM on shared storage and submit how many packets a continuous ping lost during the move.
- Fix a migration failing on a CPU model mismatch: Find why a migration between hosts with different CPUs is refused and fix it with a common CPU model.
- Migrate with the disk when there is no shared storage: Live-migrate a VM with a local disk including storage, and get a migration that will not converge under heavy writes to finish through tuning.
- Put a host into maintenance and evacuate its VMs: Move all VMs from one host to the other, reboot the host and return to a balanced distribution.
- Define a VM as a cluster resource: Define a VM as a highly available resource in the cluster and show it starts on the other host when its host is powered off.
- Remove split-brain risk with fencing: Configure the fencing device that stops the same VM starting in two places when the hosts lose contact, and test the scenario.
- Calculate the hosts' overcommit ratio: Compare allocated vCPUs and memory with physical resources and report the ratios per host.
- Tie guest slowness to host contention: Measure steal time in the guest alongside the host's run queue and find the neighbouring VM causing contention.
- Draw up a placement plan that survives losing a host: For Yakamoz Telekom's two-host environment write and test a placement and resource plan showing all critical VMs fit after losing one host.
About this course
You tune VM performance with virtio, CPU pinning, huge pages and NUMA, migrate live and keep VMs running when a host fails.
What you will learn
- Performance
- Migration
- Availability
- Wrap-up
Prerequisites
You should be experienced in the topics of the same path up to level 401.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at level 501; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.