On 09/26/2011 10:58 AM, Zane Bitter wrote:
#!/bin/bash
> # $1 - location of qemu img
> QPID_BROKER_ROOT="/tmp/qpid"
> for gnameseq in `seq 1 2`
for GUEST_NAME in "guest"{1..2}
do
mkdir...
...
> do
> GUEST_NAME="guest"$gnameseq
> mkdir -p ${QPID_BROKER_ROOT}/${GUEST_NAME}
> sudo qemu-kvm -name "${GUEST_NAME}" \
> -m 512M \
> -smp 2 \
> -snapshot $1 \
-snapshot "$1"
The quotes because the parameter 1 can contain path with spaces.
Also test for existence of parameter 1?
> -device virtio-serial \
> -chardev
socket,path=${QPID_BROKER_ROOT}/${GUEST_NAME}/0,server,nowait,id=${GUEST_NAME}_0 \
> -chardev
socket,path=${QPID_BROKER_ROOT}/${GUEST_NAME}/1,server,nowait,id=${GUEST_NAME}_1 \
> -device virtserialport,chardev=${GUEST_NAME}_0,name=qpid.0 \
> -device virtserialport,chardev=${GUEST_NAME}_1,name=qpid.1 \
> &
> PID=$!
> echo "started ${GUEST_NAME} pid = $PID"
> done
RR