# Error when convert container image

**URL:** <https://hub.mender.io/t/error-when-convert-container-image/2622>\
**Category:** General Discussions\
**Created:** [October 6, 2020, 10:45am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622 "2020-10-06T10:45:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 6, 2020, 10:45am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/1 "2020-10-06T10:45:13Z")

</div>

Hi, Mender team

I’m currently have a Mini PC at home, and I want to deploy use Mender to deploy some service (such as web server) on it, but I have some difficulties on converting Debian container image.

It would be great if I can have your’s support.

**1. Mini PC**  
I have a fresh Centos 7 netinstall with docker installed, I have connected this OS with my mender account.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/c6bb33ac7515bb64b041e519a66d9a1ebfb006bb.png)

**2. Virtualbox**  
I am using Virtualbox to install a Debian 9 with nginx for testing web service.  
This OS contain 2 disk:

- 1 for OS
- 1 for create _file_.img and converting

 ![](https://lh4.googleusercontent.com/VrmJ_6mV7aTWUCIATeutlupjUCajwQR7ekIXmEL35byLhbXCVhW_k6NVO-kbVl9Jrm3wdWUga8Xj8DLxfhp4jpxthf1OC18wYeSFe2bjUksRXu2wosb9eeem-PyynuaKfdmL1v5x)

I have create a golden image with this command  
_$ dd if=/dev/sda of=/home/tel4vn/golden-image-1.img bs=1M conv=fdatasync_

But when I run command to convert image there is some error and it stop converting

 ![](https://lh3.googleusercontent.com/7PHmridIqPsAvpGziah6tf6fApxMmCsf7jvR_H33ZSenQpCzCRBF6ujF7BmT2nx7Jx7MXvyufil8ApNs5VwKuqUsy7fUSACpGEimGp08m-bB0ifXtHOaHnbzhbtwlyocJgHQkXAX)

When I install mender-convert I’m using branch 2.2.x because there is no branch 2.2.0 arcording to this document.

> **[Convert a Mender Debian image | Mender documentation](https://docs.mender.io/system-updates-debian-family/convert-a-mender-debian-image)**

Please help me with this, I’ll be much appreciated.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 6, 2020, 11:58am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/2 "2020-10-06T11:58:08Z")

</div>

@M.Tuan welcome to the mender hub. How was original image generated? What os type do you use for rootfs. Currently olyn btrfs + ext4 are supported (AFAIK Centos by default use lvm). Thanks.

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 6, 2020, 3:44pm UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/3 "2020-10-06T15:44:53Z")

</div>

I build a Debian 9 netinstall on Virtualbox and then create a golden image from there, with this command  
_$ dd if=/dev/sda of=/home/tel4vn/golden-image-1.img bs=1M conv=fdatasync_  
Does it answer your question?

About the CentOS on Mini PC problem, I’ll reinstall it into Debian 9, and use it to connect to Mender3, is it right?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 6, 2020, 5:22pm UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/4 "2020-10-06T17:22:25Z")

</div>

I seem to recall having to explicitly disable the swap partition when I was working with CentOS earlier. You may want to give that a try and ensure there is just the one partition on the disk.

Drew

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 7, 2020, 3:02am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/5 "2020-10-07T03:02:39Z")

</div>

But I’m converting image on Debian 9 on Virtualbox on my laptop. On my Mini PC I’m just installing docker on it, and connect it to Mender

I also try to disable swap space on Debian 9

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/719c54e114ef560f4b95e5e11c87749dc927b667.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/651a2450495fd75c3bcdbc19f16de707956517ca.png)

But then this error appear when converting

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/6ff24ae0de4fd6d5bc9ae888dd9533196c83838f.png)

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 7, 2020, 4:10am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/6 "2020-10-07T04:10:25Z")

</div>

And this is error when converting with a new Debian 9 but without creating swap space

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/f0375fec60de72d2072926d9ad2576182fe718cb.png)

Please tell me what I’ve done wrong

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 7, 2020, 6:01am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/7 "2020-10-07T06:01:53Z")

</div>

Seems you cannot fetch package from internet. Does host machine have internet connection? Seems wget failed.

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 7, 2020, 7:37am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/8 "2020-10-07T07:37:17Z")

</div>

Thanks, I have pass that step, but now there is a different problem. I can’t install mender-client.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/841899cab357fd1344b2e8e513f258112ff4b0e7.png)

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 7, 2020, 7:38am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/9 "2020-10-07T07:38:53Z")

</div>

Installing from deb package or in mender convert? Did you use correct password?

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 7, 2020, 7:43am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/10 "2020-10-07T07:43:09Z")

</div>

I installing it from deb package. I did use the right password, if not it will said that there is no account.  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/2271302f8844fd001ede07403498cb5bf3e9ff94.png)

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 7, 2020, 7:59am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/11 "2020-10-07T07:59:09Z")

</div>

It says such account doesn’t exists. Do you register on hosted mender ? Thanks.

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 7, 2020, 8:01am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/12 "2020-10-07T08:01:34Z")

</div>

Earlier, when I put in the right Hosted Mender account, there is an error

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/841899cab357fd1344b2e8e513f258112ff4b0e7.png)

I’m sure I put in the right account because if I’m put in the wrong password, it would have said “We couldn’t find …”

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 7, 2020, 8:17am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/13 "2020-10-07T08:17:24Z")

</div>

@lluiscampos any idea what can be wrong here? Thanks.

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 8, 2020, 8:33am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/14 "2020-10-08T08:33:51Z")

</div>

Hi @MarekBelisko, I have work around this step and I have connected my Mini PC running Debian 9 to Hosted Mender by installing by this step.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/2cdc2b903e587db01b42317dff10ae6cfc981b54.png)

And I have checked on [hosted.mender.io](http://hosted.mender.io)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/7e1132ae3e6a6bc194253e26adc3cab3853f66b5.png)  
But my deployment have failed, this is the log, can you help me with this.  
_2020-10-08 07:15:19 +0000 UTC info: Running Mender client version: 2.4.0  
2020-10-08 07:15:21 +0000 UTC info: State transition: update-fetch [Download\_Enter] -\> update-store [Download\_Enter]  
2020-10-08 07:15:21 +0000 UTC info: No public key was provided for authenticating the artifact  
2020-10-08 07:15:21 +0000 UTC error: Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: handleHeaderReads: Artifact Payload type ‘rootfs-image’ is not supported by this Mender Client. Ensure that the Mender Client is fully integrated and that the RootfsPartA/B configuration variables are set correctly in ‘mender.conf’  
2020-10-08 07:15:21 +0000 UTC info: State transition: update-store [Download\_Enter] -\> fetch-install-retry-wait [Download\_Enter]  
2020-10-08 07:15:21 +0000 UTC info: State transition: fetch-install-retry-wait [Download\_Enter] -\> update-error [ArtifactFailure]  
2020-10-08 07:15:21 +0000 UTC info: State transition: update-error [ArtifactFailure] -\> cleanup [Error]  
2020-10-08 07:15:21 +0000 UTC info: State transition: cleanup [Error] -\> update-status-report [none]_

This is when I read the .mender file  
$ mender-artifact read debian9-nginx-x86\_64-mender.mender

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/ab536404517a037e476c886b7e0e59be3474391b.png)

I have noted all my installing, converting step, can you take a look at it for me? If possible, I’ll send this guideline to your email, is it okay?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/274cc2719967dabab1304336d0fe71fbe16a0e8b.png)

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 8, 2020, 9:35am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/15 "2020-10-08T09:35:12Z")

</div>

Do you have create mender image (with dual rootfs) and data partition?

```auto
2020-10-08 07:15:21 +0000 UTC error: Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: handleHeaderReads: Artifact Payload type ‘rootfs-image’ is not supported by this Mender Client. Ensure that the Mender Client is fully integrated and that the RootfsPartA/B configuration variables are set correctly in ‘mender.conf’

```

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 8, 2020, 10:05am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/16 "2020-10-08T10:05:35Z")

</div>

I created mender image by running this command  
_$ dd if=/dev/sda of=/home/tuan/debian9-nginx-0.1.img bs=1M conv=fdatasync_

This is my /dev/sda  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/63ebebd9b49f1d0906ec126fc7cd3300f3685382.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/29a462196d56d1caf4d26994681f8bd608ab5f4f.png)

And I use this image to create artifact with mender-convert  
_$ MENDER\_ARTIFACT\_NAME=debian9-nginx-release-0.1 ./docker-mender-convert --disk-image input/debian9-nginx-0.1.img --config configs/generic\_x86-64\_hdd\_config --overlay rootfs\_overlay\_demo/_  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/6dfb1d62a2c3da5afa06ebcf3d33737193e08efc.png)

Is it the correct way?

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 8, 2020, 10:09am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/17 "2020-10-08T10:09:39Z")

</div>

Right mender convert output was flashed to device and you try to perform update and it’s not working right? How do you create artifact?

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 8, 2020, 10:26am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/18 "2020-10-08T10:26:14Z")

</div>

I try 2 ways:  
1 is use the image in the deploy directory  
2 is use this command to convert .ext4 in deploy directory  
_$ mender-artifact write rootfs-image   
-t x86\_64   
-n debian9-nginx-0.1   
-f /home/tuan/mender-convert/deploy/debian9-nginx-0.1-x86\_64-mender.ext4   
-o debian9-nginx-0.1.mender_

And upload these 2 .mender file to Hosted Mender, and deploy it, both failed

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 8, 2020, 12:15pm UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/19 "2020-10-08T12:15:01Z")

</div>

If you try to use same artifact it won’t work because version will be same so you need to build other artifact with other release number and then try again.

---

<div class="post-metadata">

**Author:** ![M.Tuan](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@M.Tuan](https://hub.mender.io/u/M.Tuan)\
**Post date:** [October 9, 2020, 1:39am UTC](https://hub.mender.io/t/error-when-convert-container-image/2622/20 "2020-10-09T01:39:58Z")

</div>

The first one is _debian9-nginx-0.1.mender_ created by command

> $ mender-artifact write rootfs-image   
> -t x86\_64   
> -n debian9-nginx-0.1   
> -f mender-convert/deploy/debian9-nginx-0.1-x86\_64-mender.ext4   
> -o debian9-nginx-0.1.mender

The second one is _debian9-nginx-0.1-x86\_64-mender.mender_ created by command

> $ MENDER\_ARTIFACT\_NAME=debian9-nginx-release-0.1 ./docker-mender-convert   
> –disk-image input/debian9-nginx-0.1.img   
> –config configs/generic\_x86-64\_hdd\_config   
> –overlay rootfs\_overlay\_demo/

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/a736dc2e15ec57a237ab4f29e332c0f1ae2dcd31.png)

I’ve uploaded these 2 images to [hosted.mender.io](http://hosted.mender.io), but when I deployed it, both failed with the same error

> 2020-10-08 07:15:21 +0000 UTC error: Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: handleHeaderReads: Artifact Payload type ‘rootfs-image’ is not supported by this Mender Client. Ensure that the Mender Client is fully integrated and that the RootfsPartA/B configuration variables are set correctly in ‘mender.conf’

Can you explained what is the same artifact means? I haven’t get any artifact to deploy successfully, I just connected my mini pc to [hosted.mender.io](http://hosted.mender.io) with this command

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/2cdc2b903e587db01b42317dff10ae6cfc981b54.png)

[Next page](https://hub.mender.io/t/error-when-convert-container-image/2622.md?page=2)
