Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - user-data in seed.iso does not work (both IDE/SATA) on VirtualBox VM using OVA VMDK #867

Closed
msakamoto-sf opened this issue Dec 26, 2024 · 2 comments

Comments

@msakamoto-sf
Copy link

Describe the bug

I tried to work Amazon Linux 2023 OVA on VirtualBox 7.1.4 (host: Win11 24H2 64bit), created seed.iso image file which contains meta-data (localhost: xxx) and user-data (see below).

  • meta-data : cloud-init picked up successfully. After 1st boot, hostname are shown in console what I set in meta-data.
  • user-data: not work. I couldn't login from console for ec2-user and password what I set in user-data chpasswd.

To Reproduce
Steps to reproduce the behavior:

  1. download https://cdn.amazonlinux.com/al2023/os-images/2023.6.20241212.0/vmware/al2023-vmware_esx-2023.6.20241212.0-kernel-6.1-x86_64.xfs.gpt.ova
  2. tar xf al2023-vmware_esx-2023.6.20241212.0-kernel-6.1-x86_64.xfs.gpt.ova -> al2023-vmware_esx-2023.6.20241121.0-kernel-6.1-x86_64.xfs.gpt-disk1.vmdk extracted.
  3. on another linux machine, create seedconfig dir, add meta-data which contains local-hostname: my-al202301.localdomain, add user-data which contains these lines:
    users:
    - default
    - name: ec2-user
    
    chpasswd:
      expire: false
      list: |
        ec2-user:amazon
    
  4. $ mkisofs -output seed.iso -volid cidata -joliet -rock user-data meta-data
  5. copy seed.iso to VirtualBox host
  6. create VirtualBox VM
    • Type: Linux
    • Subtype: Fedora
    • Version: Fedora (64-bit)
    • Memory: 4096MB
    • Processors: 2
    • IDE: seed.iso (CD-ROM)
    • SATA: al2023-vmware_esx-2023.6.20241121.0-kernel-6.1-x86_64.xfs.gpt-disk1.vmdk
  7. start VM
  8. after boot, login console shown.
  9. hostname is what I set in meta-data file, my-al202301 -> OK.
  10. but ec2-user:amazon login failed.

2024-12-27 023109

I changed IDE to SATA for seed.iso storage type, but result was same.

Expected behavior
ec2-user:amazon login should be success .

Desktop (please complete the following information):

  • OS: Windows11Pro
  • Version 24H2, 64bit
  • VirtualBox: 7.1.4, 64bit

Reference

@elsaco
Copy link

elsaco commented Dec 26, 2024

@msakamoto-sf the first line of your user-data must start with #cloud-config:

#cloud-config
users:
- default
- name: ec2-user

chpasswd:
  expire: false
  list: |
    ec2-user:amazon

Output of your user-data validation:

[ec2-user]$ cloud-init schema -c user-data.yaml --annotate
users:          # E1
- default
- name: ec2-user

chpasswd:
  expire: false
  list: |
    ec2-user:amazon

# Errors: -------------
# E1: File user-data.yaml needs to begin with "#cloud-config"

@stewartsmith
Copy link
Member

Note that as per https://docs.aws.amazon.com/linux/al2023/ug/outside-ec2-supported-configurations.html we do not support VirtualBox at this time. Thus, I'm going to move this issue to a Discussion rather than issue.

@amazonlinux amazonlinux locked and limited conversation to collaborators Dec 26, 2024
@stewartsmith stewartsmith converted this issue into discussion #868 Dec 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants