script

  1. B

    Edit backup job via CLI

    Hi guys! I wonder how to edit existing pbs job via cli? I can create tasks with pvesh but how abiut editing them? For example I need to transfer couple of hundreds backup jobs from one datastore to another. How do I do that?
  2. M

    [TUTORIAL] Proxmox VE Installer on Debian 12 Bookworm

    I've developed a script that streamlines the Proxmox installation process atop Debian 12 (Bookworm). You can access to contribute or for more information in this Github Repository Requirements - Installed Debian 12 Bookworm - Superuser permissions su root - Installed Git apt install git -...
  3. H

    Minor request on qm --memory setting

    In my attempts to write a shell script to create VMs quickly I've got oneliners working fine i.e. # qm create 9999 --name vmtest --bios ovmf --efidisk0 data:0,efitype=4m,pre-enrolled-keys=1 --boot "order=net0;scsi0" --cores 1 --sockets 1 --cpu host --memory 2048 --net0 model=virtio,bridge=vmbr0...
  4. E

    Proxmox VE 8.0.3 - Post install (bash) script not working

    hi all, I'm quite new to Proxmox and I'm trying to set up a server and I'm trying to use this post install script bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)", but I can't get any bash script running; it just does nothing. I've read that it might...
  5. F

    custom pve script in gui?

    Hi There, I'm using Proxmox at home and gave a zfs as fs. Files are served to other computers via samba. Is there a way that we can have a section in the PVE where custom scripts are gathered and executed? I have for example a script, that set the uid/gid correct when it comes from a LXC. I...
  6. K

    Migration script from oVirt/RHEV to Proxmox

    Hi, I successfully managed to migrate 200+ Linux VMs from oVirt/RHEV to Proxmox by utilizing oVirt and Proxmox APIs. I thought that i share the script since i guess that others are in the same situation as myself. Script does no changes to the oVirt environment more than initiate shutdown of...
  7. A

    Cloud Init Template Creation Script

    Hi all Haven't posted on here before but long time lurker. Apologies if something similar to this has been posted in the forum previously. As part of my learning with Proxmox I've wanted to learn how to build a script to create vm templates so that I can clone a template into a vm quickly...
  8. P

    [TUTORIAL] CheckMK local check for monitoring backup status

    Hi! I just wanted to share my script to monitor the backup status for the vms in Proxmox. It is written for use in CheckMK. You need to have the CheckMK linux client installed on proxmox. I should be easily adaptable for other systems like zabbix, nagios etc. You need to put the script in...
  9. F

    bash script at Proxmox start-up

    I've put a bash script at /etc/init.d, changed in to executable but Proxmox doesn't execute it when it boots. How can I add a command script to execute when Proxmox boots?
  10. K

    [SOLVED] "qm start 100" from a bash script

    Hello there, I've moved my SR-IOV start-up script out of a systemd unit and into a shell script invoked by a systemd unit after multi-user.target is reached. I did this as, at least on the 5.19 kernel, pve-guests.service seems to reset my NIC, or at least does something that causes SR-IOV to be...
  11. S

    Syncing IP's from fail2ban

    I have been testing my script to copy fail2ban log files to Proxmox firewall and have managed to make it work... one time :) cat /root/bin/banned2proxmox.sh #!/bin/bash # # Sync fail2ban log files from client servers rsync -a root@vm1.ic4.eu:/var/log/fail2ban.log /root/bin/fail2ban-vm1.log...
  12. DynFi User

    Shutting down all VM / CT in parallel

    I would like to know if you know how I can shutdown ALL VM / CT in parallel ? (as in the GUI). I have setup a script to shutdown VM, CT and then set the noout flag on the CEPH Cluster and finally shutdown the server. Problem is that the script iterates with a for loop (which causes VM to be...
  13. U

    Proxmox API file-write special characters in content

    Hi, I-m trying to copy the content of script through the Proxmox guest agent to a windows client in Powershell. However, when I have a curly brackets "{" in the script the file-write will fail with the error {}":"property is not defined in schema and the schema does not allow additional...
  14. D

    APCUPSD

    Hello dear Proxmox team, Dear Proxmox Team, Our server is connected to a UPS. In the event of a power failure, the VMs on the server should shut down cleanly, as should the physical servers. Is there a template for a script that shuts down the individual VMs before the physical server...
  15. S

    execute qm monitor commands in shell script

    If I execute this below lines on proxmox shell to wakeup my mac os it works flawlessly but in shell script (.sh) it doesn't work qm monitor 503 system_wakeup quit I tried this code which is posted as solution in another question but it throws an error "2022/02/19 12:02:58 socat[6449] E...
  16. G

    global proxy settings through snippets?

    Hi, does anybody know how to insert proxy-variables through snippets so my CI-vm can reach out to get it's updates during first boot? I'm looking for some documentation but cannot find it. Thanks in advance.
  17. 8

    [SOLVED] Attach disk from another VM

    Hi Proxmox Users, First of all I would say you thanks to all of you for the support and the help you can provide to everybody :) Today I work on Windows Server VM 904, But I did mistake and my windows server restart in loop... because one script restart computer when it's starting... (local...
  18. B

    [TUTORIAL] After searching for a way to automagically connect to SPICE and coming up empty handed, I've created a script for anyone with the same issue!

    Let me preface this by saying this is specifically for Windows. A large part of my solution actually uses the officially recommended BASH script, and what I've created is essentially a batch file that executes said script on a remote Linux machine and then copies the output to be executed by the...
  19. S

    Edit configuration before starting VM through custom hook script

    First of all I would like to thank the Proxmox team for the great software and the nice community they built. I'm using a custom hook script (hookscript.pl) to manage VMs on a system with various GPUs passed through. The first motivation to do so is to avoid a VM (which requires a GPU) being...
  20. C

    Start VM => run rsync => stop VM

    Hello all I am looking for suggestions or maybe an ready to use script to accomplish this scenario: Start a VM on schedule => run rsync (may take awhile) => stop VM Thx in advance.

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!