kubevirt: Unable to launch a windows VM

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What happened: I have downloaded windows 2012 based image (.qcow2 format) from https://cloudbase.it/ and then ran below commands on master node to add it to openshift default registry.

oc login -u kubeadmin -p xx-xxxx-xxx

podman login -u kubeadmin -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000

podman build -t vmidisks/win2k12r2:latest -f ./Dockerfile . (My Dockerfile has below 2 lines) FROM scratch ADD win2k12r2.qcow2 /tmp/

podman tag localhost/vmidisks/win2k12r2 image-registry.openshift-image-registry.svc:5000/openshift/image

podman push image-registry.openshift-image-registry.svc:5000/openshift/image

oc create -f vmi_windows.yaml

details of this file is given in VMI specification

What you expected to happen: windows VM should be provisioned

How to reproduce it (as minimally and precisely as possible): This is covered in what happened section

Anything else we need to know?: it fails with below message [root@master-0 tmp]# oc get pod NAME READY STATUS RESTARTS AGE virt-launcher-vmi-windows-mnk4t 1/2 ImagePullBackOff 0 77s

Normal Pulling <invalid> (x3 over 34s) kubelet, paeprod-worker-1 Pulling image “image-registry.openshift-image-registry.svc:5000/openshift/image” Warning Failed <invalid> (x3 over 28s) kubelet, paeprod-worker-1 Failed to pull image “image-registry.openshift-image-registry.svc:5000/openshift/image”: rpc error: code = Unknown desc = pinging docker registry returned: Get https://image-registry.openshift-image-registry.svc:5000/v2/: dial tcp 172.xx.xx.xxx:5000: connect: no route to host Warning Failed <invalid> (x3 over 28s) kubelet, paeprod-worker-1 Error: ErrImagePull Normal BackOff <invalid> (x5 over 27s) kubelet, paeprod-worker-1 Back-off pulling image “image-registry.openshift-image-registry.svc:5000/openshift/image” Warning Failed <invalid> (x5 over 27s) kubelet, paeprod-worker-1 Error: ImagePullBackOff

Environment:

  • KubeVirt version (use virtctl version): Client Version: version.Info{GitVersion:“v0.25.0”, GitCommit:“b755c56f396ed880940821688eaddbd869e33897”, GitTreeState:“clean”, BuildDate:“2020-01-03T13:13:53Z”, GoVersion:“go1.12.8”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{GitVersion:“v0.20.2”, GitCommit:“eb1308c9b403d9d19a9b006e805ca57d014cf40a”, GitTreeState:“clean”, BuildDate:“2019-08-20T14:10:36Z”, GoVersion:“go1.11.5”, Compiler:“gc”, Platform:“linux/amd64”}

  • Kubernetes version (use kubectl version):

[root@master-0 tmp]# oc version Client Version: v4.2.13 Server Version: 4.2.14 Kubernetes Version: v1.14.6+b294fe5

  • VM or VMI specifications: apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance metadata: labels: special: vmi-windows name: vmi-windows spec: domain: clock: timer: hpet: present: false hyperv: {} pit: tickPolicy: delay rtc: tickPolicy: catchup utc: {} cpu: cores: 2 devices: disks: - disk: bus: sata name: containerdisk interfaces: - masquerade: {} model: e1000 name: default features: acpi: {} apic: {} hyperv: relaxed: {} spinlocks: spinlocks: 8191 vapic: {} firmware: uuid: 5d307ca9-b3ef-428c-8861-06e72d69f223 machine: type: q35 resources: requests: memory: 12Gi networks:

    • name: default pod: {} terminationGracePeriodSeconds: 0 volumes:
      • name: containerdisk containerDisk: image: image-registry.openshift-image-registry.svc:5000/openshift/image
  • Cloud provider or hardware configuration: Baremetal servers

  • OS (e.g. from /etc/os-release): Master node is running on CoreOS and worker node is running on CentOS 7. output from master node is as follows NAME=“Red Hat Enterprise Linux CoreOS” VERSION=“42.81.20191223.0” VERSION_ID=“4.2” PRETTY_NAME=“Red Hat Enterprise Linux CoreOS 42.81.20191223.0 (Ootpa)” ID=“rhcos” ID_LIKE=“rhel fedora” ANSI_COLOR=“0;31” HOME_URL=“https://www.redhat.com/” BUG_REPORT_URL=“https://bugzilla.redhat.com/” REDHAT_BUGZILLA_PRODUCT=“OpenShift Container Platform” REDHAT_BUGZILLA_PRODUCT_VERSION=“4.2” REDHAT_SUPPORT_PRODUCT=“OpenShift Container Platform” REDHAT_SUPPORT_PRODUCT_VERSION=“4.2” OSTREE_VERSION=42.81.20191223.0

worker node output is as below NAME=“CentOS Linux” VERSION=“7 (Core)” ID=“centos” ID_LIKE=“rhel fedora” VERSION_ID=“7” PRETTY_NAME=“CentOS Linux 7 (Core)” ANSI_COLOR=“0;31” CPE_NAME=“cpe:/o:centos:centos:7” HOME_URL=“https://www.centos.org/” BUG_REPORT_URL=“https://bugs.centos.org/

CENTOS_MANTISBT_PROJECT=“CentOS-7” CENTOS_MANTISBT_PROJECT_VERSION=“7” REDHAT_SUPPORT_PRODUCT=“centos” REDHAT_SUPPORT_PRODUCT_VERSION=“7”

  • Kernel (e.g. uname -a): Linux master-0 4.18.0-147.3.1.el8_1.x86_64 #1 SMP Wed Nov 27 01:11:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  • Install tools: virtctl

  • Others:

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Following is the error that I am seeing here. Is it /disk that I need to add in DockerFile or /disk/ does one missing “/” at the end causing this?

Ha yes. It has to go into the /disk folder. So very likely a missing /.

@abhiniveshjain in general most things look ok. I think the only issue is that you are placing the disks in /tmp:

podman build -t vmidisks/win2k12r2:latest -f ./Dockerfile . (My Dockerfile has below 2 lines) FROM scratch ADD win2k12r2.qcow2 /tmp/

They need to be added to /disk to auto-detect it.

An alternative would be to explicitly give the path to the disk in the spec: path: whatever.