New Question
0

windows image for kubevirt

asked 2020-02-06 08:18:43 +0200

abhiniveshjain gravatar image

I am trying to use cloudbase windows 2012 image on Kubevirt that is running on top of Openshift based Kubernetes cluster. Since Kubevirt supports only .qcow2 and .img format, I had to use gunzip to uncompress the .gz file available on your website. Unfortunately that uncompressed image (in .qcow2 format) doesn't work and fails with below kind of EOF message. Since there is no direct URL to wget this image on my Linux server, I am downloading it on windows desktop and transferring it in binary mode using winzip and then uncompressing it using gunzip.

Warning Failed 63s (x2 over 3m50s) kubelet, worker-0 Failed to pull image "image-registry.openshift-image-registry.svc:5000/default/win2k2012image:latest": rpc error: code = Unknown desc = Error committing the finished image: error adding layer with blob "sha256:d724582939992ef13269b15a70c4f819036dffd4b08a9a89ec9d729aeaef965d": Error processing tar file(exit status 1): unexpected EOF

Please help.

edit retag flag offensive close merge delete

Comments

Is it related to size of unzipped file which is around 12G?

abhiniveshjain gravatar imageabhiniveshjain ( 2020-02-06 10:24:29 +0200 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2020-02-06 13:11:55 +0200

avladu gravatar image

Hello,

You might encounter an issue with the size of the volume where you want to import the image. Make sure you have defined a large enough storage volume. The decompressed image size is around 16GB. Please set at least 20Gi (20 GigaBytes) to be on the safe side.

Kubevirt is still in a young state and currently, there is little documentation on how to achieve this. I found a good tutorial on how to import images to Kubervirt here: https://kubevirt.io/labs/kubernetes/l...

In the tutorial, this image import definition is used: https://raw.githubusercontent.com/kub...

I suppose if you change the storage size to a relevant one (12Gi or more) and the path to your Windows image, it will import the image.

Thank you,
Adrian Vladu

edit flag offensive delete link more

Comments

I have decompressed it locally but size was never 16GB. Am I missing something?

abhiniveshjain gravatar imageabhiniveshjain ( 2020-02-06 16:06:53 +0200 )edit

You can use qemu-img to retrieve the interal image size. The actual file size can be much lower when dealing with dynamic image formats. For example, an empty 1TB image can take less than 1MB.

lpetrut gravatar imagelpetrut ( 2020-02-07 09:48:17 +0200 )edit

qemu-img info output for the qcow2 is:

file format: qcow2
virtual size: 12.2 GiB (13096714240 bytes)
disk size: 11.2 GiB
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16

avladu gravatar imageavladu ( 2020-02-07 12:42:28 +0200 )edit

I created a more comprehensive tutorial on how to create a Kubernetes / KubeVirt with Windows instances at this page: https://github.com/ader1990/windows-openstack-imaging-tools/tree/add_kubevirt_example/Examples/config/kubevirt .

avladu gravatar imageavladu ( 2020-02-18 12:43:50 +0200 )edit

On the error that you got, I found some tips from Google Cloud presented here: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#image_pull_errors .

avladu gravatar imageavladu ( 2020-02-20 10:22:52 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-02-06 08:18:43 +0200

Seen: 1,968 times

Last updated: Feb 06 '20