How to create a template for VM and my issues

fantozzi

Member
Dec 7, 2023
99
0
6
Hello everyone,

I am an absolute beginner in Proxmox and currently I am trying to create a template for a VM. I have already tested some images such as lunar-server-cloudimg-amd64-disk-kvm.img, debian-12-genericcloud-amd64.qcow2, but every time I enter the login data I get the message: Login: incorrect

I have tried various settings in the cloud init, sometimes with password, sometimes without password, sometimes with SSH key, sometimes without. Unfortunately, the result is always the same. If I start the template before the conversion, the result is unfortunately the same. What information do you need from me to get an overview?

Config: Template

Code:
root@pve:~# qm config 9001
agent: enabled=1
boot: order=scsi0;net0
ciuser: xxx
ide2: local-lvm:vm-9001-cloudinit,media=cdrom
ipconfig0: ip=dhcp
meta: creation-qemu=8.1.5,ctime=1709761102
name: Debian12CloudInit
net0: virtio=BC:24:11:C2:29:44,bridge=vmbr0
onboot: 1
ostype: l26
scsi0: local-lvm:base-9001-disk-0,discard=on,size=2G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=e5e822cb-d367-440b-bf85-005198c1f983
sshkeys: xxxx
template: 1
vga: serial0
vmgenid: 8f601963-8f57-41a7-8e9e-5a2a7b2f738e

Config: Clone

Code:
root@pve:~# qm config 9000
agent: enabled=1
boot: order=scsi0;net0
ciuser: dalio
ide2: local-lvm:vm-9000-cloudinit,media=cdrom,size=4M
ipconfig0: ip=dhcp
meta: creation-qemu=8.1.5,ctime=1709761102
name: Debian-Test
net0: virtio=BC:24:11:25:53:CB,bridge=vmbr0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-9000-disk-0,discard=on,size=2G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=0f1ffa23-848f-4b05-9189-043019712807
sshkeys: xxxxx
vga: serial0
vmgenid: c44faf91-ccc7-4d1d-a06f-94961ab96a6f

pveversion:

Code:
root@pve:~# pveversion -v
proxmox-ve: 8.1.0 (running kernel: 6.5.13-1-pve)
pve-manager: 8.1.4 (running version: 8.1.4/ec5affc9e41f1d79)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.5.13-1-pve-signed: 6.5.13-1
proxmox-kernel-6.5: 6.5.13-1
proxmox-kernel-6.5.11-8-pve-signed: 6.5.11-8
proxmox-kernel-6.5.11-4-pve-signed: 6.5.11-4
ceph-fuse: 17.2.7-pve1
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx8
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.0
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.3
libpve-access-control: 8.1.1
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.1.0
libpve-guest-common-perl: 5.0.6
libpve-http-server-perl: 5.0.5
libpve-network-perl: 0.9.5
libpve-rs-perl: 0.8.8
libpve-storage-perl: 8.0.5
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve4
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.1.4-1
proxmox-backup-file-restore: 3.1.4-1
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.2.3
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.5
proxmox-widget-toolkit: 4.1.3
pve-cluster: 8.0.5
pve-container: 5.0.8
pve-docs: 8.1.3
pve-edk2-firmware: 4.2023.08-4
pve-firewall: 5.0.3
pve-firmware: 3.9-2
pve-ha-manager: 4.0.3
pve-i18n: 3.2.0
pve-qemu-kvm: 8.1.5-3
pve-xtermjs: 5.3.0-3
qemu-server: 8.0.10
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.2-pve2
 
i have tried convert my win10 to template and clone to new instance. but all of failed to boot and stuck at 'start boot option'. At the first time, it showed blue screen for me (hal initialization failed error)
 
Well I used the command line to start the VM and I immediately run the command qm terminal vmid. I was suprised that I didn`t get the "Incorrect login" message, but I could log in. Could you maybe explain to me why the command line run smooth but within I try to start the VM within the GUI it doesn`t work?
 
I am an absolute beginner in Proxmox and currently I am trying to create a template for a VM. I have already tested some images such as lunar-server-cloudimg-amd64-disk-kvm.img, debian-12-genericcloud-amd64.qcow2, but every time I enter the login data I get the message: Login: incorrect
The standard Cloud Image disallows login with a password over ssh for both "root" and "non-root" users. However, you can login on the physical (virtual) console, if you set the password.
The login works just fine on both VNC/GUI console and via "qm terminal". If you have an issue with GUI - its likely due to keyboard/characterset mismatch. Type the password in username field, is it what you expected?

Code:
VMID=3011 OSUSER=ubuntu OSIMAGE=lunar-server-cloudimg-amd64.img ./vm_create.sh ;qm start 3011;sleep 15;qm terminal 3011
variables used:
STORAGE == blockbridge-nvme
VMID == 3011
DEVICE == scsi0
NAME == vm3011
OSUSER == ubuntu
CONSOLE == vga
CLOUDINIT == local
==============
qm create 3011 --memory 8192 --name vm3011 --socket 1 --onboot no
qm set 3011 --scsihw virtio-scsi-single --scsi0 blockbridge-nvme:vm-3011-disk-0
update VM 3011: -scsi0 blockbridge-nvme:vm-3011-disk-0 -scsihw virtio-scsi-single
qm set 3011 -net0 virtio,bridge=vmbr0,firewall=1
update VM 3011: -net0 virtio,bridge=vmbr0,firewall=1
qm set 3011 --scsi1 blockbridge-nvme:cloudinit
update VM 3011: -scsi1 blockbridge-nvme:cloudinit
scsi1: successfully created disk 'blockbridge-nvme:vm-3011-cloudinit,media=cdrom'
generating cloud-init ISO
qm disk resize 3011 scsi0 8G
qm set 3011 --boot c --bootdisk scsi0
update VM 3011: -boot c -bootdisk scsi0
qm set 3011 --serial0 socket --vga virtio
update VM 3011: -serial0 socket -vga virtio
qm set 3011 -ipconfig0 ip=dhcp
update VM 3011: -ipconfig0 ip=dhcp
qm set 3011 --cipassword ubuntu --ciuser ubuntu
update VM 3011: -cipassword <hidden> -ciuser ubuntu
qm set 3011 -ciupgrade 0
update VM 3011: -ciupgrade 0

generating cloud-init ISO
starting serial terminal on interface serial0 (press Ctrl+O to exit)

vm3011 login: ubuntu
Password:
Welcome to Ubuntu Lunar Lobster (development branch) (GNU/Linux 5.19.0-21-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Mar  7 14:20:23 UTC 2024

  System load:  0.8               Processes:             91
  Usage of /:   20.5% of 7.58GB   Users logged in:       0
  Memory usage: 2%                IPv4 address for eth0: 172.16.150.129
  Swap usage:   0%

ubuntu@vm3011:~$




Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Sorry I am not a native english speaker and honestly as a newbie I have difficulties following you. Maybe you can try to explain it to me in simple words? I would really appreciate.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!