Closed singhragvendra503 closed 12 months ago
Thank you for reaching out, and I appreciate your feedback!
Based on the error log, it seems like you might be running the project on a Red Hat operating system. To ensure the project runs smoothly, it's essential to enable virtualization, specifically KVM (KVM kernel module).
Here are some references for further reading:
P.S. I've successfully battle-tested this project on Ubuntu servers. If you have any specific questions or encounter further issues, feel free to ask for assistance. Good luck with your project!
i am running this container in ubuntu 20.04 lts GCP vm. I am using your docker image ghcr.io/vaggeliskls/windows-in-docker-container:latest
i got same error
Question:
Is KVM package install in my host machine
@vaggeliskls Thanks for responding
As of my last knowledge, cloud providers generally did not widely support nested virtualization on virtual machines (VMs). Nested virtualization refers to the ability to run virtual machines within virtual machines. This feature is more commonly associated with running virtualization hypervisors, such as VMware ESXi or Microsoft Hyper-V, libvirt (current project), etc, within a virtual machine.
If you are specifically interested in nested virtualization on VMs in a cloud environment, I recommend checking the documentation and the latest updates from the specific cloud provider you are using (GCP). The level of support may vary based on the hypervisor technology used by the cloud provider and the type of virtual machine instances they offer.
PS. I can also verify that shared virtualization is also not supported on AWS ec2 instances. That is the reason that face issue when you tried to deploy this project
i am build a docker image from your repo after that i am run that on ubuntu 22.04 lts
ragvendra@Macmini:~/Demo_project/windows-in-docker-container$
docker run --env-file .env --privileged --cap-add NET_ADMIN --cap-add SYS_ADMIN --volume /sys/fs/cgroup:/sys/fs/cgroup --device /dev/kvm --device /dev/net/tun --publish 3389:3389 --name win10 --interactive --tty window10:latest
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require': cannot load such file -- winrm (LoadError) from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in
require'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/winrm/shell.rb:9:in block in <top (required)>' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/util/silence_warnings.rb:8:in
silence!'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/winrm/shell.rb:8:in <top (required)>' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/winrm/communicator.rb:6:in
require_relative'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/winrm/communicator.rb:6:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in
require'
from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/winrm/plugin.rb:15:in
block in get' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/machine.rb:267:in
communicate'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/machine.rb:149:in initialize' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/vagrantfile.rb:81:in
new'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/vagrantfile.rb:81:in machine' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/environment.rb:716:in
machine'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/plugin/v2/command.rb:180:in block in with_target_vms' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/plugin/v2/command.rb:204:in
block in with_target_vms'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/plugin/v2/command.rb:186:in each' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/plugin/v2/command.rb:186:in
with_target_vms'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/commands/up/command.rb:87:in execute' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/cli.rb:67:in
execute'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/environment.rb:290:in cli' from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/bin/vagrant:226:in
<top (required)>'
from /usr/bin/vagrant:25:in load' from /usr/bin/vagrant:25:in
Try providing more details about your running system (OS). You mention that you try to run from Ubuntu22, but I see that your hostname called MacMini.
ubuntu 22.04 lts
version a VM ? Thank you for your valuable feedback.
Upon investigating the issue you reported, I was able to replicate the problem and understand that it emerged after the Dockerfile upgrade was carried out to be compatible with Ubuntu 22.04 (Jammy).
The current issue seemed to stem from a version that is packaged in the official Ubuntu repository, interfering with the generation of the VM.
To resolve the issue, I have manually installed the most recent version of Vagrant. This should have effectively fixed the problem.
Please give it a try and inform me if you continue to face any difficulties.
Thanks again for making me aware of the issue.
Release: https://github.com/vaggeliskls/windows-in-docker-container/releases/tag/0.3.0 PR: https://github.com/vaggeliskls/windows-in-docker-container/pull/5
Successfully built 126d21846d82 Successfully tagged windows-in-docker-container_win10:latest Creating windows-in-docker-container_win10_1 ... done Attaching to windows-in-docker-container_win10_1 win10_1 | chown: cannot access '/dev/kvm': No such file or directory windows-in-docker-container_win10_1 exited with code 1
When i am comment out this line "chown root:kvm /dev/kvm" in startup.sh file
I got errorSuccessfully built 399b4fa3089d Successfully tagged windows-in-docker-container_win10:latest Recreating windows-in-docker-container_win10_1 ... done Attaching to windows-in-docker-container_win10_1 win10_1 | Bringing machine 'default' up with 'libvirt' provider... win10_1 | ==> default: Checking if box 'peru/windows-server-2022-standard-x64-eval' version '20231001.01' is up to date... win10_1 | ==> default: Created volume larger than box defaults, will require manual resizing of win10_1 | ==> default: filesystems to utilize. win10_1 | ==> default: Uploading base box image as volume into Libvirt storage... ==> default: Creating image (snapshot of base box volume). win10_1 | ==> default: Creating domain with the following settings... win10_1 | ==> default: -- Name: _default win10_1 | ==> default: -- Description: Source: /Vagrantfile win10_1 | ==> default: -- Domain type: kvm win10_1 | ==> default: -- Cpus: 4 win10_1 | ==> default: -- Feature: acpi win10_1 | ==> default: -- Feature: apic win10_1 | ==> default: -- Feature: pae win10_1 | ==> default: -- Feature (HyperV): name=relaxed, state=on win10_1 | ==> default: -- Feature (HyperV): name=synic, state=on win10_1 | ==> default: -- Feature (HyperV): name=vapic, state=on win10_1 | ==> default: -- Feature (HyperV): name=vpindex, state=on win10_1 | ==> default: -- Clock offset: utc win10_1 | ==> default: -- Memory: 6000M win10_1 | ==> default: -- Base box: peru/windows-server-2022-standard-x64-eval win10_1 | ==> default: -- Storage pool: default win10_1 | ==> default: -- Image(vda): /var/lib/libvirt/images/_default.img, virtio, 100G win10_1 | ==> default: -- Disk driver opts: cache='default' win10_1 | ==> default: -- Graphics Type: spice win10_1 | ==> default: -- Graphics Websocket: win10_1 | ==> default: -- Graphics Port:
win10_1 | ==> default: -- Graphics IP:
win10_1 | ==> default: -- Graphics Password: Not defined win10_1 | ==> default: -- Video Type: qxl win10_1 | ==> default: -- Video VRAM: 16384 win10_1 | ==> default: -- Video 3D accel: false win10_1 | ==> default: -- Sound Type: ich6 win10_1 | ==> default: -- Keymap: en-us win10_1 | ==> default: -- TPM Backend: passthrough win10_1 | ==> default: -- INPUT: type=mouse, bus=ps2 win10_1 | ==> default: -- CHANNEL: type=spicevmc, mode= win10_1 | ==> default: -- CHANNEL: target_type=virtio, target_name=com.redhat.spice.0 win10_1 | ==> default: -- CHANNEL: type=unix, mode= win10_1 | ==> default: -- CHANNEL: target_type=virtio, target_name=org.qemu.guest_agent.0 win10_1 | ==> default: -- RNG device model: random