diff options
author | Dirk von Suchodoletz | 2009-02-17 21:27:58 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-02-17 21:27:58 +0100 |
commit | a069a07a3c551e0ed2cf99121469171d70536601 (patch) | |
tree | c5c389f28c6c2f2fce4f2ae78359b080d2623a7c /os-plugins/plugins/vmchooser/XX_vmchooser.sh | |
parent | Starting to follow the new model (see r2589, r2591 too). (diff) | |
download | core-a069a07a3c551e0ed2cf99121469171d70536601.tar.gz core-a069a07a3c551e0ed2cf99121469171d70536601.tar.xz core-a069a07a3c551e0ed2cf99121469171d70536601.zip |
Stuff moved from vmware plugin into here (see r2592) to fit a more general
approach.
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2593 95ad53e4-c205-0410-b2fa-d234c58c8868
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 |