Kiwi image not booting in ec2 and no system logs

49 views
Skip to first unread message

Sweety S

unread,
Jan 19, 2023, 6:01:18 AM1/19/23
to kiwi
Hi, 

I have used the existing config.xml available in kiwi docs and modified it to use for generating ec2 raw image referring this. I have generated the raw file and created ami as well using ec2uploadimg. But when I launch an instance of the ami, instance is not booting up and no logs available in system logs. 

I have attached config.xml which I tried. Can someone please help me on this issue?

If you can share working sample of config.xml file for generating ec2 image, that would also be of great help.

Thanks,
Sweety 
config.xml

Marcus Schäfer

unread,
Jan 19, 2023, 8:22:17 AM1/19/23
to kiwi-...@googlegroups.com
Hi,

> I have used the existing config.xml available in kiwi docs and modified
> it to use for generating ec2 raw image referring [1]this.

The configuration you used looks relatively old, back in the days
when Xen PV and HVM was provided in different pieces. From todays
perspective the following type definition works for building EC2
images:

<type
image="oem"
filesystem="xfs"
kernelcmdline="console=ttyS0 multipath=off net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 8250.nr_uarts=4 dis_ucode_ldr"
devicepersistency="by-label"
firmware="efi"
>
<oemconfig>
<oem-resize>true</oem-resize>
</oemconfig>
<bootloader name="grub2" console="serial" timeout="1"/>
<size unit="M">10240</size>
</type>

Hope this helps

Cheers,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel: +49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------
signature.asc

Sweety S

unread,
Jan 20, 2023, 7:55:40 AM1/20/23
to kiwi

Thank you. I did generate an AMI with configuration you shared and launched an ec2 instance. But still, I am unable to connect to the ec2 instance. 
I wonder if I am missing any required packages or some other configuration.

Could you please share a complete working config.xml file or setup to create working ec2 instance?

Regards,
Sweety

Sweety S

unread,
Jan 20, 2023, 8:19:01 AM1/20/23
to kiwi
Attaching ec2 instance logs for reference.
ec2_instance.log

Marcus Schäfer

unread,
Jan 20, 2023, 8:56:04 AM1/20/23
to kiwi-...@googlegroups.com
Hi,

> Attaching ec2 instance logs for reference.

Thanks. As you can see from the logs the system has successfully
booted up.

> Thank you. I did generate an AMI with configuration you shared and
> launched an ec2 instance. But still, I am unable to connect to the ec2
> instance.

If you cannot connect via ssh this can have several reasons; wrong
ssh pub-key, wrong ssh user, no network config in the image
description (usually done via cloud-init). I guess your image
description misses a networking setup.

> I wonder if I am missing any required packages or some other
> configuration.

I suggest you go to:

https://build.opensuse.org/package/show/Cloud:Images:Leap_15.4/openSUSE-Leap-15.4-Guests

And check what's different compared to your SLES description.
Unpack ec2-root.tar.gz and check if your image description also has
a cloud.cfg file

Regards,
signature.asc

Sweety S

unread,
Jan 25, 2023, 8:58:30 AM1/25/23
to kiwi
Hi Marcus, 

Thank you very much for the detailed explanation. I was able to connect to ec2 instance via ssh after I added the network configurations as you suggested.

Thanks,
Sweety
Reply all
Reply to author
Forward
0 new messages