Ubuntu Pastebin

Paste from Adam Conrad at Tue, 3 Mar 2015 09:35:32 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[root@fisher ~]# cat bin/runit-fisher01.sh
#!/bin/sh

FSIMAGE=/var/lib/libvirt/images/fisher01.img
MACADDR=00:00:36:13:37:40

if QEMU=$(pgrep -f $FSIMAGE); then
  echo "This VM is already running as process $QEMU."
  exit 2
fi

if [ "$TERM" != "screen" ]; then
 echo "Please start VMs in screen sessions, not on the root console."
 exit 2
fi

ppc64_cpu --smt=off || true

qemu-system-ppc64 -enable-kvm -M pseries -cpu POWER7 -smp cores=8,threads=1 \
    -m 12G -nographic -vga none -net nic,macaddr=$MACADDR \
    -net tap,script=/root/bin/ifup.sh,downscript=no \
    -device spapr-vscsi -drive file=$FSIMAGE
[root@fisher ~]# cat /root/bin/ifup.sh
#!/bin/sh
ip link set "$1" up
ip link set "$1" master br0
Download as text