aerokube / windows-images

Step by step instructions for building Docker images with Windows
Apache License 2.0
221 stars 44 forks source link

OpenShift windows docker image could not access KVM kernel module #17

Closed emilorol closed 5 years ago

emilorol commented 5 years ago

I created an Windows 10 image and I am able to run it locally inside the docker container.

When I test it in minishift I get the following error:

(process:27): GLib-WARNING **: 15:44:18.254: gmem.c:489: custom memory allocation vtable not supported
--
Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or directory

Any ideas?

vania-pooh commented 5 years ago

@emilorol Minishift should be running in Virtualbox which does not forward KVM. However e.g. VMWare forwards KVM and it should work. Not sure whether Minishift supports this.

emilorol commented 5 years ago

I am using KVM instead of Virtualbox

$ minishift start
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'kvm' is supported on this platform ... OK
-- Checking if KVM driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-kvm ... 
   Checking driver binary is executable ... OK
-- Checking if Libvirt is installed ... OK
-- Checking if Libvirt default network is present ... OK
-- Checking if Libvirt default network is active ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'kvm' hypervisor ...
-- Starting Minishift VM ............... OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ... 
   Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ... 
   Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 61% used OK
-- Writing current configuration for static assignment of IP address ... WARN
-- Mounting host folders
-- OpenShift cluster will be configured with ...
   Version: v3.11.0
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ...................
vania-pooh commented 5 years ago

Related to https://github.com/dhiltgen/docker-machine-kvm/issues/36.

emilorol commented 5 years ago

Yep, I did that still no luck. While the changes made the error go away, qemu keeps killing itself. The new error now is:

Waiting xvfb...
--
  | --- x11vnc loop: 1 ---
  | --- x11vnc loop: waiting for: 26
  | PORT=5900
  | (process:28): GLib-WARNING **: 13:49:17.054: gmem.c:489: custom memory allocation vtable not supported
  | /usr/bin/xvfb-run: line 181:    28 Killed                  DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
  | --- x11vnc loop: sleeping 500 ms ---
  | --- x11vnc loop: 2 ---
  | --- x11vnc loop: waiting for: 35
  | --- x11vnc loop: sleeping 500 ms ---
  | --- x11vnc loop: 3 ---

Any other idea?

vania-pooh commented 5 years ago

@emilorol do you have sufficient memory allocated?

emilorol commented 5 years ago

I have the config like this:

  "edge": {
    "default": "18.0",
    "versions": {
      "18.0": {
        "image": "nexus.internal.com:8443/microsoft/windows10:edge-18",
        "port": "4444",
        "path": "/wd/hub",
        "privileged": true,
        "resources": {                              
          "limits": {                               
            "cpu": "1.5",                             
            "memory": "2.5Gi"                         
          },
          "requests": {                             
            "cpu": "200m",                          
            "memory": "1Gi"                         
          }
        }
      }
    }
  },

But looking at the screen when the container runs I have the following:

browser
Image: microsoft/windows10
Ports: 4444/TCP, 5900/TCP
Mount: dshm → /dev/shm read-write
Mount: default-token-xb724 → /var/run/secrets/kubernetes.io/serviceaccount read-only
CPU: 500 millicores to 1 core
Memory: 512 MiB to 1 GiB

Is the memory not been allocated?

vania-pooh commented 5 years ago

@emilorol seems to be. Are we speaking about Moon? If so could you provide more details about Moon version?

emilorol commented 5 years ago

Yes, I am running Moon 1.3.8

vania-pooh commented 5 years ago

@aandryashin any ideas?

aandryashin commented 5 years ago

What is host operating system? When container starting kernel loads kvm modules, they should be the same on host and within container...

emilorol commented 5 years ago

I am running on RHEL 7 and yes they are the same.

aandryashin commented 5 years ago

Try to rebuild windows image from ubuntu:16.04 or from RH... In that case most probably kvm kernel modules will be compatible...

пт, 11 окт. 2019 г., 16:42 Emil Orol notifications@github.com:

I am running on RedHat 7 and yes they are the same.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aerokube/windows-images/issues/17?email_source=notifications&email_token=AAKY23NET2RKVN6PXFKVK3DQOB7E7A5CNFSM4I5E57GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBABD5Q#issuecomment-541069814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23MLMGOMTPXAEPNKINLQOB7E7ANCNFSM4I5E57GA .

emilorol commented 5 years ago

Yes, I tried that I builded the windows images on the same docker image and host from where I run them.

aandryashin commented 5 years ago

Still the same error?

сб, 12 окт. 2019 г., 17:56 Emil Orol notifications@github.com:

Yes, I tried that I builded the windows images on the same docker image and host from where I run them.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aerokube/windows-images/issues/17?email_source=notifications&email_token=AAKY23P63FJB2VEJABDRB3LQOHQSPA5CNFSM4I5E57GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCBFRY#issuecomment-541332167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23OEGIOBJADJUKZXEPDQOHQSPANCNFSM4I5E57GA .

emilorol commented 5 years ago

Going back to selenoid on a VM. Thank you for your support.