Bash script for converting and importing various image formats to Proxmox VE
LICENSE | ||
proxmox_converter.sh | ||
README.md |
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 filevm_id
: Destination VM ID in Proxmoxstorage
: 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.