diff options
Diffstat (limited to 'os-plugins/plugins/vmchooser/XX_vmchooser.sh')
-rw-r--r-- | os-plugins/plugins/vmchooser/XX_vmchooser.sh | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/os-plugins/plugins/vmchooser/XX_vmchooser.sh index c0345254..972683ca 100644 --- a/os-plugins/plugins/vmchooser/XX_vmchooser.sh +++ b/os-plugins/plugins/vmchooser/XX_vmchooser.sh @@ -1,5 +1,5 @@ -# Copyright (c) 2008 - RZ Uni Freiburg -# Copyright (c) 2008 - OpenSLX GmbH +# Copyright (c) 2008, 2009 - RZ Uni Freiburg +# Copyright (c) 2008, 2009 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -24,6 +24,30 @@ if [ -e $CONFFILE ]; then /mnt/etc/X11/sessions/ testmkd /mnt/etc/opt/openslx cp $CONFFILE /mnt/etc/opt/openslx/vmchooser-stage3.conf + + # setup all generic virtualization / starting stuff like the floppy image + testmkd /mnt/var/lib/virt/vmchooser/fd-loop 1777 + testmkd /mnt/var/lib/virt/vmchooser/loopimg + + # loop file for exchanging information between linux and vm guest + if modprobe ${MODPRV} loop; then + mdev -s + else + : #|| error "" nonfatal + fi + # mount a clean tempfs (bug in UnionFS prevents loopmount to work) + strinfile "unionfs" /proc/mounts && \ + mount -n -o size=1500k -t tmpfs vm-loopimg /mnt/var/lib/virt/vmchooser/loopimg + # create an empty floppy image of 1.4MByte size + dd if=/dev/zero of=/mnt/var/lib/virt/vmchooser/loopimg/fd.img \ + count=2880 bs=512 2>/dev/null + chmod 0777 /mnt/var/lib/virt/vmchooser/loopimg/fd.img + # use dos formatter copied into stage3 + mkdosfs /mnt/var/lib/virt/vmchooser/loopimg/fd.img >/dev/null 2>&1 #|| error + mount -n -t msdos -o loop,umask=000 /mnt/var/lib/virt/vmchooser/loopimg/fd.img \ + /mnt/var/lib/virt/vmchooser/fd-loop + + # finished ... [ $DEBUGLEVEL -gt 0 ] && echo "done with 'vmchooser' os-plugin ..." fi fi |