This file contains hidden or 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
| #!/bin/bash | |
| # Based on script by William Lam - http://engineering.ucsb.edu/~duonglt/vmware/ | |
| # Found at http://askubuntu.com/questions/764620/how-do-you-hotplug-enable-new-cpu-and-ram-in-a-virtual-machine | |
| # Bring CPUs online | |
| for CPU in $(ls /sys/devices/system/cpu/ |grep -E '(cpu[0-9])') | |
| do | |
| CPU_DIR="/sys/devices/system/cpu/${CPU}" | |
| echo "Found cpu: \"${CPU_DIR}\" ..." | |
| CPU_STATE_FILE="${CPU_DIR}/online" |
This file contains hidden or 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
| pct create <id> /var/lib/vz/template/cache/centos-7-default_20170504_amd64.tar.xz \ | |
| -arch amd64 \ | |
| -ostype <centos|ubuntu|etc> \ | |
| -hostname <hostname> \ | |
| -cores <cores> \ | |
| -memory <memory(MB)> \ | |
| -swap <swap(MB)> \ | |
| -storage local-lvm \ | |
| -password \ | |
| -net0 name=eth0,bridge=<bridge>,gw=<gateway>,ip=<cidr>,type=veth &&\ |