The libvirt qemu hypervisor driver has long supported protecting disk devices from concurrent use via libvirt's lock manager interface. Xen used to support the same functionality in the old xend toolstack, but dropped support in the new libxl toolstack. The Xen community decided, rightly so, that this functionality is best provided by a higher-level management tool, e.g. libvirt.

This project aims to provide integration between libvirt's lock manager and the libxl hypervisor driver, essentially reintroducing support for disk device protection in the Xen management stack.

Looking for hackers with the skills:

virtualization c

This project is part of:

Hack Week 12

Activity

  • over 10 years ago: mlatimer liked this project.
  • over 10 years ago: jfehlig added keyword "c" to this project.
  • over 10 years ago: jfehlig added keyword "virtualization" to this project.
  • over 10 years ago: jfehlig started this project.
  • over 10 years ago: jfehlig originated this project.

  • Comments

    • jfehlig
      over 10 years ago by jfehlig | Reply

      I've made quite a bit of progress on this project thus far. First I had to introduce a conf file (/etc/libvirt/libxl.conf) to control behavior of the libxl driver. I needed to add a knob to go with the new conf file and decided on something simple: a bool to control autoballooning of domain0.

      On top of this patch I have a rather large patch that provides integration with libvirt's LockManager. sanlock or virtlockd can be used as the lock manager. Using virtlockd, I've been able to successfully prevent starting a domain on a host when the image used by the domain is in use by another domain on the same (or another) host.

      There is still lots of cleanup to do and corner cases to handle before I can send a V1 of the patch series to libvirt devel mail list. E.g. acquiring and dropping locks needs to be handled in migration, save, restore, pause, etc.

    • jfehlig
      over 10 years ago by jfehlig | Reply

      It has been a successful week for this project! I'm able to prevent starting a domain that contains a disk being used by another domain:

      host1 # virsh create sles12pv.xml

      Domain sles12gm-pv created from sles12pv.xml

      host2 # virsh create sles12pv.xml

      error: Failed to create domain from sles12pv.xml

      And prevent attaching a disk that is being used by another domain:

      error: resource busy: Lockspace resource '/mnt1/sles12gm-pv/disk0.raw' is locked

      host1 # virsh attach-device sles12pv disk.xml --live

      Device attached successfully

      host2 # virsh attach-device sles12hvm disk.xml --live

      error: Failed to attach device from disk.xml

      error: resource busy: Lockspace resource '/mnt1/images/blank-raw.disk' is locked

      I had time to cleanup the patch series and make it presentable as a V1 upstream

      https://www.redhat.com/archives/libvir-list/2015-April/msg00845.html

    Similar Projects

    SUSE KVM Best Practices by roseswe

    Description

    SUSE Best Practices around KVM, especially for SAP workloads. Early Google presentation already made from various customer projects and SUSE sources.

    Goals

    Complete presentation we can reuse in SUSE Consulting projects

    Resources

    KVM (virt-manager) images

    SUSE/SAP/KVM Best Practices

    • https://documentation.suse.com/en-us/sles/15-SP6/single-html/SLES-virtualization/
    • SAP Note 1522993 - "Linux: SAP on SUSE KVM - Kernel-based Virtual Machine" && 2284516 - SAP HANA virtualized on SUSE Linux Enterprise hypervisors https://me.sap.com/notes/2284516
    • SUSECon24: [TUTORIAL-1253] Virtualizing SAP workloads with SUSE KVM || https://youtu.be/PTkpRVpX2PM
    • SUSE Best Practices for SAP HANA on KVM - https://documentation.suse.com/sbp/sap-15/html/SBP-SLES4SAP-HANAonKVM-SLES15SP4/index.html


    Q2Boot - A handy QEMU VM launcher by amanzini

    Description

    Q2Boot (Qemu Quick Boot) is a command-line tool that wraps QEMU to provide a streamlined experience for launching virtual machines. It automatically configures common settings like KVM acceleration, virtio drivers, and networking while allowing customization through both configuration files and command-line options.

    The project originally was a personal utility in D, now recently rewritten in idiomatic Go. It lives at repository https://github.com/ilmanzo/q2boot

    Goals

    Improve the project, testing with different scenarios , address issues and propose new features. It will benefit of some basic integration testing by providing small sample disk images.

    Resources


    Extracting, converting and importing VMs from Nutanix into SUSE Virtualization by emendonca

    Description

    The idea is to delve into understanding Nutanix AHV internals on how it stores and runs VMs, and how to extract them in an automated way for importing into a KVM-compatible hypervisor, like SUSE Virtualization/Harvester. The final product will be not only be documentation, but a working prototype that can be used to automate the process.

    Goals

    1) document how to create a simple lab with NutaniX AHV community edition 2) determine the basic elements we need to interact with 3) determine what are the best paths to grab the images through, balancing speed and complexity 4) document possible issues and create a roadmap for tackling them 4) should we adapt an existing solution or implement a new one? 5) implement the solution!

    Resources

    Similar project I created: https://github.com/doccaz/vm-import-ui Nutanix AHV forums Nutanix technical bulletins


    pudc - A PID 1 process that barks to the internet by mssola

    Description

    As a fun exercise in order to dig deeper into the Linux kernel, its interfaces, the RISC-V architecture, and all the dragons in between; I'm building a blog site cooked like this:

    • The backend is written in a mixture of C and RISC-V assembly.
    • The backend is actually PID1 (for real, not within a container).
    • We poll and parse incoming HTTP requests ourselves.
    • The frontend is a mere HTML page with htmx.

    The project is meant to be Linux-specific, so I'm going to use io_uring, pidfs, namespaces, and Linux-specific features in order to drive all of this.

    I'm open for suggestions and so on, but this is meant to be a solo project, as this is more of a learning exercise for me than anything else.

    Goals

    • Have a better understanding of different Linux features from user space down to the kernel internals.
    • Most importantly: have fun.

    Resources