vaggeliskls / windows-in-docker-container

Deploy and manage a Windows OS (x64) seamlessly using Vagrant VM, libvirt, and docker-compose. This innovative approach integrates smoothly into existing workflows, providing an efficient way of containerizing Windows OS for better resource allocation and convenience.
MIT License
57 stars 9 forks source link

Call to virDomainCreate failed #13

Open anapolima opened 3 months ago

anapolima commented 3 months ago

I'm facing this error

/root/.vagrant.d/gems/3.1.4/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:in `create': Call to virDomainCreate failed: unable to open '/sys/fs/cgroup/machine/qemu-1-default.libvirt-qemu/': No such file or directory (Libvirt::Error)

Have no idea what it could be

vaggeliskls commented 3 months ago

Hey @anapolima,

Thanks for your feedback.

Could you please share some information about your system host? I would appreciate details such as your Operating System, architecture, and Docker version.

You could attempt to run the program without the volume, just in case. Here is the code you can use:

version: "3.9"

services:
  win10:
    image: ghcr.io/vaggeliskls/windows-in-docker-container:latest
    env_file: .env
    stdin_open: true
    tty: true
    privileged: true
    ports:
      - 3389:3389

Please share your results along with any other information that could help us identify the issue.

Thank you!

xaeto commented 3 months ago

Hello, i think i ran into the same issue. I have also tried it without the volume.

My System Configuration is: Linux Ubuntu-2204-jammy-amd64-base 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

The output from the docker-compose logs is the following:

grafik

win10_1 | ==> default: Starting domain. win10_1 | ==> default: Removing domain... win10_1 | ==> default: Deleting the machine folder win10_1 | /root/.vagrant.d/gems/3.1.4/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:in create': Call to virDomainCreate failed: unable to open '/sys/fs/cgroup/machine/qemu-1-default.libvirt-qemu/': No such file or directory (Libvirt::Error) win10_1 | from /root/.vagrant.d/gems/3.1.4/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:invm_action' win10_1 | from /root/.vagrant.d/gems/3.1.4/gems/fog-libvirt-0.12.0/lib/fog/libvirt/models/compute/server.rb:76:in start' win10_1 | from /root/.vagrant.d/gems/3.1.4/gems/vagrant-libvirt-0.12.2/lib/vagrant-libvirt/action/start_domain.rb:608:incall'

webzit commented 3 months ago

Looks like I might face the same issue. Host system is Debian 6.1.90-1. Docker runs as root and no other unusual configuration.

Docker version 26.1.3, build b72abbb Docker Compose version v2.27.0


/root/.vagrant.d/gems/3.1.4/gems/fog-libvirt-0.12.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:in `create': Call to virDomainCreate failed: unable to open '/sys/fs/cgroup/machine/qemu-1-default.libvirt-qemu/': No such file or directory (Libvirt::Error)```
anapolima commented 3 months ago

Hi, @vaggeliskls! I was on Ubuntu-2204-jammy. Can't remember the Docker version, also can't check (I ended booting the machine with Windows). I appreciate your attention. You can still help @xaeto and @webzit