Common errors and suggested fixes

This topic lists common errors that you may encounter during development and suggests fixes to work around them:

  • Error when running cosmk spawn clipos/qemu or sujust qemu:

    [#] A libvirt domain with the name "clipos-qemu_5.0.0-alpha.1--instrumented" already exists within the system libvirt daemon and cannot be removed (either because not requested or still active). (VirtualizedEnvironmentError)
    

    Suggested fix: Run:

    (toolkit) $ cosmk destroy clipos/qemu
    
  • Connection error:

    [#] Command '/usr/bin/virt-manager --connect qemu:///system --show-domain-console clipos-qemu_5.0.0-alpha.1--instrumented' failed. Reason of failure: Timed out (SystemCommandError)
    

    Suggested fix: Restart your command (for example: sujust qemu ends with this error, just run sujust qemu again).

  • Container related failure:

    [#] Command 'runc run --bundle /home/clipos/run/containers/clipos-sdk.configure.clipos-core.iyn_k0rg clipos-sdk.configure.clipos-core.iyn_k0rg' failed. Reason of failure: Returned exit value 1 (SystemCommandError)
    

    Suggested fix: Use the comsk --debug ... in order to debug this error

  • Cgroup error:

    libvirt: Cgroup error : Failed to create v1 controller cpu for group: No such file or directory
    [X] Uncaught unknown exception libvirtError: Failed to create v1 controller cpu for group: No such file or directory
    

    Suggested fix: You may remove the cpu* cgroups from the cgroup_controllers list in your libvirt QEMU driver configuration file (e.g. /etc/libvirt/qemu.conf). For instance I have the following in my own configuration file:

    # Default:
    #cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ]
    # Fixed:
    cgroup_controllers = [ "devices", "memory", "blkio" ]
    
  • Qemu Driver error:

    libvirt: QEMU Driver error : internal error: process exited while connecting to monitor: 2019-07-16T12:41:07.433218Z qemu-system-x86_64: -machine pc-q35-2.11,accel=kvm,usb=off,vmport=off,smm=on,dump-guest-core=off: unsupported machine type 'pc-q35-2.11
    

    Suggested fix: Use qemu -machine help to list supported machines and make sure that pc-q35-2.11 is in the list (i.e. that your verions of QEMU is not too old).

  • libguestfs error:

    *stdin*:3: libguestfs: error: appliance closed the connection unexpectedly.
    This usually means the libguestfs appliance crashed.
    

    or

    *stdin*:3: libguestfs: error: /usr/bin/qemu-system-x86_64 exited with error status 1.
    To see full error messages you may need to enable debugging.
    

    or

    *stdin*:3: libguestfs: error: guestfs_launch failed.
    This usually means the libguestfs appliance failed to start or crashed.
    

    Suggested fix: Do:

    $ export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
    

    and run the command again. For further information, read: http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs. You can also run libguestfs-test-tool and post the complete output
    into a bug report or message to the libguestfs mailing list.

  • Debian SDK error:

    [#] Command 'runc run --bundle /clipos/run/containers/clipos-sdk_debian.bundle.clipos-qemu.zxvlgsi8 clipos-sdk_debian.bundle.clipos-qemu.zxvlgsi8' failed.
    Reason of failure: Returned exit value 1 (SystemCommandError)
    

    Suggested fix: Check that you don’t have another process that uses virtualization (Virtualbox, Vmware, …), and disable or remove it.

Thanks for the summary!