Bash script for converting and importing various image formats to Proxmox VE
Find a file
2024-12-07 14:55:06 +05:30
LICENSE Initial commit 2024-12-07 14:49:41 +05:30
proxmox_converter.sh Add proxmox_converter.sh 2024-12-07 14:50:29 +05:30
README.md Update README.md 2024-12-07 14:55:06 +05:30

Proxmox Image Converter

A bash script for converting and importing virtual machine disk images from various hypervisors to Proxmox VE.

Features

  • Multi-format support: VMDK, VHD, VHDX, QED, QCOW2, RAW
  • Checksum verification for data integrity
  • Automatic format detection
  • Comprehensive error handling
  • Detailed logging
  • Storage validation
  • VM ID verification

Requirements

  • Proxmox VE 7.0 or higher
  • qemu-utils
  • md5sum
  • awk
  • grep

Installation

Download the script and make the script executable:

wget https://git.hhf.technology/hhf/proxmox-image-converter-script/raw/branch/main/proxmox_converter.sh
chmod +x proxmox_converter.sh

Usage

./proxmox_converter.sh <input_image_path> <vm_id> <storage>

Parameters:

  • input_image_path: Path to the source image file
  • vm_id: Destination VM ID in Proxmox
  • storage: Target storage pool name

Example:

./proxmox_converter.sh /path/to/windows.vmdk 100 local-lvm

Logging

Logs are stored in /var/log/proxmox_converter.log

Error Handling

The script implements the following safety measures:

  • Pre-conversion checksum calculation
  • Post-conversion verification
  • Temporary directory usage
  • Automatic cleanup on failure
  • Storage availability verification
  • VM ID collision detection

Limitations

  • Requires root privileges for Proxmox operations
  • Source image must be readable by the executing user
  • Target storage must have sufficient space for temporary conversion

License

MIT License

Support

Open an issue for bug reports or feature requests on the forum.