summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
diff options
context:
space:
mode:
authorDirk von Suchodoletz2010-06-07 18:09:48 +0200
committerDirk von Suchodoletz2010-06-07 18:09:48 +0200
commit08a1dbd750b91f9eb86bcb5611347a5e7e01eca6 (patch)
treec12dd3171cddc37142b20c9faf9c228367fa4e2d /os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
parentReflect changes in VERSION file ... (diff)
downloadcore-08a1dbd750b91f9eb86bcb5611347a5e7e01eca6.tar.gz
core-08a1dbd750b91f9eb86bcb5611347a5e7e01eca6.tar.xz
core-08a1dbd750b91f9eb86bcb5611347a5e7e01eca6.zip
Reflect changes for the new Workstation 7.1 and Player 3.1 and add the
vmware-usbarbitrator ...
Diffstat (limited to 'os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm')
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm34
1 files changed, 25 insertions, 9 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index 4ebaa2b6..7e55019c 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -132,7 +132,7 @@ sub getAttrInfo
applies_to_clients => 1,
description => unshiftHereDoc(<<' End-of-Here'),
Which set of VMware binaries to use: installed (local) or provided by the
- plugin itself (vmpl1.0, vmpl2.0, vmpl2.5, vmpl3.0)?
+ plugin itself (vmpl1.0, vmpl2.0, vmpl2.5, vmpl3.X)?
End-of-Here
# only allow the supported once...
# TODO: modify if we know which of them work
@@ -363,10 +363,10 @@ sub checkStage3AttrValues
);
}
- if ($vm_kind eq 'vmpl3.0' &&
- ! -d "/opt/openslx/plugin-repo/vmware/vmpl3.0/vmroot") {
+ if ($vm_kind eq 'vmpl3.X' &&
+ ! -d "/opt/openslx/plugin-repo/vmware/vmpl3.X/vmroot") {
push @problems, _tr(
- "No OpenSLX installation of VMware Player 3 found or installation failed. Using it as virtual machine wouldn't work!"
+ "No OpenSLX installation of VMware Player 3.X found or installation failed. Using it as virtual machine wouldn't work!"
);
}
@@ -411,9 +411,9 @@ sub _writeRunlevelScript
insmod ${modpath}/vmmon.ko || return 1
insmod ${modpath}/vmnet.ko || return 1
End-of-Here
- if ($kind eq 'local30' || $kind eq 'vmpl3.0') {
+ if ($kind eq 'local3X' || $kind eq 'vmpl3.X') {
$script .= unshiftHereDoc(<<" End-of-Here");
- # VMplayer 3.0 specific stuff
+ # VMplayer 3.X specific stuff
insmod ${modpath}/vmci.ko
insmod ${modpath}/vmblock.ko
insmod ${modpath}/vsock.ko
@@ -477,6 +477,15 @@ sub _writeRunlevelScript
"vmnetif",
"$script"
);
+ # vmblock for handling e.g. removable USB devices
+ $script = unshiftHereDoc(<<" End-of-Here");
+ # let point the path directly to the directory where the binary lives
+ $vmpath/usr/bin/vmware-usbarbitrator
+ End-of-Here
+ $initfile->addFunction(
+ "vmblock",
+ "$script"
+ );
$script = unshiftHereDoc(<<" End-of-Here");
# include default directories
. /etc/opt/openslx/openslx.conf
@@ -488,6 +497,12 @@ sub _writeRunlevelScript
load_modules
vmnetif
End-of-Here
+ # start the USB arbitrator on higher VMware/player versions (3.0+)
+ if ($kind eq 'vmpl3.X' || $kind eq 'local3X') {
+ $script .= unshiftHereDoc(<<" End-of-Here");
+ vmblock
+ End-of-Here
+ }
$initfile->addToCase(
"start",
"$script"
@@ -625,6 +640,7 @@ sub _getVersion {
# else { TODO: errorhandling if file or string doesn't exist }
chomp($vmversion);
chomp($vmbuildversion);
+
$versioninfo{vmversion} = $vmversion;
$versioninfo{vmbuildversion} = $vmbuildversion;
@@ -667,9 +683,9 @@ sub _localInstallation
# VMplayer 2.5
} elsif ($vmversion eq "2.5" || $vmversion eq "6.5") {
$kind="local25";
- # VMplayer 3.0, Workstation 7.0
- } elsif ($vmversion eq "3.0" || $vmversion eq "7.0") {
- $kind="local30";
+ # VMplayer 3.0, 3.1, Workstation 7.0, 7.1
+ } elsif ($vmversion eq "3.0" || $vmversion eq "7.0" ||
+ $vmversion eq "3.1" || $vmversion eq "7.1") { $kind="local3X";
}
# Create runlevel script depending on detected version
$self->_writeRunlevelScript("$vmpath", "$kind");