aerokube / windows-images

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

Could not start the VM via Xvfb using a snapshot #16

Open wskorodecki opened 4 years ago

wskorodecki commented 4 years ago

Host: ArchLinux Kernel: 5.3.1 QEMU: 4.1.0 Docker: 19.03.2-ce, build 6a30dfca03 Windows: 10 x64

There is some problem when running the snapshot via xvfb-run:

$ docker run -it --rm --privileged -p 4444:4444 -p 5900:5900 windows/edge:18
Waiting xvfb...

 --- x11vnc loop: 1 ---

 --- x11vnc loop: waiting for: 30

PORT=5900
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: Machine type received is 'pc-q35-4.1' and local is 'pc-q35-2.11'
qemu-system-x86_64: Error -22 while loading VM state

But the problem does not occur when I run the qemu command available in entrypoint.sh directly without using xvfb.

vania-pooh commented 4 years ago

@wskorodecki you should run VM snapshot on host with the same qemu version as one used to build the image.

wskorodecki commented 4 years ago

@vania-pooh This is the same qemu version. I have installed it only once. The problem is only when I'm trying to run the VM snapshot via docker -> entrypoint.sh > xvfb-run.

vania-pooh commented 4 years ago

Summon @aandryashin .

wskorodecki commented 4 years ago

@vania-pooh Ok, I have figured it out. The problem was not QEMU installed on host but the one installed in guest (Ubuntu). I've supposed that the Dockerfile will install the latest one (4.1) but instead it is installing very old version 2.11. QEMU 4.1 installed from sources has resolved the problem.

vania-pooh commented 4 years ago

@wskorodecki great! Feel free to close the issue if resolved.

andreistepin commented 1 year ago

Hey, not sure if the issue is related, but I am having issues with building a docker image and the error occurs on the xvfb step. It worked the first time I cloned it from github, but after making changes and pushing it, and then pulling again, started getting this error. Here's the error: => CACHED [ 4/14] COPY docker-helper/xvfb /etc/init.d/xvfb
=> CACHED [ 5/14] RUN chmod +x /etc/init.d/xvfb
=> ERROR [ 6/14] RUN service xvfb start

[ 6/14] RUN service xvfb start: 0 0.246 /etc/init.d/xvfb: 4: /etc/init.d/xvfb: Syntax error: word unexpected (expecting "in")