14Proxmox - amagerard/TemplateVM GitHub Wiki
| 1- Installation | 2- Network | 3- Firewall | 4- Selinux | 
|---|---|---|---|
| 5- Logs | 6- Certificates | 7- Mail | 8- PassphraseSSH | 
| 9- Sudo | 10- GnomeShell | 11- CloneVM | 12- Volume | 
| 13- Troubleshoot | 14- Proxmox | 
Make a VM clone.
If you don't have vcenter.
See Chapter 11.1 Clone to hypervisor.
Do not forget to rename the clone VMDK file with the vmkfstools  command.
Do not forget to copy by reversing the clone files vmx, vmxf and nvram.
Modify the name of the VM in the vmx file of the Clone.
Modify the VM clone path if it's another datastore in the clone vmx file.
Create a new VM from the clone.
Disable the VM clone network card before starting.
Start the VM by choosing "Move" ..
Check that the Mac address of the network card has changed.
Stop all services (disable).
Uninstall Open-VM-Tools.
Detach the isos from the CDROM.
Detach the other internal disks.
Check that there is enough disk space on the download folder of your Internet browser.
Export the VM clone as an OVF model.
The export files are OVF, MF and VMDK.
Import VMDK and OVF files in the datastore which has the import option.
It is possible to upload  from the Proxmox GUI only the vmdk in the datastore with the import option.
But as I choose the scp command to download the ovf file and also vmdk.
Open a Root SSH session on Proxmox.
Find the import folder in the  datastore.
From your Linux computer, type the scp command to copy the vmdk and ovf file in the imported folder on Proxmox.
Example:
Folder with the imports.
/media/datastore-B/import
scp  Template-disk1.vmdk root@<PROMOX IP>:/media/datastore-B/import
From the proxmox GUI you should see vmdk et ovf.
Open a Root SSH session on Proxmox.
Locate in the folder where the vmdk and ovf files.
Type the command:
qm importovf <VM id >  <vm>.ovf>  <your datastore>
Please note that the format of your VM will be in RAW.
Verify that the datastore in ZFS is well in dynamics. It is not by default.
To change the format of the VM.
qm importovf <VM id >  <vm.ovf>  <your datastore>  datastore-B  --format <qcow2> ou  <vmdk>
Do not start the VM.
Go to the VM settings and make the changes.
Hardware :
Processor : type x86-64-v3
BIOS: OVMF (UEFI) or SeaBios.
SCSI controller: VirtIO SCSI single.
Add EFI disk if BIOS is OVMF (UEFI)
Options.
OS Type: Linux 6.x - 2.6 Kernel.
Go to console and start.
If the VM does not start
ESC touch to go to the BIOS EFI.
Boot Maintenance Manager
Boot Options.
Add boot options.
Entrance and go to EFI.
Goto  Redhat.
Shimx64-redhat.efi.
Input the description : redhat (qwerty)
Commit change and exit.
Change boot loader.
Entry.
Go down to select Redhat.
Type + to remount redhat and entry.
Commit change and exit
ESC  and  ESC and stop the VM.
Restart the VM twice.
if the VM starts
Choose the rescue kernel.
Open a root session.
Type dracut -f --regenerate-all
or if it doesn't work.
cd /boot
Find the latest initramfs img ( not kdump).
Example : initramfs-5.14.0-427.13.1.el9_4.x86_64.img
dracut --mdadmconf --fstab --force /boot/initramfs-5.14.0-427.13.1.el9_4.x86_64.img 5.14.0-427.13.1.el9_4.x86_64 -M.
Update grub.
grub2-mkconfig -o /boot/grub2/grub.cfg.
reboot.
The VM starts correctly.
But you have an error message in proxmox tasks.
WARN: no efidisk configured! Using temporary efivars disk.
Stop the  VM.
Go to VM settings.
Hardware :
Add an EFI disk.
Add a network card VirtIO (paravirtualized).
Please note that the name of the Ethernet card will change.
Re-register the subscription.
Install spice-vdagent if not already done.
Restart all services (systemctl start  enable --now).
Change hard disk to virtuo0.
Detach the hard disk.
The hard disk will be unused.
Edit the hard disk.
Change to VirtIO Block.
Dont forget the boot oder in options.
The disk will be seen as /dev/vda.
The change to /dev/vda is not a problem for Redhat,
but for Debian you need to update the grub again.
Go to VM settings.
Hardware:
Display: Choose SPICE et 128M.
Options:
QEMU Guest agent enabled.
SPICE Ehancements : Folder Sharing et all (root permission).
Start the VM and choose Spice console and click on the file that belonged to the screen.
You will have sound and usb mounts from your computer if you add it in the VM settings.
Hardware :
Audio ich9-intel-hda SPICE
USB : SPICE
Before making a clone of the VM.
Create a driver folder on the VM.
upload :virtuo-win-0.1.271.iso.
Download virtuo-win-0.1.271.iso from
https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers
Make a clone of the VM.
If you don't have vcenter.
See chapter 11.1 Clone to hypervisor.
Don't forget to rename the clone's vmdk file with the command  vmkfstools.
Don't forget to copy and rename the files from the clone vmx, vmxf et nvram.
Change the name of the vm in the clone's vmx file.
Change the VM clone path if it is another datastore in the clone's vmx file.
Create a new VM from clone's vmx file.
Disable the VM clone's network card before starting.
Start the VM by choosing "move".
Uninstall Vmware Tools very important.
Mount  virtuo-win-0.1.271.iso
Install virtuo drivers.
virtuo-win-guest-tools.exe.
Stop the cloned VM.
Detach the ISOs from the CD-ROM.
Detach the other internal disks.
I recommend this solution for VM exports.
From your computer.
Download the ovftool tool from VMware.
For me, the computer is the Linux version.
VMware-ovftool-4.6.3-24031167-lin.x86_64.zip.
Extract the zip file.
Check that there is enough disk space in the download folder.
ovftool   vi://<esxi IP >/<VM name>  <path to>/<VM name.ovf>
Example:
VM name:Windows-2025-p.
esxi: 192.168.20.56.
Path: /home/teacher/backup/Windows-2025-p.ovf.
vftool vi://192.168.20.56/Windows-2025-p  /home/teacher/backup/Windows-2025-p.ovf .
Before running this command make sure you have allowed root access to the esxi.
The exported files are ovf, mf et vmdk et nvam.
Import the vmdk and ovf file into the datastore which has the import option.
The datastore for imports cannot be ZFS.
Proxmox OS is Debian. You must mount the datastore with /etc/fstab.
And add it to new volume with proxmox GUI.
Open a root ssh session on proxmox.
Find the folder where the datastore is located with the import folder.
From your Linux computer, type the scp command to copy the vmdk and ovf files to the folder imported on proxmox.
Example:
Folder where the imports are located.
/media/datastore-B/import
scp  windows-2025-p-disk1.vmdk root@<PROMOX IP>:/media/datastore-B/import.
From the proxmox GUI you should see vmdk et ovf.
Open a root ssh session on proxmox.
Navigate to the folder where the vmdk and ovf files are located.
Type the command:
qm importovf <VM id de libre>  <vm>.ovf>  <your datastore>
Please note that the format of your VM will be in raw.
Check that the ZFS datastore is dynamic. This is not the default.
To change the VM format.
qm importovf <VM id de libre>  <vm.ovf>  <your datastore>   --format <qcow2> ou  <vmdk>
Do not start the VM.
Go to the VM settings and make the changes.
Hardware :
Processor : type x86-64-v3
BIOS: OVMF (UEFI) or SeaBios
Display: SPICE 128M
Machine: q35 version 9.2+pve1
SCSI Controller: ide (detach and change to ide).
Add a efi disk - same storage as the VM.
Add a disk 2G - Bus Virtio Block - same storage as the VM.
Add network card model  VirtIO (paravirtualized)
Options
OS type: Microsoft Windows  version 11/2022/2025
QEMU agent guest: enable
SPICE ehancements : folder sharing  et video streaming all
Dont forget the boot oder in options.
Start the VM.
Windows Server will install the VirtIO SCSI device.
Windows Server is now operational.
You must initialize and format the 2GB disk.
Shut down the VM.
Change the SCSI controller settings
Go to the VM settings and make the changes.
Hardware:
Detach the second 2G disk.
Delete the unused disk.
Detach the hard disk.
Edit the unused disk  et change to virtio Block.
Dont forget the boot oder in options.
Start your VM.
Windows  is now operational.
Go to pve and select shell.
This opens a root session on Promox.
cd /etc/pve/qemu-server.
Edit the file that corresponds to your .conf
Example:my VM ID is 108.
vi 108.conf
Replace  scsi0  by virtio0.
Example:
scsi0: datastore-A:vm-108-disk-0 will be   virtio0: datastore-A:vm-108-disk-0
This change is automatically updated in your VM hardware.
Hard Disk(virtio) datastore-A:vm-108-disk-0
The SPICE environment is already done.
Start the VM and select the Spice console and click on the file that belonged to the screen.
You will have sound and USB mounts from your computer if you add them in the VM settings.
Hardware:
Audio ich9-intel-hda SPICE
USB : SPICE