diff options
| author | Dirk von Suchodoletz | 2011-06-04 12:44:28 +0200 |
|---|---|---|
| committer | Dirk von Suchodoletz | 2011-06-04 12:44:28 +0200 |
| commit | 9be038292dc709336cdc02afbf37f5327d525af8 (patch) | |
| tree | 6d2812c5ad1d94628bbfbf1f2b0c1e9544391854 /src/os-plugins/plugins/vmchooser | |
| parent | Fixing rsync issue and numberic id's (otherwise rsync maps by names which cau... (diff) | |
| download | core-9be038292dc709336cdc02afbf37f5327d525af8.tar.gz core-9be038292dc709336cdc02afbf37f5327d525af8.tar.xz core-9be038292dc709336cdc02afbf37f5327d525af8.zip | |
Changes for common subdirectory for virtual machines, nofuse fix in init.
Diffstat (limited to 'src/os-plugins/plugins/vmchooser')
| -rw-r--r-- | src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm | 12 | ||||
| -rw-r--r-- | src/os-plugins/plugins/vmchooser/XX_vmchooser.sh | 12 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm b/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm index f3428e1a..02381d33 100644 --- a/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm +++ b/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm @@ -109,6 +109,18 @@ sub getAttrInfo content_descr => 'path to xml files', default => '/var/lib/virt', }, + 'vmchooser::scratch' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + location URI of scratch space (local disk, TempFS, NFS or NBD) for + virtual machine redo files + End-of-Here + #TODO: + #content_regex => qr{^(0|1)$}, + content_descr => 'Allowed values: local or URI', + default => '', + }, }; } diff --git a/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh index 4afeb1e9..2428622e 100644 --- a/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh +++ b/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh @@ -1,5 +1,5 @@ # Copyright (c) 2008, 2009 - RZ Uni Freiburg -# Copyright (c) 2008..2010 - OpenSLX GmbH +# Copyright (c) 2008..2011 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -72,6 +72,16 @@ if [ -e $CONFFILE ]; then sed -i /mnt/usr/share/xsessions/default.desktop \ -e "s,vmchooser$,vmchooser --pvs," fi + # setup more scratch space for virtual machines, if configured + testmkd /mnt/var/lib/virt/vmscratch + testmkd /mnt/tmp/virt + + # enable normal users to setup the extended virtual machine redo file space + cat >> /mnt/etc/sudoers << EOF +# allow to start and stop the special /tmp redo file space (RAM + NBD/NFS server RAID) +ALL ALL=NOPASSWD: /sbin/losetup /dev/loop* +ALL ALL=NOPASSWD: /sbin/mdadm -C /dev/md0 -l linear --raid-devices=2 /dev/loop* /dev/* +EOF # finished ... [ $DEBUGLEVEL -gt 0 ] && echo "done with 'vmchooser' os-plugin ..." |
