# Unable to import the rockylinx 9 to AWS cloud

**URL:** <https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143>\
**Category:** Rocky Linux Help & Support\
**Created:** [March 9, 2023, 6:17am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143 "2023-03-09T06:17:38Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagarseapatil](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarseapatil](https://forums.rockylinux.org/u/sagarseapatil)\
**Post date:** [March 9, 2023, 6:17am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/1 "2023-03-09T06:17:38Z")

</div>

Steps followed

I downloaded the qcow2 format form this link  
[Index of /pub/rocky/9/images/x86\_64/](https://download.rockylinux.org/pub/rocky/9/images/x86_64/) Rocky-9-EC2-Base-9.1-20230215.0.x86\_64.qcow2

I converted this qcow to raw format(which is supported on aws)  
qemu-img convert -f qcow2 -O raw Rocky-9-EC2-Base-9.1-20230215.0.x86\_64.qcow2 Rocky-9-EC2-Base-9.1.raw

But when I tired to import image on AWS , I get this error.

StatusMessage": “ClientError: Unknown OS / Missing OS files.”,

Is these steps followed are correct ?Please help me on this

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [March 9, 2023, 7:00am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/2 "2023-03-09T07:00:42Z")

</div>

Wouldn’t it be better to use the ones already prepared? From here: [Cloud Images | Rocky Linux](https://rockylinux.org/cloud-images)

Or is there a particular reason you are trying to do this, than use the already prepared official images?

---

<div class="post-metadata">

**Author:** ![sagarseapatil](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarseapatil](https://forums.rockylinux.org/u/sagarseapatil)\
**Post date:** [March 9, 2023, 7:59am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/3 "2023-03-09T07:59:43Z")

</div>

We want to create our own custom image , we will not use marketplace/community AMI’s

---

<div class="post-metadata">

**Author:** ![valentin6963](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/valentin6963/32/2822_2.png) [@valentin6963](https://forums.rockylinux.org/u/valentin6963)\
**Post date:** [March 9, 2023, 8:23am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/4 "2023-03-09T08:23:43Z")

</div>

This is something I have done last period. Some hints are:

- use a Fedora Workstation 37 VM;
- install there `imagefactory`;
- checkout the branch `devel` from the [GitHub - rocky-linux/sig-core-toolkit: Various scripts and tools for SIG/Core](https://github.com/rocky-linux/sig-core-toolkit) repository;
- build the empanadas container and run that from your host instead of executing build-image directly [View paste V4SDRSBYQ7RKPG7SC3KU2N5TPY](https://rpa.st/V4SDRSBYQ7RKPG7SC3KU2N5TPY)

I also recommend you join the mattermost Development channel, there I discussed with @neil more on this topic.

---

<div class="post-metadata">

**Author:** ![valentin6963](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/valentin6963/32/2822_2.png) [@valentin6963](https://forums.rockylinux.org/u/valentin6963)\
**Post date:** [March 9, 2023, 9:18am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/5 "2023-03-09T09:18:42Z")

</div>

I put together the scripts on a repository: [GitHub - valentin-nasta/create-custom-rocky-linux-ami](https://github.com/valentin-nasta/create-custom-rocky-linux-ami)  
Please let me know if you encounter any issue.

(I had to create a new post because I was limited to 2 links per post.)

---

<div class="post-metadata">

**Author:** ![sagarseapatil](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarseapatil](https://forums.rockylinux.org/u/sagarseapatil)\
**Post date:** [March 9, 2023, 11:56am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/6 "2023-03-09T11:56:41Z")

</div>

Hi Valentin , I tried the steps mentioned by you  
STEP 17/20: ENV LIBGUESTFS\_BACKEND direct  
 → 5594ca12b7f  
STEP 18/20: COPY prep-azure.sh /prep-azure.sh  
 → 29374bf25eb  
STEP 19/20: RUN chmod +x /prep-azure.sh  
 → a4a7b9dc6e5  
STEP 20/20: ENTRYPOINT [“/tini”, “–”]  
COMMIT empanadas:latest  
 → 4cd83341361  
Successfully tagged localhost/empanadas:latest  
4cd833413614e7f31d4848d0042450f44c8cd4c70b864b9ef28dcc6fea23190e

But I am unable to login to container localhost/empanadas:latest

docker container ls  
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

docker image pull localhost/empanadas:latest  
Error response from daemon: Get “[http://localhost/v2/](http://localhost/v2/)”: dial tcp [::1]:80: connect: connection refused

---

<div class="post-metadata">

**Author:** ![valentin6963](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/valentin6963/32/2822_2.png) [@valentin6963](https://forums.rockylinux.org/u/valentin6963)\
**Post date:** [March 9, 2023, 12:26pm UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/7 "2023-03-09T12:26:10Z")

</div>

Hi Sagar, on this example should be used `podman` and not `docker`.

```auto
sudo podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/empanadas latest 011e3cc8b82f 2 days ago 3.09 GB
docker.io/library/fedora 36 45237698d272 2 weeks ago 171 MB

```

---

<div class="post-metadata">

**Author:** ![sagarseapatil](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarseapatil](https://forums.rockylinux.org/u/sagarseapatil)\
**Post date:** [March 10, 2023, 8:55am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/8 "2023-03-10T08:55:53Z")

</div>

podman images  
REPOSITORY TAG IMAGE ID CREATED SIZE  
localhost/empanadas latest 4cd833413614 21 hours ago 3.09 GB  
[Docker](http://docker.io/library/fedora) 36 45237698d272 2 weeks ago 171 MB  
[root@ip-10-70-13-224 create-custom-rocky-linux-ami]# podman run 4cd833413614  
tini (tini version 0.19.0 - git.de40ad0)  
Usage: tini [OPTIONS] PROGRAM – [ARGS] | --version

Execute a program under the supervision of a valid init process (tini)

Command line options:

–version: Show version and exit.  
-h: Show this help message and exit.  
-s: Register as a process subreaper (requires Linux \>= 3.4).  
-p SIGNAL: Trigger SIGNAL when parent dies, e.g. “-p SIGKILL”.  
-v: Generate more verbose output. Repeat up to 3 times.  
-w: Print a warning when processes are getting reaped.  
-g: Send signals to the child’s process group.  
-e EXIT\_CODE: Remap EXIT\_CODE (from 0 to 255) to 0.  
-l: Show license and exit.

Environment variables:

TINI\_SUBREAPER: Register as a process subreaper (requires Linux \>= 3.4).  
TINI\_VERBOSITY: Set the verbosity level (default: 1).  
TINI\_KILL\_PROCESS\_GROUP: Send signals to the child’s process group.

---

<div class="post-metadata">

**Author:** ![valentin6963](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/valentin6963/32/2822_2.png) [@valentin6963](https://forums.rockylinux.org/u/valentin6963)\
**Post date:** [March 10, 2023, 10:27am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/9 "2023-03-10T10:27:20Z")

</div>

Here is an example of `podman run` if you want to access run the container:

```bash
[vdev@vmvalentin-fedbox ~]$ sudo podman images | grep empanadas
localhost/empanadas latest 011e3cc8b82f 3 days ago 3.09 GB
[vdev@vmvalentin-fedbox ~]$ sudo podman run -it --rm 011e3cc8b82f bash
[root@704b3b9ecf2e /]#

```

a complete example you’ll find on my repository: [create-custom-rocky-linux-ami/run\_empanadas.sh at main · valentin-nasta/create-custom-rocky-linux-ami · GitHub](https://github.com/valentin-nasta/create-custom-rocky-linux-ami/blob/main/run_empanadas.sh)

---

<div class="post-metadata">

**Author:** ![sagarseapatil](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarseapatil](https://forums.rockylinux.org/u/sagarseapatil)\
**Post date:** [March 10, 2023, 12:06pm UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/11 "2023-03-10T12:06:20Z")

</div>

I executed this command in the container and got this error

imagefactory --debug --verbose --timeout 3600 base\_image --parameter generate\_icicle false --parameter oz\_overrides “{‘libvirt’: {‘memory’: 2048}, ‘custom’: {‘useuefi’: ‘no’}}” --file-parameter install\_script /transfer/kickstarts/Rocky-9-EC2-Base.ks /transfer/iso-template.xml 2\>&1 | tee /transfer/run-output-iso.txt  
2023-03-10 12:03:31,350 DEBUG root thread(MainThread) Message: Enabling faulthandler  
2023-03-10 12:03:31,352 DEBUG root thread(MainThread) Message: Enabled faulthandler  
2023-03-10 12:03:31,353 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (Docker) loaded…  
2023-03-10 12:03:31,354 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (GCE) loaded…  
2023-03-10 12:03:31,355 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (HyperV) loaded…  
2023-03-10 12:03:31,356 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (IndirectionCloud) loaded…  
2023-03-10 12:03:31,356 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (OVA) loaded…  
2023-03-10 12:03:31,357 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (RHEVM) loaded…  
2023-03-10 12:03:31,358 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (TinMan) loaded…  
2023-03-10 12:03:31,359 INFO imgfac.PluginManager.PluginManager thread(MainThread) Message: Plugin (vSphere) loaded…  
2023-03-10 12:03:31,359 ERROR root thread(MainThread) Message: Unable to read file /transfer/kickstarts/Rocky-9-EC2-Base.ks referenced in --file-parameter argument

---

<div class="post-metadata">

**Author:** ![sagarseapatil](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarseapatil](https://forums.rockylinux.org/u/sagarseapatil)\
**Post date:** [March 10, 2023, 12:07pm UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/12 "2023-03-10T12:07:27Z")

</div>

where I can find this file **/transfer/kickstarts/Rocky-9-EC2-Base.ks** I don’t see this file in any repo

---

<div class="post-metadata">

**Author:** ![valentin6963](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/valentin6963/32/2822_2.png) [@valentin6963](https://forums.rockylinux.org/u/valentin6963)\
**Post date:** [March 10, 2023, 5:11pm UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/13 "2023-03-10T17:11:36Z")

</div>

The `run_empanadas.sh` script does clone the required repositories (including the `kickstarts`):

> <https://github.com/valentin-nasta/create-custom-rocky-linux-ami/blob/main/run_empanadas.sh#L9>

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:22am UTC](https://forums.rockylinux.org/t/unable-to-import-the-rockylinx-9-to-aws-cloud/9143/14 "2023-08-25T03:22:22Z")

</div>

Closed on August 25, 2023, 3:22am UTC


