Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • libvirt libvirt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 164
    • Issues 164
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libvirtlibvirt
  • libvirtlibvirt
  • Issues
  • #518

libvirt has some problems to use qemu on MacOS

Software environment

  • Operating system: Mac OS Ventura 13.4.1
  • Architecture: arm64 (Apple M1 Max)
  • kernel version: 22.5.0
  • libvirt version: 9.6.0
  • Hypervisor and version: qemu 8.0.3

Description of problem

It seams like there is a problem on my mac with libvirt using qemu, when i resize a image, create a new qcow2 image or run a qemu machine. It worked the last days and stopped working today, but I don't know why and how to solve it. Seems like sysconf(_SC_OPEN_MAX) has something to do with it, but I don't know what exactly it does and how it causes this problem or even how I could solve it.

Here is the log:

libvirt:  Fehler : sysconf(_SC_OPEN_MAX) gescheitert: Invalid argument
2023-08-09 14:55:19.381+0000: 6130118656: error : virCommandWait:2754 : Interner Fehler: Untergeordneter Prozess (/opt/homebrew/bin/qemu-img resize /opt/homebrew/var/lib/libvirt/images/test-image 10000000000) unerwartet Ende Status 125

libvirt:  Fehler : sysconf(_SC_OPEN_MAX) gescheitert: Invalid argument
2023-08-09 14:55:37.727+0000: 6131265536: error : qemuProcessQMPLaunch:9420 : Interner Fehler: Failed to start QEMU binary /opt/homebrew/bin/qemu-system-aarch64 for probing: 
2023-08-09 14:55:37.727+0000: 6131265536: warning : virQEMUCapsLogProbeFailure:5669 : Failed to probe capabilities for /opt/homebrew/bin/qemu-system-aarch64: Interner Fehler: Failed to start QEMU binary /opt/homebrew/bin/qemu-system-aarch64 for probing:

Steps to reproduce

  1. brew install qemu libvirt
  2. sudo brew service start libvirt (or to see the logs: sudo /opt/homebrew/opt/libvirt/sbin/libvirtd -f /opt/homebrew/etc/libvirt/libvirtd.conf )
  3. `sudo virsh pool-define-as --name default --type dir --target /opt/homebrew/var/lib/libvirt/images/
  4. sudo virsh vol-create-as --pool default --name test-volume --capacity 10GB --format qcow2 => first Error (btw. sudo virsh vol-create-as --pool default --name test-volume2 --capacity 10 --format raw
  5. sudo /opt/homebrew/bin/qemu-img resize /opt/homebrew/var/lib/libvirt/images/test-image 10000000000=> works without a problem
  6. sudo virsh define --file domain.xml => second Error

Additional information

ulimit -a -t: cpu time (seconds) unlimited -f: file size (blocks) unlimited -d: data seg size (kbytes) unlimited -s: stack size (kbytes) 8176 -c: core file size (blocks) 0 -v: address space (kbytes) unlimited -l: locked-in-memory size (kbytes) unlimited -u: processes 5333 -n: file descriptors 256

sudo ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 256 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 8176 cpu time (seconds, -t) unlimited max user processes (-u) 5333 virtual memory (kbytes, -v) unlimited

ulimit -n 1024 # did not change anything (executed before libvirtd -f ...)

Edited Aug 09, 2023 by Georg Dörgeloh
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking