strongswan/testing/start-testing
Reto Buerki 0593b6c975 Export compile directory to guests
Use 9p over virtio to share files on the host with the guest domains.
The files are accessible in the guests /hostfs directory.
2013-01-17 16:54:58 +01:00

35 lines
772 B
Bash
Executable File

#!/bin/bash
. $PWD/scripts/function.sh
NETWORKS="vnet1 vnet2 vnet3"
CONFDIR=$PWD/config/kvm
KNLSRC=$BUILDDIR/$KERNEL/arch/x86/boot/bzImage
KNLTARGET=/var/run/kvm-swan-kernel
HOSTFSTARGET=/var/run/kvm-swan-hostfs
echo "Starting test environment"
[ `id -u` -eq 0 ] || die "You must be root to run $0"
check_commands virsh
log_action "Deploying kernel $KERNEL"
execute "ln -fs $KNLSRC $KNLTARGET"
log_action "Deploying $ROOTIMGCOMPILEDIR as hostfs"
execute "ln -Tfs $ROOTIMGCOMPILEDIR $HOSTFSTARGET"
for net in $NETWORKS
do
log_action "Network $net"
execute "virsh net-create $CONFDIR/$net.xml"
done
for host in $STRONGSWANHOSTS
do
ln -fs $IMGDIR/$host.$IMGEXT $VIRTIMGSTORE/$host.$IMGEXT
log_action "Guest $host"
execute "virsh create $CONFDIR/$host.xml"
done