Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Proxmox Templates
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Proxmox Templates

conXtconXt Member
edited April 2023 in Help

Hello,

Does anyone have pre-made cloud-init ready proxmox templates they wish to sell?

I have tried building them and followed many of tutorials but after first boot, CentOS, Alma and Fedora all require ssh keys in order to connect. Which is not ideal for an unmanaged service.

  • I have already edited the ssh_config files and enabled root login and enabled password authentication before creating the template. *

Thanks.

Comments

  • Just use the qcow2 files from official websites.

    However I have created many templates this way rockylinux, akmalinux and cents 9.1 network with their genetic cloud qcow2 templates.

    If some provider successfull then please share your experience and solution if possible.

  • Hello,
    I have cloud init image for proxmox without ssh key for CentOS Ubuntu debian and rocky.
    Pm if you're interested

  • conXtconXt Member

    @foudre said:
    Hello,
    I have cloud init image for proxmox without ssh key for CentOS Ubuntu debian and rocky.
    Pm if you're interested

    PM sent, thank you!

  • NeoonNeoon Community Contributor, Veteran

    I made me a script a while back, to create ready to lunch proxmox templates.
    I put them here, https://img.nanokvm.net/ so easier to distribute.

    However, they are most likely outdated, have to rebuild them.
    Also, this is just a 100Mbit VPS, so.

  • aquaaqua Member, Patron Provider

    I'm pretty sure @Advin has some. Not sure if he's still willing to share.

  • AdvinAdvin Member, Patron Provider
    edited April 2023

    Credit to Gabitzuu from the Convoy Discord:

    vm_id='2010'
    cloud_img_url='https://cloud-images.ubuntu.com/daily/server/groovy/current/groovy-server-cloudimg-amd64-disk-kvm.img'
    image_name=${cloud_img_url##*/} # focal-server-cloudimg-amd64.img
    wget ${cloud_img_url}
    # virt-edit -a ${image_name} /etc/cloud/cloud.cfg
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/disable_root: [Tt]rue/disable_root: False/'
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/disable_root: 1/disable_root: 0/' 
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/lock_passwd: [Tt]rue/lock_passwd: False/'
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/lock_passwd: 1/lock_passwd: 0/' 
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/ssh_pwauth:   0/ssh_pwauth:   1/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/PasswordAuthentication no/PasswordAuthentication yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/PermitRootLogin [Nn]o/PermitRootLogin yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/#PermitRootLogin [Yy]es/PermitRootLogin yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/[#M]axAuthTries 6/MaxAuthTries 20/'
    virt-customize --install cloud-init,atop,htop,nano,vim,qemu-guest-agent,curl,wget -a ${image_name}
    qm create ${vm_id} --memory 512 --net0 virtio,bridge=vmbr0,firewall=1
    qm importdisk ${vm_id} ${image_name} local
    qm set ${vm_id} --ide0 local:cloudinit
    qm set ${vm_id} --boot c --bootdisk scsi0
    qm set ${vm_id} --serial0 socket --vga serial0
    qm template ${vm_id}
    

    This will create a template based on the Cloudinit image URL, enable root login, enable SSH password authentication, enable root login, install the necessary packages, and make it a template.

    We used a similar script for our templates. It's likely that we're going to be remaking all of our templates from scratch, though.

    Thanked by 2conXt noisycode
  • conXtconXt Member

    @Advin said:
    Credit to Gabitzuu from the Convoy Discord:

    vm_id='2010'
    cloud_img_url='https://cloud-images.ubuntu.com/daily/server/groovy/current/groovy-server-cloudimg-amd64-disk-kvm.img'
    image_name=${cloud_img_url##*/} # focal-server-cloudimg-amd64.img
    wget ${cloud_img_url}
    # virt-edit -a ${image_name} /etc/cloud/cloud.cfg
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/disable_root: [Tt]rue/disable_root: False/'
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/disable_root: 1/disable_root: 0/' 
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/lock_passwd: [Tt]rue/lock_passwd: False/'
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/lock_passwd: 1/lock_passwd: 0/' 
    virt-edit -a ${image_name} /etc/cloud/cloud.cfg -e 's/ssh_pwauth:   0/ssh_pwauth:   1/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/PasswordAuthentication no/PasswordAuthentication yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/PermitRootLogin [Nn]o/PermitRootLogin yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/#PermitRootLogin [Yy]es/PermitRootLogin yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/'
    virt-edit -a ${image_name} /etc/ssh/sshd_config -e 's/[#M]axAuthTries 6/MaxAuthTries 20/'
    virt-customize --install cloud-init,atop,htop,nano,vim,qemu-guest-agent,curl,wget -a ${image_name}
    qm create ${vm_id} --memory 512 --net0 virtio,bridge=vmbr0,firewall=1
    qm importdisk ${vm_id} ${image_name} local
    qm set ${vm_id} --ide0 local:cloudinit
    qm set ${vm_id} --boot c --bootdisk scsi0
    qm set ${vm_id} --serial0 socket --vga serial0
    qm template ${vm_id}
    

    This will create a template based on the Cloudinit image URL, enable root login, enable SSH password authentication, enable root login, install the necessary packages, and make it a template.

    We used a similar script for our templates. It's likely that we're going to be remaking all of our templates from scratch, though.

    Thanks so much!

Sign In or Register to comment.