So none of the UserData stuff seems to work for me. I cut and pasted this in to 
the manual userdata area and I really can’t tell if it’s doing anything at all. 
I’m setting for a user and supplying a password hash and I’m unable to log in 
on the console.

I’m specifically using 
https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img
 and as far as I can tell, when it boots, network isn’t coming up because I see 
nothing in DHCP that it’s asking for an ip address. As opposed to Rocky 9.1 
qcow images which seem to work just fine out of the box. Network comes up, I 
log in with my ssh key. No issue.

@Nux, I tried your image, but it didn’t boot. I see the
GRUB_FORCE_PARTUUID set, attempting initrdless boot.
error and it just halts.

I saw this when I was initially attempting to create the Ubuntu template. 
Logically you would think the -kvm.img would indicate a qcow2 kvm image, but 
this wouldn’t boot for me. The 
https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img
 seems to boot just fine.

Thanks
-jeremy

> On Monday, Mar 27, 2023 at 11:54 AM, Stephan Bienek <[email protected] 
> (mailto:[email protected])> wrote:
> Hi Jeremy,
>
> the last ubuntu cloud image i was using
> https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img
> was working with Cloudstack User-Data out of the box, without any 
> modifications.
>
> Make sure to use
>
> Advanced mode / Show advanced settings / Userdata /( Manual Userdata entry / 
> in case of cloudstack 4.18)
>
> and paste your cloud-init config, for example ("#cloud-config" line is 
> required):
>
> #cloud-config
> users:
> - name: stephan
> ssh-authorized-keys:
> - ssh-ed25519 <your ssh key>
> lock_passwd: false
> passwd: <your linux password hash>
> sudo: ALL=(ALL) NOPASSWD:ALL
> shell: /bin/bash
> ssh_pwauth: true
>
> Are you really sure networking was not brought up?
> Make sure to use an Isolated network with a Virtual Router or any other 
> network with "Config Drive" feature enabled.
> Networking is working without userdata - if this doesnt work you can give Nux 
> idea a try to be 100% sure.
>
> Cheers,
> Stephan
>
>
> > Jeremy Hansen <[email protected]> hat am 27.03.2023 18:13 CEST 
> > geschrieben:
> >
> >
> > I’m trying to setup a template for Ubuntu 22.04LTS and while the image 
> > boots successfully, I see no way to log in. It doesn’t seem to bring up 
> > networking by default so I can’t ssh in with my pub key.
> >
> > Is this where “User Data” comes in to play? If so, anyone have an example 
> > that sets the password or just brings up networking?
> >
> > Thanks!
> >
> >
> >

Attachment: signature.asc
Description: PGP signature

Reply via email to