type | title |
---|---|
docs | Customize .qcow2 image |
Tired of Debian Installer ):
On Proxmox VE i had to go through the Debian Installer if i want to spin up a new VM,taking a lot of time and effort.
https://cloud.debian.org/images/cloud/bookworm/20230910-1499/debian-12-genericcloud-amd64-20230910-1499.qcow2 ,this is a generic cloud image which can be easily imported onto proxmox.
$ virt-customize -a debian-10-genericcloud-amd64.qcow2 --root-password password:debian
By default the .qcow2 doesn't have any root password,so the disk image has be customized using virt-customize to add root password.
qemu-img resize image.qcow2 +SIZE
Copy the image to /var/lib/vz/template/qemu/
.
Create a VM on Proxmox VE without any media (do not attach any physical media) and delete any existing disk on proxmox.
qm importdisk 114 /var/lib/vz/template/qemu/debian-12-genericcloud-amd64-20230910-1499.qcow2 amogha -format qcow2
Execute the above qm importdisk
on the proxmox server where 114
is the VM id where in your case will be different.
Refreshing the Proxmox GUI on the browser,attach the unused Hard Disk
under Hardware
, also add a cloudInit drive and set IP address to dhcp
to automatically assign IP address for both IPv4 and IPv6.
Under Options
update the boot order and check whether the hard disk which was added to be checklisted and prioritize it to first.
Another alternative way is to use Preseed file at boot which automates
debian installer,haven't tried that yet.
:wq #for now