Skip to content

aryapramudika/proxmox-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Proxmox-Script

Proxmox-Script (PSH)

  • Create Template from Cloud Images
  • Create VM Based On Template
  • Delete VM used VM Name

How to use ?

Run on Proxmox Console/SSH Server

Clone this repo and copy file to your PATH (/usr/local/bin or other path) and give execution permissions chmod +x

cp proxmox-script/psh /usr/local/bin && chmod +x /usr/local/bin/psh

Download Cloud-Image-File

Run This Script:

psh
Usage: /usr/local/bin/psh <createvm/createtemplate/deletevm>

Create Template

psh createtemplate
Usage: /usr/local/bin/psh createtemplate <vmid> <name> <cpu> <memory> <net> <disk> <image-file>
Example: /usr/local/bin/psh createtemplate 1001 template-ubuntu-20 2 4096 vmbr0 local-lvm focal-ubuntu.img

Create VM

psh createvm
Usage: /usr/local/bin/psh createvm <template-id> <vmid> <name> <cpu> <memory> <disk>
Example: /usr/local/bin/psh createvm 901 101 debian-vm 4 4 30G

Delete VM

psh deletevm
Usage: /usr/local/bin/psh deletevm <name>
Example: /usr/local/bin/psh deletevm debian-vm

Details about how to use cloud-init in Proxmox, you can read in here:

About

Proxmox-Script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages