Some useful bash one-liners for VM’s

Detect hot-added cpu’s:

for a in /sys/devices/system/cpu/cpu*/online; do echo "1" > "$a"; done

Force disk rescan:

echo "- - -" > /sys/class/scsi_host/host0/scan

Leave a Reply

Your email address will not be published. Required fields are marked *