wget
qemu/kvm
Get the FreeBSD 11.3 VM disk image:
wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/11.3-RELEASE/amd64/Latest/FreeBSD-11.3-RELEASE-amd64.qcow2.xz
unxz FreeBSD-11.3-RELEASE-amd64.qcow2.xz
@@ -58,7 +58,7 @@ | |
void print(); | |
/* getters and setters */ | |
- void updateAuthor(const char *newTitle); | |
+ void updateAuthor(const char *newAuthor); | |
char *getAuthor(); | |
private: | |
@@ -74,7 +74,7 @@ |
#!/bin/sh | |
# | |
# Copyright IBM, Corp. 2010 | |
# | |
# Authors: | |
# Anthony Liguori <[email protected]> | |
# | |
# This work is licensed under the terms of the GNU GPL, version 2. See | |
# the COPYING file in the top-level directory. |
#!/bin/bash | |
# This prints the total CPU usage for the whole system (in terms of number of cores used) | |
top -bn1 | tr -s " " | sed -r "s/^ //" | cut -d " " -f 9 | grep -E ^[0-9]+\.[0-9]+$ | awk -v procs=`cat /proc/cpuinfo | grep cessor | wc -l` 'BEGIN{sum=0} {sum+=$0} END{print sum/procs}' |
#!/bin/bash | |
set -euo pipefail | |
SCRIPT_RUN_SINGLE="/root/Xen_scripts/vm_run_cmd.sh" | |
if [ "$#" -lt 4 ]; then | |
echo "usage: $0 <prefix> <start> <stop> <cmd>" | |
exit | |
fi |
#!/bin/bash | |
set -euo pipefail | |
if [ "$1" == "" ] || [ "$2" == "" ]; then | |
echo "usage: $0 <vm_name> <cmd>" | |
exit | |
fi | |
ssh root@$1 ${*:2} 2>&1 | sed "s/^/[$1] /" |
#!/bin/sh | |
if [ "$1" == "" ]; then | |
echo "Usage: $0 <file to uncompress>" | |
exit | |
fi | |
pigz -dc $1 | tar xf - |
#!/bin/sh | |
if [ "$1" == "" ]; then | |
echo "Usage: $0 <folder to compress>" | |
exit | |
fi | |
NAME=`basename $1` | |
tar -c --use-compress-program=pigz -f $NAME.tar.gz $NAME |
# number of VMs to boot: | |
vm_num=10 | |
for i in `seq 0 $vm_num`; do | |
# here we launch $vm_num `xl create` commands in parallel | |
( xl create /path/to/config/file$i.cfg &> out_$i.log) & | |
done | |
wait # wait for all the `xl create` commands to return before continuing further |