Last active
August 29, 2015 14:15
-
-
Save demofly/7eeba801fdcecd21e08e to your computer and use it in GitHub Desktop.
PVESH свиной скрипт
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 | |
set -e # fail on any error | |
template="Debian-wheezy_7.6_amd64.tar.gz" | |
hostname="fox.dts.com"; id="102"; ip="155.75.11.23"; swap="0"; disk="20"; cpus="4"; mem="2048" | |
pvesh create /nodes/oss-hn01/openvz -vmid $id \ | |
-hostname $hostname \ | |
-storage local -ostemplate local:vztmpl/$template \ | |
-memory $mem \ | |
-swap $swap \ | |
-disk $disk \ | |
-cpus $cpus \ | |
-onboot "yes" \ | |
-ip_address "$ip" | |
#cp $(basename $0) /root/archive/$(basename $0)-$name.$ZONE-$(date +"%Y%m%d-%H-%M-%S") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment