Created
April 20, 2022 12:46
-
-
Save th3gundy/0ebc449529f5b8bdeda15efa148deb35 to your computer and use it in GitHub Desktop.
Proxmox change virtual machine ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oldVMID=111 | |
newVMID=999 | |
# change node name with yours | |
sed -i "s/$oldVMID/$newVMID/g" /etc/pve/nodes/security/qemu-server/$oldVMID.conf | |
mv /etc/pve/nodes/security/qemu-server/$oldVMID.conf /etc/pve/nodes/security/qemu-server/$newVMID.conf | |
mv /vm-storage/images/$oldVMID/ /vm-storage/images/$newVMID/ | |
cd /vm-storage/images/$newVMID/ | |
ls | |
# change id in disk name | |
mv vm-$oldVMID-disk-0.qcow2 vm-$newVMID-disk-0.qcow2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment