This commit is contained in:
2026-05-26 23:49:39 +02:00
parent 86b435d7e9
commit b0eb67df6a
13 changed files with 57 additions and 1 deletions
@@ -0,0 +1,38 @@
# Move VM to new datastore
Note: Make sure there is enough free space on the destination datastore.
## Move using the GUI
Find the VM you want to move, then go to the Hardware tab. Mark each drive and under `Disk Action` select `Move Storage`. Follow the
## Move using the CLI
### List available datastore
- Get VMID from VM list: `qm list`
- Get all datastores: `pvesm status`
### Example bash script:
```
#!/bin/bash
# Get VMID from VM list: qm list
# Get all list of datastores: pvesm status
myvmid=$1
datastore=$2
echo ***
echo Moving $myvmid to $datastore
echo
for vmid in $myvmid; do
for disk in $(qm config $vmid | grep vm-$vmid-disk | cut -d: -f1); do
echo Moving: vm-$vmid-disk
qm move-disk $vmid $disk $datastore --delete
done
done
```
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# Get VMID from VM list: qm list
# Get all list of datastores: pvesm status
myvmid=$1
datastore=$2
echo ***
echo Moving $myvmid to $datastore
echo
for vmid in $myvmid; do
for disk in $(qm config $vmid | grep vm-$vmid-disk | cut -d: -f1); do
echo Moving: vm-$vmid-disk
qm move-disk $vmid $disk $datastore --delete
done
done
+4
View File
@@ -0,0 +1,4 @@
# WakeOnLan settings for pve-02.home.ramberg.net
C4:65:16:3A:3D:10
+6
View File
@@ -0,0 +1,6 @@
if [ "$(qm status 104)" != "status: running" ]; then
echo "VM is not running."
/usr/sbin/qm start 104 # Start up libreelec every morning at 0805
#else
# echo "VM is running."
fi
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
wakeonlan -f /root/pve-02.wol
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
wakeonlan -f /root/truenas.wol
+4
View File
@@ -0,0 +1,4 @@
# WakeOnLan settings for truenas-01.home.ramberg.net
ec:b1:d7:6f:83:6b