diff options
author | Michael Janczyk | 2010-03-21 19:50:12 +0100 |
---|---|---|
committer | Michael Janczyk | 2010-03-21 19:50:12 +0100 |
commit | 994aa36c095470f1c163e32b28fa324f7376f127 (patch) | |
tree | a1d0da469c9b0dbb390d56943a8c014a35aa7d00 | |
parent | added rw share support for vmgrid and virtualbox (diff) | |
download | core-994aa36c095470f1c163e32b28fa324f7376f127.tar.gz core-994aa36c095470f1c163e32b28fa324f7376f127.tar.xz core-994aa36c095470f1c163e32b28fa324f7376f127.zip |
qemukvm angepasst... geht noch nicht :(
-rw-r--r-- | os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm | 3 | ||||
-rw-r--r-- | os-plugins/plugins/qemukvm/XX_qemukvm.sh | 87 | ||||
-rw-r--r-- | os-plugins/plugins/qemukvm/files/kvm.cmdline | 196 | ||||
-rw-r--r-- | os-plugins/plugins/qemukvm/files/qemu-ifup | 12 | ||||
-rw-r--r-- | os-plugins/plugins/qemukvm/files/run-virt.include | 34 | ||||
-rw-r--r-- | os-plugins/plugins/virtualbox/XX_virtualbox.sh | 2 | ||||
-rw-r--r-- | os-plugins/plugins/virtualbox/files/machine.include | 2 | ||||
-rw-r--r-- | os-plugins/plugins/virtualbox/files/run-virt.include | 6 | ||||
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 1 | ||||
-rw-r--r-- | os-plugins/plugins/vmgrid/files/run-vmgrid.sh | 4 | ||||
-rw-r--r-- | os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm | 4 |
11 files changed, 291 insertions, 60 deletions
diff --git a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm index ee4b3417..52255116 100644 --- a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm +++ b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm @@ -136,7 +136,8 @@ sub installationPhase $initFile->setName("qemukvm"); $initFile->setDesc("Setup environment for QEMU/KVM"); - $initFile->addToBlock('head','. /etc/opt/openslx/network.qemukvm'); + $initFile-> + addToBlock('head','. /etc/opt/openslx/plugins/qemukvm/network.conf'); my $do_start = unshiftHereDoc(<<' End-of-Here'); # Adding the tap0 interface to the existing bridge configured in stage3 for i in 0 1 2; do diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh index a63af161..47d2689f 100644 --- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh +++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh @@ -11,39 +11,51 @@ # Script is included from init via the "." load function - thus it has all # variables and functions available +# include default directories +. /etc/openslx.conf + +CONFFILE="/initramfs/plugin-conf/qemukvm.conf" +PLUGINCONFDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR}/plugins/qemukvm +PLUGINDIR=${OPENSLX_DEFAULT_DIR}/plugin-repo/qemukvm +VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR}/qemukvm +LOGDIR=/mnt/${OPENSLX_DEFAULT_LOGDIR} + # check if the configuration file is available -if [ -e /initramfs/plugin-conf/qemukvm.conf ]; then +if [ -e ${CONFFILE} ]; then - # check for the virtualization CPU features - if grep -q "svm" /proc/cpuinfo && modprobe ${MODPRV} kvm_amd ; then - [ $DEBUGLEVEL -gt 0 ] && echo " * Loaded kvm_amd module" - elif grep -q "vmx" /proc/cpuinfo && modprobe ${MODPRV} kvm_intel ; then - [ $DEBUGLEVEL -gt 0 ] && echo " * Loaded kvm_intel module" - elif modprobe ${MODPRV} kqemu ; then - [ $DEBUGLEVEL -gt 0 ] && \ - error " * Successfully loaded the kqemu module, but loading of kvm_amd \ -or kvm_intel\n failed, because no virtualization extenstion found in this \ -CPU. Please\n enable the extension within your machines BIOS or get another \ -CPU." nonfatal - else - error " * All module loading failed including the kqemu module, which \ -was either\n not found or couldn't be loaded for other reasons. Thus using \ -qemu(-kvm)\n makes not much sense." nonfatal - exit 1 - fi - # load the tunnel device module - modprobe tun 2>/dev/null - # load needed variables - . /initramfs/plugin-conf/qemukvm.conf + . ${CONFFILE} # Test if this plugin is activated... more or less useless with the # new plugin system - if [ $qemukvm_active -ne 0 ]; then - + if [ ${qemukvm_active} -ne 0 2>/dev/null ]; then [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'qemukvm' os-plugin ..."; + # load general configuration . /initramfs/machine-setup + # load needed variables + . /initramfs/plugin-conf/qemukvm.conf + + # check for the virtualization CPU features + if grep -q "svm" /proc/cpuinfo && modprobe ${MODPRV} kvm_amd ; then + [ $DEBUGLEVEL -gt 0 ] && echo " * Loaded kvm_amd module" + elif grep -q "vmx" /proc/cpuinfo && modprobe ${MODPRV} kvm_intel ; then + [ $DEBUGLEVEL -gt 0 ] && echo " * Loaded kvm_intel module" + elif modprobe ${MODPRV} kqemu ; then + [ $DEBUGLEVEL -gt 0 ] && \ + error " * Successfully loaded the kqemu module, but loading of kvm_amd \ +or kvm_intel\n failed, because no virtualization extenstion found in this \ +CPU. Please\n enable the extension within your machines BIOS or get another \ +CPU." nonfatal + else + error " * All module loading failed including the kqemu module, which \ +was either\n not found or couldn't be loaded for other reasons. Thus using \ +qemu(-kvm)\n makes not much sense." nonfatal + exit 1 + fi + + # load the tunnel device module + modprobe tun 2>/dev/null # get source of qemukvm image server (get type, server and path) if strinstr "/" "${qemukvm_imagesrc}" ; then @@ -60,29 +72,29 @@ qemu(-kvm)\n makes not much sense." nonfatal [ $DEBUGLEVEL -gt 1 ] && error " * Incomplete information in variable \ ${qemukvm_imagesrc}." nonfatal fi - # copy version depending files - the vmchooser expects for every virtua- - # lization plugin a file named after it (here run-qemukvm.include) - testmkd /mnt/etc/opt/openslx/plugins/qemukvm - cp /mnt/opt/openslx/plugin-repo/qemukvm/run-virt.include \ - /mnt/etc/opt/openslx/plugins/qemukvm/run-qemukvm.include + + # copy virtualization include files to config dir + testmkd ${PLUGINCONFDIR} + + cp /mnt/${PLUGINDIR}/run-virt.include ${PLUGINCONFDIR} # create a network configuration template (variables should be setable in # the future, see vmware plugin) natnetwork="192.168.101" honetwork="192.168.102" echo -e "nataddress=${natnetwork}.254/24\nhoaddress=${honetwork}.254/24" \ - >/mnt/etc/opt/openslx/plugins/qemukvm/network.qemukvm + >${PLUGINCONFDIR}/network.conf # copy the runlevel script (proper place for all distros??) - cp /mnt/opt/openslx/plugin-repo/qemukvm/qemukvm /mnt/etc/init.d + cp /mnt/${PLUGINDIR}/qemukvm /mnt/etc/init.d chmod 0755 /mnt/etc/init.d/qemukvm rllinker "qemukvm" 22 2 # copy the /etc/qemu-ifup script and enable extended rights for running # the emulator and certain network commands via sudo - ln -sf /opt/openslx/plugin-repo/qemukvm/qemu-ifup /mnt/etc/qemu-ifup - ln -sf /opt/openslx/plugin-repo/qemukvm/qemu-ifdown /mnt/etc/qemu-ifdown - ln -sf /opt/openslx/plugin-repo/qemukvm/qemu-ifup /mnt/etc/kvm-ifup - ln -sf /opt/openslx/plugin-repo/qemukvm/qemu-ifdown /mnt/etc/kvm-ifdown + ln -sf ${PLUGINDIR}/qemu-ifup /mnt/etc/qemu-ifup + ln -sf ${PLUGINDIR}/qemu-ifdown /mnt/etc/qemu-ifdown + ln -sf ${PLUGINDIR}/qemu-ifup /mnt/etc/kvm-ifup + ln -sf ${PLUGINDIR}/qemu-ifdown /mnt/etc/kvm-ifdown for qemubin in qemu kvm ; do qemu="$(binfinder ${qemubin})" @@ -93,8 +105,9 @@ ${qemukvm_imagesrc}." nonfatal #ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/sbin/ip addr add * dev tap*\n\ #ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/usr/sbin/brctl addif br0 tap*\n\ ALL ALL=NOPASSWD: /opt/openslx/uclib-rootfs/usr/sbin/udhcpd -S /tmp/qemu*\n\ -ALL ALL=NOPASSWD: killall udhcpd" >>/mnt/etc/sudoers +# TODO: killall nur mit fullpath!!! +ALL ALL=NOPASSWD: /usr/bin/killall udhcpd" >>/mnt/etc/sudoers fi else - [ $DEBUGLEVEL -gt 0 ] && echo " * Configuration of qemukvm plugin failed" + [ $DEBUGLEVEL -gt 0 ] && echo " * Configuration of 'qemukvm' plugin failed" fi diff --git a/os-plugins/plugins/qemukvm/files/kvm.cmdline b/os-plugins/plugins/qemukvm/files/kvm.cmdline new file mode 100644 index 00000000..b3352cb5 --- /dev/null +++ b/os-plugins/plugins/qemukvm/files/kvm.cmdline @@ -0,0 +1,196 @@ +QEMU PC emulator version 0.9.1 (kvm-84), Copyright (c) 2003-2008 Fabrice Bellard +usage: qemu [options] [disk_image] + +'disk_image' is a raw hard image image for IDE hard disk 0 + +Standard options: +-h or -help display this help and exit +-M machine select emulated machine (-M ? for list) +-cpu cpu select CPU (-cpu ? for list) +-smp n set the number of CPUs to 'n' [default=1] +-fda/-fdb file use 'file' as floppy disk 0/1 image +-hda/-hdb file use 'file' as IDE hard disk 0/1 image +-hdc/-hdd file use 'file' as IDE hard disk 2/3 image +-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) +-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] + [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] + [,cache=writethrough|writeback|none][,format=f][,serial=s] + [,boot=on|off] + use 'file' as a drive image +-mtdblock file use 'file' as on-board Flash memory image +-sd file use 'file' as SecureDigital card image +-pflash file use 'file' as a parallel flash image +-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n) +-snapshot write to temporary files instead of disk image files +-m megs set virtual RAM size to megs MB [default=128] +-k language use keyboard layout (for example "fr" for French) +-audio-help print list of audio drivers and their options +-soundhw c1,... enable audio support + and only specified sound cards (comma separated list) + use -soundhw ? to get the list of supported cards + use -soundhw all to enable all of them +-usb enable the USB driver (will be the default soon) +-usbdevice name add the host or guest USB device 'name' +-name string set the name of the guest +-uuid %08x-%04x-%04x-%04x-%012x + specify machine UUID + +Display options: +-nographic disable graphical output and redirect serial I/Os to console +-curses use a curses/ncurses interface instead of SDL +-no-frame open SDL window without a frame and window decorations +-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt) +-no-quit disable SDL window close capability +-sdl enable SDL +-portrait rotate graphical output 90 deg left (only PXA LCD) +-vga [std|cirrus|vmware|none] + select video card type +-full-screen start in full screen +-vnc display start a VNC server on display +-name string set the name of the guest +-uuid %08x-%04x-%04x-%04x-%012x specify machine UUID + +Network options: +-net nic[,vlan=n][,macaddr=addr][,model=type][,name=str] + create a new Network Interface Card and connect it to VLAN 'n' +-net user[,vlan=n][,name=str][,hostname=host] + connect the user mode network stack to VLAN 'n' and send + hostname 'host' to DHCP clients +-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile] + connect the host TAP network interface to VLAN 'n' and use the + network scripts 'file' (default=/etc/kvm-ifup) + and 'dfile' (default=/etc/kvm-ifdown); + use '[down]script=no' to disable script execution; + use 'fd=h' to connect to an already opened TAP interface +-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port] + connect the vlan 'n' to another VLAN using a socket connection +-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port] + connect the vlan 'n' to multicast maddr and port +-net none use it alone to have zero network devices; if no -net option + is provided, the default is '-net nic -net user' +-tftp dir allow tftp access to files in dir [-net user] +-bootp file advertise file in BOOTP replies +-smb dir allow SMB access to files in 'dir' [-net user] +-redir [tcp|udp]:host-port:[guest-host]:guest-port + redirect TCP or UDP connections from host to guest [-net user] + +-bt hci,null dumb bluetooth HCI - doesn't respond to commands +-bt hci,host[:id] + use host's HCI with the given name +-bt hci[,vlan=n] + emulate a standard HCI in virtual scatternet 'n' +-bt vhci[,vlan=n] + add host computer to virtual scatternet 'n' using VHCI +-bt device:dev[,vlan=n] + emulate a bluetooth device 'dev' in scatternet 'n' + + +i386 target only: +-win2k-hack use it when installing Windows 2000 to avoid a disk full bug +-rtc-td-hack use it to fix time drift in Windows ACPI HAL +-no-fd-bootchk disable boot signature checking for floppy disks +-no-acpi disable ACPI +-no-hpet disable HPET +Linux boot specific: +-kernel bzImage use 'bzImage' as kernel image +-append cmdline use 'cmdline' as kernel command line +-initrd file use 'file' as initial ram disk + +Debug/Expert options: +-serial dev redirect the serial port to char device 'dev' +-parallel dev redirect the parallel port to char device 'dev' +-monitor dev redirect the monitor to char device 'dev' +-pidfile file write PID to 'file' +-S freeze CPU at startup (use 'c' to start execution) +-s wait gdb connection to port +-p port set gdb connection port [default=1234] +-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items) +-hdachs c,h,s[,t] + force hard disk 0 physical geometry and the optional BIOS + translation (t=none or lba) (usually qemu can guess them) +-L path set the directory for the BIOS, VGA BIOS and keymaps +-bios file set the filename for the BIOS +-no-kvm disable KVM hardware virtualization +-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC +-no-kvm-pit disable KVM kernel mode PIT +-no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection +-enable-nesting enable support for running a VM inside the VM (AMD only) +-pcidevice host=bus:dev.func[,dma=none][,name=string] + expose a PCI device to the guest OS. + dma=none: don't perform any dma translations (default is to use an iommu) + 'string' is used in log output. +-no-reboot exit instead of rebooting +-no-shutdown stop before shutdown +-loadvm [tag|id] + start right away with a saved state (loadvm in monitor) +-daemonize daemonize QEMU after initializing +-tdf inject timer interrupts that got lost +-kvm-shadow-memory megs set the amount of shadow pages to be allocated +-mem-path set the path to hugetlbfs/tmpfs mounted directory, also + enables allocation of guest memory with huge pages +-mem-prealloc toggles preallocation of -mem-path backed physical memory + at startup. Default is enabled. +-option-rom rom load a file, rom, into the option ROM space +-clock force the use of the given methods for timer alarm. + To see what timers are available use -clock ? +-localtime set the real time clock to local time [default=utc] +-startdate select initial date of the clock +-icount [N|auto] + enable virtual instruction counter with 2^N clock ticks per instruction +-echr chr set terminal escape character instead of ctrl-a +-virtioconsole c + set virtio console +-show-cursor show cursor +-tb-size n set TB size +-incoming p prepare for incoming migration, listen on port p + +During emulation, the following keys are useful: +ctrl-alt-f toggle full screen +ctrl-alt-n switch to virtual console 'n' +ctrl-alt toggle mouse and keyboard grab + +When using -nographic, press 'ctrl-a h' to get some help. +root@lsfks19:~# kvm >kvm.cmd +open /dev/kvm: No such file or directory +Could not initialize KVM, will disable KVM support +root@lsfks19:~# vim kvm.cmd + +QEMU PC emulator version 0.9.1 (kvm-84), Copyright (c) 2003-2008 Fabrice Bellard +usage: qemu [options] [disk_image] + +'disk_image' is a raw hard image image for IDE hard disk 0 + +Standard options: +-h or -help display this help and exit +-M machine select emulated machine (-M ? for list) +-cpu cpu select CPU (-cpu ? for list) +-smp n set the number of CPUs to 'n' [default=1] +-fda/-fdb file use 'file' as floppy disk 0/1 image +-hda/-hdb file use 'file' as IDE hard disk 0/1 image +-hdc/-hdd file use 'file' as IDE hard disk 2/3 image +-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) +-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] + [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] + [,cache=writethrough|writeback|none][,format=f][,serial=s] + [,boot=on|off] + use 'file' as a drive image +-mtdblock file use 'file' as on-board Flash memory image +-sd file use 'file' as SecureDigital card image +-pflash file use 'file' as a parallel flash image +-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n) +-snapshot write to temporary files instead of disk image files +-m megs set virtual RAM size to megs MB [default=128] +-k language use keyboard layout (for example "fr" for French) +-audio-help print list of audio drivers and their options +-soundhw c1,... enable audio support + and only specified sound cards (comma separated list) + use -soundhw ? to get the list of supported cards + use -soundhw all to enable all of them +-usb enable the USB driver (will be the default soon) +-usbdevice name add the host or guest USB device 'name' +-name string set the name of the guest +-uuid %08x-%04x-%04x-%04x-%012x + specify machine UUID + +Display options: +-nographic disable graphical output and redirect serial I/Os to console
\ No newline at end of file diff --git a/os-plugins/plugins/qemukvm/files/qemu-ifup b/os-plugins/plugins/qemukvm/files/qemu-ifup index 6a25ad29..1f1e0cc6 100644 --- a/os-plugins/plugins/qemukvm/files/qemu-ifup +++ b/os-plugins/plugins/qemukvm/files/qemu-ifup @@ -13,10 +13,14 @@ # - Script used for network setup of qemukvm in stage4 # ----------------------------------------------------------------------------- +. /etc/opt/openslx/openslx.conf + +PLUGINCONFDIR=${OPENSLX_DEFAULT_CONFDIR}/plugins/qemukvm +PLUGINDIR=${OPENSLX_DEFAULT_PLUGINDIRDIR}/qemukvm + # Use the udhcpcd as DHCP server and brctl as provided by default in OpenSLX # environments via uclibc-wrapper. - -. /etc/opt/openslx/plugin-repo/qemukvm/network.qemukvm +. ${PLUGINCONFDIR}/network.conf # Just decide by the virtual network device used which kind of connection # should be set up (passed in $1): tap0 = bridge, tap1 = nat, tap2 = hostonly. @@ -32,7 +36,7 @@ case "$1" in sed -e "s,NWIF,tap1,;s,/misc/,/qemu/," \ -e "s,CNETWORK,${nataddress%.*},;s,PIDFILE,/tmp/qemu-$USER/udhcpd.pid," \ -e "s,LEASEFILE,/tmp/qemu-$USER/udhcpd.leases," \ - /etc/opt/openslx/plugin-repo/qemukvm/udhcpd.conf \ + ${PLUGINDIR}/udhcpd.conf \ >/tmp/qemu-$USER/udhcpd.conf touch /tmp/qemu-$USER/udhcpd.leases # ip link set tap1 up @@ -45,7 +49,7 @@ case "$1" in # Configuring DHCP on host tap2 interface [ -d /tmp/qemu-$USER ] || mkdir -p /tmp/qemu-$USER sed "s,NWIF,tap2,;s,/misc/,/qemu/,;s,USER,$USER,;s,CNETWORK,$hoaddress," \ - /etc/opt/openslx/udhcpd.qemukvm >/tmp/qemu-$USER/udhcpd.conf + /etc/opt/openslx/udhcpd.conf >/tmp/qemu-$USER/udhcpd.conf touch /tmp/qemu-$USER/udhcpd.leases # ip link set tap2 up # ip addr add 192.168.101.254/24 dev tap2 diff --git a/os-plugins/plugins/qemukvm/files/run-virt.include b/os-plugins/plugins/qemukvm/files/run-virt.include index b1f76535..8d6d442b 100644 --- a/os-plugins/plugins/qemukvm/files/run-virt.include +++ b/os-plugins/plugins/qemukvm/files/run-virt.include @@ -1,6 +1,7 @@ -# qemukvm.include -# -# Copyright (c) 2009 - OpenSLX GmbH +# run-virt.include +# ----------------------------------------------------------------------------- +# Copyright (c) 2009..2010 - RZ Uni Freiburg +# Copyright (c) 2009..2010 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -9,13 +10,26 @@ # send your feedback to feedback@openslx.org # # General information about OpenSLX can be found at http://openslx.org -# -# Include script for running the QEMU/Linux KVM virtual machine on an OpenSLX -# client via the run-virt.sh. The stuff is copied to /etc/opt/openslx/run- -# qemukvm.include during stage3. +# ----------------------------------------------------------------------------- +# run-virt.include +# - Include script for running the QEMU/Linux KVM virtual machine on an +# OpenSLX client via the run-virt.sh or run-vmgrid.sh +################################################################################ + +################################################################################ +### Include general configuration +################################################################################ +if [ -f ${OPENSLX_DEFAULT_CONFDIR}/plugins/${self}/${self}.conf ]; then + . ${OPENSLX_DEFAULT_CONFDIR}/plugins/${self}/${self}.conf +else + writelog "Problems reading config file of ${self} plugin" + # TODO: exit wenn conf wichtig + #exit 1 +fi -# include general configuration from vmchooser -. /etc/opt/openslx/run-virt.include +################################################################################ +### Pepare and configure virtual machine and disk image +################################################################################ permem=50 mem=$(expr ${totalmem} / 100 \* ${permem}) @@ -72,6 +86,8 @@ for tool in kvm qemu-kvm qemu; do VIRTCMD=$(which ${tool} 2>/dev/null) [ "x$VIRTCMD" != "x" ] && break done + [ -z $VIRTCMD ] && { writelog "No qemu/kvm tool found."; exit 1; } + VIRTCMD="sudo $VIRTCMD" VIRTCMDOPTS="${VIRTCMDOPTS} -boot c -alt-grab ${diskfile}" diff --git a/os-plugins/plugins/virtualbox/XX_virtualbox.sh b/os-plugins/plugins/virtualbox/XX_virtualbox.sh index 1ca15fd9..4fa0b7bb 100644 --- a/os-plugins/plugins/virtualbox/XX_virtualbox.sh +++ b/os-plugins/plugins/virtualbox/XX_virtualbox.sh @@ -28,7 +28,7 @@ if [ -e ${CONFFILE} ]; then # Test if this plugin is activated... more or less useless with the # new plugin system - if [ $virtualbox_active -ne 0 ]; then + if [ $virtualbox_active -ne 0 2>/dev/null ]; then [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'virtualbox' os-plugin ..."; # load general configuration diff --git a/os-plugins/plugins/virtualbox/files/machine.include b/os-plugins/plugins/virtualbox/files/machine.include index bc1817de..6496b616 100644 --- a/os-plugins/plugins/virtualbox/files/machine.include +++ b/os-plugins/plugins/virtualbox/files/machine.include @@ -61,7 +61,7 @@ cat <<EOF </LPT> <AudioAdapter controller="AC97" driver="Alsa" enabled="true"/> <!-- OSS, Alsa, Pulse (HANGS!) --> <SharedFolders> - <SharedFolder name="Home" hostPath="/home/${USER}" writable="true"/> + <SharedFolder name="home" hostPath="/home/${USER}" writable="true"/> </SharedFolders> <Clipboard mode="Bidirectional"/> <Guest memoryBalloonSize="0" statisticsUpdateInterval="0"/> diff --git a/os-plugins/plugins/virtualbox/files/run-virt.include b/os-plugins/plugins/virtualbox/files/run-virt.include index a24845a3..62ef769d 100644 --- a/os-plugins/plugins/virtualbox/files/run-virt.include +++ b/os-plugins/plugins/virtualbox/files/run-virt.include @@ -203,7 +203,7 @@ writelog "\tNetwork kind:\t\t${network_kind}" #writelog "\tCD-ROM1:\t${cdrom0}" #writelog "\tCD-ROM2:\t${cdrom1}" #writelog "\tFloppy_A:\t${floppy0}" -writelog "\tShared Folders 'Home':\t/home/${USER}" +writelog "\tShared Folders 'home':\t/home/${USER}" ################################################################################ ### Pepare and configure virtual machine and disk image @@ -219,11 +219,11 @@ writelog "\tShared Folders 'Home':\t/home/${USER}" # add rw share to vm, if existing if [ -n "${rwshare}" ]; then - sharedf='<SharedFolder name="Share"' + sharedf='<SharedFolder name="share"' sharedf="${sharedf} hostPath=\"${rwshare}\" writable=\"true\"/>" sed -i "s,</SharedFolders>, ${sharedf}\n </SharedFolders>," \ "${machconfig}" - writelog "\tShared Folders 'Share':\t${rwshare}" + writelog "\tShared Folders 'share':\t${rwshare}" fi # add ssh port if linux and NAT diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index 690a7fea..6df6bf84 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -237,7 +237,6 @@ writelog () # Logo for console cat <<EOL - __ __ .----.--.--.-----.___.--.--.|__|.----.| |_ | _| | | |___| | || || _|| _| diff --git a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh index 386695bf..4a09f237 100644 --- a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh +++ b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh @@ -49,6 +49,7 @@ PLUGINCONFVMGRID=${PLUGINCONFROOT}/vmgrid ################################################################################ # check if forcemem set +# TODO: klappt noch nicht immer :( if [ "$1" = "--forcemem" ]; then forcemem=$2 xmlfile=${3##*/} @@ -85,7 +86,7 @@ if [ $runningvms -le 0 ]; then exit 1 fi # check if vmchooser plugin installed -if [ ${vmchooser_active} = "1" 2>/dev/null] && [ ${runningvms} -gt 1 ]; then +if [ ${vmchooser_active} -eq 1 2>/dev/null ] && [ ${runningvms} -gt 1 ]; then # only allow one instance of vmgrid writelog "Already 1 VMs running and vmchooser plugin is active." writelog "Can't start ${xmlfile}, exiting!" @@ -109,7 +110,6 @@ fi ################################################################################ cat <<EOL - __ __ .----.--.--.-----.___.--.--.--------.-----.----.|__|.--| | | _| | | |___| | | | _ | _|| || _ | diff --git a/os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm b/os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm index babc22a7..671e985f 100644 --- a/os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm +++ b/os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm @@ -89,7 +89,8 @@ sub _xenLabel if ($info->{name} =~ m{^(.+)::(.+)$}) { my $system = $1; my $exportType = $2; - $label = $system . "-xen" . ' ' x (36-length($system)) . $exportType; + $label = $system . "-xen" . ' ' x (36-length($system)) + . $exportType; } else { $label = $info->{name}; } @@ -106,6 +107,7 @@ sub _xenBootEntry # Example: # KERNEL mboot.c32 vendor-os/xen.gz dom0_mem=128000 --- # vendor-os/vmlinuz-xen debug=3 --- vendor-os/initramfs-1 + # TODO: versionsort oder per attr? if ($info->{xen::active} eq 1) { my $xenKernel = slxsystem(ls /boot/xen* | sort | tail -n 1); $append .= " file=$bootURI" if length($bootURI); |