Solved

ubuntu 22.04 cloud images (img or ova)

  • 5 February 2023
  • 4 replies
  • 2154 views

For installing a Ubuntu Server Cloud image is it still required to customize it to add the serial port as described in a 2-year old article in this forum for installing Ubuntu Server Cloud.  

Also do Ubuntu Server 22.04 OVA images work or must use .img?

 

See: Ubuntu 22.04 (Jammy Jellyfish) [20230107]

 

 

icon

Best answer by manfred 7 February 2023, 14:52

View original

This topic has been closed for comments

4 replies

Userlevel 3
Badge +14

Larry,

I tried to create a VM from an imported Ubuntu 22.04 OVA and it didn’t work for me in my lab Prism Central and AHV.

I was able to create a VM from the Ubuntu 22.04 cloud .img file just fine though. I didn’t need to add the serial port for it to boot up.

 

Hi Jason,

Good to know.  Last night I used Terraform and the GUI to create a VM using the ubuntu 22.04 cloud .img.

I passed in a cloud-init to just add a password to a user. Although the console shows the VM running and sitting at a login prompt it would not accept the user I setup in the cloud-init.  I have no specific way to verify cloud-init ran (the console clears when it hits the login prompt so I miss the boot message).

I’ll have to add networking and try an ssh key in cloud init.  At some point i’m happy to share the simple terraform script and a basic cloud-init.  

 

Userlevel 2
Badge +7

HI @Larry99 ;
 

I’m already provisioning VMs with terraform; I’ve not tested setting the password; instead I’m inserting a ssh public key via cloud-init; this works without any problems.
here a snipped from the cloud-init template file which I use to render the cloud-init
#cloud-config
hostname: ${hostname}
users:
  - default #Define a default user
  - name: ubuntu
    gecos: ubuntu
    lock_passwd: false
    groups: sudo, users, admin
    shell: /bin/bash
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    ssh_authorized_keys:
      - ${ssh_public_key}

Thanks Manfred and Jason

 

  • Ubuntu 22.04 -- using cloud .img works
  • Terraform works
  • Terraform using cloud-init works when I pass in pub key

Now i have a basic terraform script i can work on proper module organization and variable separation to organize clusters of VM’s and different networking setups.

 

thanks everyone for the quick comments.

Larry