summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorMichael Janczyk2010-04-06 22:28:32 +0200
committerMichael Janczyk2010-04-06 22:28:32 +0200
commit32f56a53722d65c785aa1770d191733f2fc9e1f2 (patch)
tree977cc5a3acfefa6fb1a61a2dc53f08f14d986570 /os-plugins
parentcumulative commit of local branch, xen modifications and vmgrid plugin (diff)
downloadcore-32f56a53722d65c785aa1770d191733f2fc9e1f2.tar.gz
core-32f56a53722d65c785aa1770d191733f2fc9e1f2.tar.xz
core-32f56a53722d65c785aa1770d191733f2fc9e1f2.zip
changed name of init-hook, qemukvm tun/tap config
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh (renamed from os-plugins/plugins/bootsplash/init-hooks/10-have-nw-modules/bootsplash.sh)0
-rw-r--r--os-plugins/plugins/qemukvm/XX_qemukvm.sh3
-rw-r--r--os-plugins/plugins/qemukvm/files/ifup8
-rw-r--r--os-plugins/plugins/qemukvm/files/run-virt.include18
-rw-r--r--os-plugins/plugins/xen/init-hooks/10-nw-if-config/xennet.sh (renamed from os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xennet.sh)0
5 files changed, 17 insertions, 12 deletions
diff --git a/os-plugins/plugins/bootsplash/init-hooks/10-have-nw-modules/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh
index 7f3d563e..7f3d563e 100644
--- a/os-plugins/plugins/bootsplash/init-hooks/10-have-nw-modules/bootsplash.sh
+++ b/os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh
diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh
index 13c2b91e..ac97b52f 100644
--- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh
+++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh
@@ -99,16 +99,19 @@ ${qemukvm_imagesrc}." nonfatal
[ -n "${qemu}" ] && echo "ALL ALL=NOPASSWD: ${qemu}" >>/mnt/etc/sudoers
done
#killall=$(binfinder killall)
+ #ippath=$(binfinder ip)
cat >> /mnt/etc/sudoers << EOF
# allow to start and stop kvm services / load-/unload kvm modules
ALL ALL=NOPASSWD: /etc/init.d/qemukvm
ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/sbin/tunctl -t tap*
ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tap*
+
# TODO: check if kvm / qemu sufficient
#ALL ALL=NOPASSWD: ${killall} udhcpd
#ALL ALL=NOPASSWD: ${PLUGINDIR}/ifup
#ALL ALL=NOPASSWD: ${PLUGINDIR}/ifdown
#ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/usr/sbin/udhcpd -S /tmp/qemukvm/if*
+#ALL ALL=NOPASSWD: ${ippath} link set dev tap*
#ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/sbin/ip addr add * dev tap*
EOF
fi
diff --git a/os-plugins/plugins/qemukvm/files/ifup b/os-plugins/plugins/qemukvm/files/ifup
index 43956b31..9d94ac64 100644
--- a/os-plugins/plugins/qemukvm/files/ifup
+++ b/os-plugins/plugins/qemukvm/files/ifup
@@ -40,11 +40,12 @@ case "$1" in
# Configuring DHCP on host tap1 interface and enable IP masquerading
#sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t $1 >/dev/null 2>&1
sudo ip addr add ${nataddress} dev $1
+ sudo ip link set dev $1 up
# not necessary since already done by run-virt.include
#[ -d ${QKTMPDIR} ] || mkdir -p ${QKTMPDIR}
# cut the last .NNN/MM from nataddress ${natnetwork%.*}
# TODO: we use here atatic address, maybe change later
- sed -e "s,NWIF,$1,;s,CNETWORK,192.168.1${VM_ID}.254," \
+ sed -e "s,NWIF,$1,;s,CNETWORK,192.168.1${VM_ID}," \
-e "s,PIDFILE,${QKTMPDIR}/udhcpd.pid," \
-e "s,LEASEFILE,${QKTMPDIR}/udhcpd.leases," \
${OPENSLX_DEFAULT_CONFDIR}/udhcpd.conf \
@@ -60,8 +61,11 @@ case "$1" in
# Configuring DHCP on host tap2 interface
#sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t $1 >/dev/null 2>&1
sudo ip addr add ${hoaddress} dev $1
+ sudo ip link set dev $1 up
#[ -d ${QKTMPDIR} ] || mkdir -p ${QKTMPDIR}
- sed "s,NWIF,$1,;s,USER,${USER},;s,CNETWORK,192.168.1${VM_ID}.254," \
+ sed -e "s,NWIF,$1,;s,USER,${USER},;s,CNETWORK,192.168.1${VM_ID}," \
+ -e "s,PIDFILE,${QKTMPDIR}/udhcpd.pid," \
+ -e "s,LEASEFILE,${QKTMPDIR}/udhcpd.leases," \
${OPENSLX_DEFAULT_CONFDIR}/udhcpd.conf >${QKTMPDIR}/udhcpd.conf
touch ${QKTMPDIR}/udhcpd.leases
# ip link set $1 up
diff --git a/os-plugins/plugins/qemukvm/files/run-virt.include b/os-plugins/plugins/qemukvm/files/run-virt.include
index be7bc4fb..08a8b4f1 100644
--- a/os-plugins/plugins/qemukvm/files/run-virt.include
+++ b/os-plugins/plugins/qemukvm/files/run-virt.include
@@ -122,21 +122,18 @@ qemu_ifscr="script=${PLUGINDIRQK}/ifup,downscript=${PLUGINDIRQK}/ifdown"
case "${network_kind}" in
bridge*)
VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tapbridge${VM_ID},${qemu_ifscr}"
- sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapbridge${VM_ID} 2>/dev/null
- sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tapbridge${VM_ID} \
- 2>/dev/null
+ sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapbridge${VM_ID} #2>/dev/null
+ sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tapbridge${VM_ID}
;;
NAT|nat)
VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=tapnat${VM_ID},${qemu_ifscr}"
- sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapbnat${VM_ID} 2>/dev/null
- sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tapnat${VM_ID} \
- 2>/dev/null
+ sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapnat${VM_ID}
+ sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tapnat${VM_ID}
;;
hostonly|host-only)
VIRTCMDOPTS="${VIRTCMDOPTS} -net tap,ifname=taphost${VM_ID},${qemu_ifscr}"
- sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t tapbhost${VM_ID} 2>/dev/null
- sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 taphost${VM_ID} \
- 2>/dev/null
+ sudo /opt/openslx/uclib-rootfs/sbin/tunctl -t taphost${VM_ID}
+ sudo /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 taphost${VM_ID}
;;
*)
network_kind="user"
@@ -302,4 +299,5 @@ VIRTCMDOPTSHL="${VIRTCMDOPTS} -nographic ${diskfile}"
# graphical start
VIRTCMD="$VIRTCMD"
# vga std/cirrus/vmware?
-VIRTCMDOPTS="${VIRTCMDOPTS} -vga std -full-screen ${diskfile}"
+#VIRTCMDOPTS="${VIRTCMDOPTS} -vga std -full-screen ${diskfile}"
+VIRTCMDOPTS="${VIRTCMDOPTS} ${diskfile}"
diff --git a/os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xennet.sh b/os-plugins/plugins/xen/init-hooks/10-nw-if-config/xennet.sh
index d514b68d..d514b68d 100644
--- a/os-plugins/plugins/xen/init-hooks/10-have-nw-modules/xennet.sh
+++ b/os-plugins/plugins/xen/init-hooks/10-nw-if-config/xennet.sh