From e4d145a918b6e3fb0188dbc8b65613fe5e608685 Mon Sep 17 00:00:00 2001 From: Dirk Date: Sun, 27 Apr 2014 19:50:10 +0200 Subject: Update of the vmware plugin ... --- README | 6 +- README.de | 8 +- VERSIONS | 2 +- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 122 +++------------------ 4 files changed, 24 insertions(+), 114 deletions(-) diff --git a/README b/README index b22e4f2a..04839a97 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ WELCOME ---------- -OpenSLX - Open StateLess eXtensions version 5.0.1 +OpenSLX - Open StateLess eXtensions version 5.0.7a OpenSLX is a software package for setting up, managing and booting of "stateless client systems" (a.k.a. "diskless X stations"). @@ -29,9 +29,7 @@ NOTES ABOUT THIS RELEASE ------------------------- * Cloning is the only form of vendor-OS creation we can currently recommend for a vendor-OS that is meant to be run in production. - The fresh installation of a vendor-OS into a folder does not work properly - across all distributions, yet, so while it may be interesting to experiment - in that field, problems are more likely. + The fresh installation of a vendor-OS into a folder will not work any more. FEEDBACK diff --git a/README.de b/README.de index ea7a41a0..7b23336d 100644 --- a/README.de +++ b/README.de @@ -1,6 +1,6 @@ WILLKOMMEN ---------- -OpenSLX - Open StateLess eXtensions Version 5.0.1 +OpenSLX - Open StateLess eXtensions Version 5.0.7a OpenSLX ist ein Softwarepaket zum Einrichten, Verwalten und Booten von "Stateless Client Systems" (a.k.a. "diskless X stations"). @@ -35,9 +35,9 @@ HINWEISE ZU DIESER VERSION --------------------------- * Das Klonen eines Vendor-OS ist derzeit die einzige Installationsform für ein für den Betrieb vorgesehenes Vendor-OS. - Die Neu-Installation in ein Verzeichnis hinein funktioniert je nach - Distribution noch nicht ganz reibungslos, so dass dort mit Problemen zu - rechnen ist. + Die Neu-Installation in ein Verzeichnis hinein ist nicht mehr vorgesehen. +* Ältere Versionen der Virtualisierer funktionieren in neueren OS nur, wenn + die Installation in der Vorlage gelingt. FEEDBACK diff --git a/VERSIONS b/VERSIONS index 2c9a8586..997b83cb 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,5 +1,5 @@ OPENSLX_VERSION_MAJOR="5" OPENSLX_VERSION_MINOR="0" -OPENSLX_VERSION_RELEASE="6" +OPENSLX_VERSION_RELEASE="7a" OPENSLX_VERSION_STRING="${OPENSLX_VERSION_MAJOR}.${OPENSLX_VERSION_MINOR}.${OPENSLX_VERSION_RELEASE}${OPENSLX_VERSION_BUILD}" diff --git a/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index f21488d5..fdec79d6 100644 --- a/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -1,4 +1,4 @@ -# Copyright (c) 2008..2013 - OpenSLX G-mbH +# Copyright (c) 2008..2014 - OpenSLX G-mbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -43,8 +43,8 @@ sub getInfo return { description => unshiftHereDoc(<<' End-of-Here'), Module for enabling services of VMware Inc. on an OpenSLX stateless - client. This plugin might use pre-existing installations of VMware - tools or install addional variants and versions. + client. This plugin uses an installation of VMware within the cloned + system. End-of-Here precedence => 70, required => [ qw( desktop ) ], @@ -131,14 +131,14 @@ sub getAttrInfo applies_to_systems => 1, 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.X)? + Which set of VMware binaries to use: installed (local)? + (Only pre-installed in the clone versions will work) End-of-Here # only allow the supported once... # TODO: modify if we know which of them work #content_regex => qr{^(local|vmws(5\.5|6.0)|vmpl(1\.0|2\.0))$}, - content_regex => qr{^(local|vmpl3\.0||vmpl2\.0|vmpl1\.0|vmpl2\.5)$}, - content_descr => 'Allowed values: local, vmpl2.0', + content_regex => qr{^(local$}, + content_descr => 'Allowed values: local', #TODO: what if we don't have a local installation. default # is still local. Someone has a clue how to test # it and change the default value? @@ -158,58 +158,12 @@ sub getAttrInfo content_descr => '1 means active - 0 means inactive', default => '1', }, - 'vmware::vmpl2.0' => { - applies_to_vendor_os => 1, - applies_to_system => 0, - applies_to_clients => 0, - description => unshiftHereDoc(<<' End-of-Here'), - Install and configure vmplayer v2 - End-of-Here - content_regex => qr{^(1|0)$}, - content_descr => '1 means active - 0 means inactive', - default => '0', - }, - 'vmware::vmpl2.5' => { - applies_to_vendor_os => 1, - applies_to_system => 0, - applies_to_clients => 0, - description => unshiftHereDoc(<<' End-of-Here'), - Install and configure vmplayer v2 - End-of-Here - content_regex => qr{^(1|0)$}, - content_descr => '1 means active - 0 means inactive', - default => '0', - }, - 'vmware::vmpl1.0' => { - applies_to_vendor_os => 1, - applies_to_system => 0, - applies_to_clients => 0, - description => unshiftHereDoc(<<' End-of-Here'), - Install and configure vmplayer v1 - End-of-Here - content_regex => qr{^(1|0)$}, - content_descr => '1 means active - 0 means inactive', - default => '0', - }, - 'vmware::pkgpath' => { - applies_to_vendor_os => 1, - applies_to_system => 0, - applies_to_clients => 0, - description => unshiftHereDoc(<<' End-of-Here'), - Path to VMware packages - End-of-Here - #TODO - #content_regex => qr{^(1|0)$}, - content_descr => '1 means active - 0 means inactive', - default => '/root/vmware-pkgs', - }, # ** set of attributes for the installation of VM Workstation/Player # versions. More than one package could be installed in parallel. # To be matched to/triggerd by 'vmware::kind' }; } - sub preInstallationPhase() { my $self = shift; @@ -223,17 +177,11 @@ sub preInstallationPhase() $self->{vendorOsPath} = $info->{'vendor-os-path'}; my $pkgpath = $self->{attrs}->{'vmware::pkgpath'}; - my $vmpl10 = $self->{attrs}->{'vmware::vmpl1.0'}; - my $vmpl20 = $self->{attrs}->{'vmware::vmpl2.0'}; - my $vmpl25 = $self->{attrs}->{'vmware::vmpl2.5'}; my $local = $self->{attrs}->{'vmware::local'}; - if ($local == 0 && $vmpl10 == 0 && $vmpl20 == 0 && $vmpl25 == 0) { + if ($local == 0) { print "\n\n * At least one kind needs to get installed/activated:\n"; print " vmware::local=1 or\n"; - print " vmware::vmpl1.0=1 or\n"; - print " vmware::vmpl2.0=1\n"; - print " vmware::vmpl2.5=1\n"; print " * vmware plugin was not installed!\n\n"; exit 1; } @@ -279,15 +227,6 @@ sub installationPhase if ($self->{attrs}->{'vmware::local'} == 1) { $self->_localInstallation(); } - if ($self->{attrs}->{'vmware::vmpl2.0'} == 1) { - $self->_vmpl2Installation(); - } - if ($self->{attrs}->{'vmware::vmpl1.0'} == 1) { - $self->_vmpl1Installation(); - } - if ($self->{attrs}->{'vmware::vmpl2.5'} == 1) { - $self->_vmpl25Installation(); - } ## prepration for our faster wrapper script # rename the default vmplayer script and create a link. @@ -342,34 +281,6 @@ sub checkStage3AttrValues ); } - if ($vm_kind eq 'vmpl1.0' && - ! -d "/opt/openslx/plugin-repo/vmware/vmpl1.0/vmroot") { - push @problems, _tr( - "No OpenSLX installation of VMware Player 1 found or installation failed. Using it as virtual machine wouldn't work!" - ); - } - - if ($vm_kind eq 'vmpl2.0' && - ! -d "/opt/openslx/plugin-repo/vmware/vmpl2.0/vmroot") { - push @problems, _tr( - "No OpenSLX installation of VMware Player 2.0 found or installation failed. Using it as virtual machine wouldn't work!" - ); - } - - if ($vm_kind eq 'vmpl2.5' && - ! -d "/opt/openslx/plugin-repo/vmware/vmpl2.5/vmroot") { - push @problems, _tr( - "No OpenSLX installation of VMware Player 2.5 found or installation failed. Using it as virtual machine wouldn't work!" - ); - } - - 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.X found or installation failed. Using it as virtual machine wouldn't work!" - ); - } - return if !@problems; return \@problems; @@ -416,15 +327,15 @@ sub _writeRunlevelScript "tempdir", "$script" ); - $modlist = "vmnet vmmon"; + $modlist = "vmnet vmmon "; $script = unshiftHereDoc(<<" End-of-Here"); # VMplayer common stuff insmod ${modpath}/vmmon.ko || return 1 insmod ${modpath}/vmnet.ko || return 1 End-of-Here - if ($kind eq 'local3X' || $kind eq 'vmpl3.X' || $kind eq 'local4X' || $kind eq 'local5X') { + if ($kind eq 'local3X' || $kind eq 'local4X' || $kind eq 'local5X' || $kind eq 'local6X') { $script .= unshiftHereDoc(<<" End-of-Here"); - # VMplayer 3.X specific stuff + # Newer VMplayers specific stuff insmod ${modpath}/vmci.ko insmod ${modpath}/vmblock.ko insmod ${modpath}/vsock.ko @@ -452,7 +363,7 @@ sub _writeRunlevelScript if [ -n "\$vmnet0" ] ; then # the path might be directly point to the plugin dir End-of-Here - if ($kind eq 'vmpl1.0' || $kind eq 'vmpl2.0' || $kind eq 'local10' || $kind eq 'local20') { + if ($kind eq 'local10' || $kind eq 'local20') { $script .= " \$location/vmnet-bridge -d /var/run/vmnet-bridge-0.pid /dev/vmnet0 eth0\n"; } else { $script .= " \$location/vmnet-bridge -d /var/run/vmnet-bridge-0.pid -n 0\n"; @@ -513,7 +424,7 @@ sub _writeRunlevelScript vmnetif End-of-Here # start the USB arbitrator on higher VMware/player versions (3.0+) - if ($kind eq 'vmpl3.X' || $kind eq 'local3X' || $kind eq 'local4X' || $kind eq 'local5X') { + if ($kind eq 'local3X' || $kind eq 'local4X' || $kind eq 'local5X' || $kind eq 'local6X') { $script .= unshiftHereDoc(<<" End-of-Here"); vmblock End-of-Here @@ -550,7 +461,6 @@ sub _writeRunlevelScript spitFile("$self->{'pluginRepositoryPath'}/vmware-slx", $runlevelscript); } - # writes the wrapper script for vmware workstation and player, depending # on the flag. If player: just player wrapper, if ws: ws+player wrapper # usage: _writeWrapperScript("$vmpath", "$kind", "player") @@ -723,13 +633,15 @@ sub _localInstallation # VMplayer 2.5 } elsif ($vmversion eq "2.5" || $vmversion eq "6.5") { $kind="local25"; - # VMplayer 3.0, 3.1, 4.X, 5.X Workstation 7.0, 7.1, 8.X, 9.X + # VMplayer 3.0, 3.1, 4.X, 5.X, 6.X Workstation 7.0, 7.1, 8.X, 9.X, 10.X } elsif ($vmversion eq "3.0" || $vmversion eq "7.0" || $vmversion eq "3.1" || $vmversion eq "7.1") { $kind="local3X"; } elsif ($vmversion eq "4.0" || $vmversion eq "8.0") { $kind="local4X"; } elsif ($vmversion eq "5.0" || $vmversion eq "9.0") { $kind="local5X"; + } elsif ($vmversion eq "6.0" || $vmversion eq "10.0") { + $kind="local6X"; } # Create runlevel script depending on detected version $self->_writeRunlevelScript("$vmpath", "$kind"); @@ -751,7 +663,7 @@ sub _localInstallation copyFile("$pluginFilesPath/$file", "$self->{'pluginRepositoryPath'}/$kind"); } - } # else { TODO: errorhandling if file or string doesn't exist } + } ## creating needed config /etc/vmware/config $self->_writeVmwareConfigs("$kind", "$vmpath"); -- cgit v1.2.3-55-g7522