Containerdisk compatibility in containerd

766 views
Skip to first unread message

khaled elgohary

unread,
Sep 13, 2022, 10:58:26 AM9/13/22
to kubevirt-dev
Hello, 

I am trying to run an ubuntu VM via kubevirt as per this link : https://quay.io/repository/containerdisks/ubuntu

I have an offline environment in which I have to upload the container images manually. So pulled the "quay.io/containerdisks/ubuntu:22.04" image by an online machine has docker engine, but when I tried to to import this image (which I saved it as tar and tried to upload in the offline machine ). I am getting "ctr: image might be filtered out" message and the image has not been uploaded !

When I searched this error there was not much details about it but as per this thread [1] , it may be caused due to different architecture(arm instead of amd).

The command I used to import the image :

> ctr images import quay.ubuntu.22.04.tar
ctr: image might be filtered out

khaled elgohary

unread,
Sep 14, 2022, 6:35:56 AM9/14/22
to kubevirt-dev
Update 1 :

I downgraded the containerd I am using from v1.6.8 to v1.6.6 and I faced the same problem but when I downgraded to v1.5.3 the image imported but still I am getting below message.

 > ctr images import /vms/quay.ubuntu.22.04.tar
unpacking quay.io/containerdisks/ubuntu:22.04 (sha256:be5e9b2b413ee416c125b39d3b28f719d1c484c0384475ab890122150be67061)...ctr: content digest sha256:f00d98d62674e83365d5b09b4007a7e346f9dc993f7e67976f63cec65ca22325: not found

Or Shoval

unread,
Sep 14, 2022, 7:27:11 AM9/14/22
to khaled elgohary, kubevirt-dev
On Wed, Sep 14, 2022 at 1:36 PM khaled elgohary <k.elg...@gmail.com> wrote:
Update 1 :

I downgraded the containerd I am using from v1.6.8 to v1.6.6 and I faced the same problem but when I downgraded to v1.5.3 the image imported but still I am getting below message.

 > ctr images import /vms/quay.ubuntu.22.04.tar
unpacking quay.io/containerdisks/ubuntu:22.04 (sha256:be5e9b2b413ee416c125b39d3b28f719d1c484c0384475ab890122150be67061)...ctr: content digest sha256:f00d98d62674e83365d5b09b4007a7e346f9dc993f7e67976f63cec65ca22325: not found


Hi Khaled,

In the past I had a similar issue.
Found out that if I pull the image with ctr, save it as a tar with ctr (IIRC), then I can import it as well with ctr.
Pulling it with docker or so, ended with an error.

 
On Tuesday, September 13, 2022 at 4:58:26 PM UTC+2 khaled elgohary wrote:
Hello, 

I am trying to run an ubuntu VM via kubevirt as per this link : https://quay.io/repository/containerdisks/ubuntu

I have an offline environment in which I have to upload the container images manually. So pulled the "quay.io/containerdisks/ubuntu:22.04" image by an online machine has docker engine, but when I tried to to import this image (which I saved it as tar and tried to upload in the offline machine ). I am getting "ctr: image might be filtered out" message and the image has not been uploaded !

When I searched this error there was not much details about it but as per this thread [1] , it may be caused due to different architecture(arm instead of amd).

The command I used to import the image :

> ctr images import quay.ubuntu.22.04.tar
ctr: image might be filtered out

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/649d52f9-2193-424d-93c7-059c7ed025e7n%40googlegroups.com.

Roman Mohr

unread,
Sep 14, 2022, 7:30:30 AM9/14/22
to Or Shoval, khaled elgohary, kubevirt-dev, dho...@redhat.com, fmato...@redhat.com
On Wed, Sep 14, 2022 at 1:27 PM Or Shoval <osh...@redhat.com> wrote:


On Wed, Sep 14, 2022 at 1:36 PM khaled elgohary <k.elg...@gmail.com> wrote:
Update 1 :

I downgraded the containerd I am using from v1.6.8 to v1.6.6 and I faced the same problem but when I downgraded to v1.5.3 the image imported but still I am getting below message.

 > ctr images import /vms/quay.ubuntu.22.04.tar
unpacking quay.io/containerdisks/ubuntu:22.04 (sha256:be5e9b2b413ee416c125b39d3b28f719d1c484c0384475ab890122150be67061)...ctr: content digest sha256:f00d98d62674e83365d5b09b4007a7e346f9dc993f7e67976f63cec65ca22325: not found


Hi Khaled,

In the past I had a similar issue.
Found out that if I pull the image with ctr, save it as a tar with ctr (IIRC), then I can import it as well with ctr.
Pulling it with docker or so, ended with an error.


Seems like a bug in https://github.com/kubevirt/containerdisks. We may build the images in a way which is not right. May make sense to file a bug.

Adding some people who are interested in that repo.

Best regards,
Roman
 

 
On Tuesday, September 13, 2022 at 4:58:26 PM UTC+2 khaled elgohary wrote:
Hello, 

I am trying to run an ubuntu VM via kubevirt as per this link : https://quay.io/repository/containerdisks/ubuntu

I have an offline environment in which I have to upload the container images manually. So pulled the "quay.io/containerdisks/ubuntu:22.04" image by an online machine has docker engine, but when I tried to to import this image (which I saved it as tar and tried to upload in the offline machine ). I am getting "ctr: image might be filtered out" message and the image has not been uploaded !

When I searched this error there was not much details about it but as per this thread [1] , it may be caused due to different architecture(arm instead of amd).

The command I used to import the image :

> ctr images import quay.ubuntu.22.04.tar
ctr: image might be filtered out

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/649d52f9-2193-424d-93c7-059c7ed025e7n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.

Felix Matouschek

unread,
Sep 14, 2022, 8:40:45 AM9/14/22
to Roman Mohr, khaled elgohary, kubevirt-dev
Hi,

Am Mittwoch, dem 14.09.2022 um 13:30 +0200 schrieb Roman Mohr:
> Seems like a bug in https://github.com/kubevirt/containerdisks. We
> may build the images in a way which is not right. May make sense to
> file a bug.

this is indeed a bug in the way containerdisks are built. The image
configuration file is missing a value for the 'architecture' key, which
results in containerd filtering out the image [1].

I posted a PR [2] to fix the issue. When the PR is merged the images
will be fixed after the next periodically rebuild.

@Roman Could you have a look at the PR please?

Thank you,
Felix

[1]
https://github.com/containerd/containerd/blob/77d53d2d230c3bcd3f02e6f493019a72905c875b/images/handlers.go#L261
[2] https://github.com/kubevirt/containerdisks/pull/43

khaled elgohary

unread,
Sep 14, 2022, 8:57:48 AM9/14/22
to kubevirt-dev
Thanks  Or Shoval, Felix  Roman .. When I did the pulling and importing with "ctr" it works !

Maybe the bug you are referring to is appearing in some corner case like the one I highlighted .. anyway after it works and I run the yaml file to run the VM I am not able to access the VM as it asks for the credentials and by default the ubuntu os credentials are : username as 'ubuntu' and the password is empty (no password), is there any configuration done on that regards .. if not how to access the VM ?

Also I can see below warning during the installation.

[  149.049386] cloud-init[552]: 2022-09-14 12:36:35,251 - util.py[WARNING]: Failed to create user admin
[  149.112224] cloud-init[552]: 2022-09-14 12:36:35,323 - util.py[WARNING]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py'>) failed
[  OK  ] Finished Load AppArmor pro…s managed internally by snapd.

Brady Pratt

unread,
Sep 14, 2022, 9:03:36 AM9/14/22
to khaled elgohary, kubevirt-dev
Hey Khaled,

depending on the OS you may have many different options (cloud-init, ignition, etc. or tools to modify the image directly like virt-customize). Here[1] is the doc on using cloud-init which should just work with the ubuntu container disks (should, I have never tested these images).


--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.

khaled elgohary

unread,
Sep 14, 2022, 10:31:32 AM9/14/22
to kubevirt-dev
Thanks bpratt, after customizing the cloudinit part .. I am able to access the VM.

Thanks all for your help and support. I am able to create the VM and access it :) :) 

Reply all
Reply to author
Forward
0 new messages