This script simplifies the process of converting a Machine/VM linux into a Proxmox LXC container. Follow the prompts to provide essential details, and the script will handle the conversion seamlessly.
- This script must be run on the Proxmox host machine.
- Ensure that the 'pct' command is available on your Proxmox host machine.
-
Clone this repository on the Proxmox host machine and give execution permissions to the scripts:
git clone https://github.com/mathewalves/machine-to-proxmox-lxc-ct-converter.git cd machine-to-proxmox-lxc-ct-converter chmod +x convert.sh bashconvert
-
Run the script as a root:
./convert.sh
-
Run the script and follow the interactive prompts to provide necessary details for the conversion.
-
The script will initiate the conversion process. Note that you need the SSH key of the machine and the SSH port.
-
Once the conversion is complete, the Proxmox LXC container will be created.
If desired, use ./bashconvert to perform the conversion process using Bash.
./bashconvert -h |--help
-n|--name [lxc container name]
-t|--target [target machine ssh uri]
-P|--port [target port ssh]
-i|--id [proxmox container id]
-s|--root-size [rootfs size in GB]
-a|--ip [target container ip]
-b|--bridge [bridge interface]
-g|--gateway [gateway ip]
-m|--memory [memory in mb]
-d|--disk-storage [target proxmox storage pool]
-p|--password [root password for container (min. 5 chars)]
Customize as needed based on your specific requirements.
- If 'pct' or 'sshpass' is not available, the script will attempt to install 'sshpass' in the background.