summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware
diff options
context:
space:
mode:
authorVolker Uhrig2008-06-08 01:34:36 +0200
committerVolker Uhrig2008-06-08 01:34:36 +0200
commit02c1f9b473d6c8718d0493ac03526b737b468ab2 (patch)
tree71a51e7cfb963b1fe679a02e0c214d22e822482d /os-plugins/plugins/vmware
parent* finished implementation of vmpl2.0 installation (diff)
downloadcore-02c1f9b473d6c8718d0493ac03526b737b468ab2.tar.gz
core-02c1f9b473d6c8718d0493ac03526b737b468ab2.tar.xz
core-02c1f9b473d6c8718d0493ac03526b737b468ab2.zip
* removing deprecated client-config.xml. we hand over the xml itself.
needed information are now added by vmchooser (will be then also available for other, in the future developed, virtual machines) * added _untested_ code for installation of vmplayer1. If it works out we can merge it with our vmpl2.0 code * vmware has also 64bit packages... so we need to find a 64bit compiler solution for translation of kernel modules on chrooted vendorOSes running on 32bit OpenSLX servers;-) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1860 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware')
-rw-r--r--os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm59
-rw-r--r--os-plugins/plugins/vmware/files/README5
-rw-r--r--os-plugins/plugins/vmware/files/client-config.xml.default8
-rw-r--r--os-plugins/plugins/vmware/files/install-vmpl1.0.sh108
4 files changed, 167 insertions, 13 deletions
diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
index 2786594b..59364747 100644
--- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
+++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm
@@ -167,6 +167,17 @@ sub getAttrInfo
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',
+ },
# ** 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'
@@ -196,6 +207,9 @@ sub installationPhase
if ($self->{attrs}->{'vmware::vmpl2.0'} == 1) {
$self->_vmpl2Installation();
}
+ if ($self->{attrs}->{'vmware::vmpl1.0'} == 1) {
+ $self->_vmpl1Installation();
+ }
## prepration for our faster wrapper script
# rename the default vmplayer script and create a link.
@@ -468,4 +482,49 @@ sub _vmpl2Installation {
}
+sub _vmpl1Installation {
+ my $self = shift;
+
+ my $kind = "vmpl1.0";
+ my $vmpath = "/opt/openslx/plugin-repo/vmware/$kind/root/lib/vmware";
+ my $vmbin = "/opt/openslx/plugin-repo/vmware/$kind/root/bin";
+ my $vmversion = "TODO_we_need_it_for_enhanced_runvmware_config_in_stage?";
+ my $vmbuildversion = "TODO_we_need_it_for_enhanced_runvmware_config_in_stage1";
+
+ my $pluginFilesPath
+ = "$self->{'openslxBasePath'}/lib/plugins/$self->{'name'}/files";
+ my $installationPath = "$self->{'pluginRepositoryPath'}/$kind";
+
+ mkpath($installationPath);
+
+ ##
+ ## Copy needed files
+
+ # copy 'normal' needed files
+ my @files = qw( nvram.5.0 install-vmpl1.0.sh );
+ foreach my $file (@files) {
+ copyFile("$pluginFilesPath/$file", "$installationPath");
+ }
+ # copy on depending runvmware file
+ copyFile("$pluginFilesPath/runvmware-player-v1", "$installationPath", "runvmware");
+
+ ##
+ ## Download and install the binarys
+ system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/$kind/install-$kind.sh");
+
+ ##
+ ## Create runlevel script
+ my $runlevelScript = "$self->{'pluginRepositoryPath'}/$kind/vmware.init";
+ $self->_writeRunlevelScript($vmbin, $runlevelScript);
+
+ ##
+ ## Create wrapperscripts
+ $self->_writeWrapperScript("$vmpath", "$kind", "player");
+
+ ##
+ ## Creating needed config /etc/vmware/config
+ $self->_writeVmwareConfig("$kind", "$vmpath");
+
+}
+
1;
diff --git a/os-plugins/plugins/vmware/files/README b/os-plugins/plugins/vmware/files/README
index 5fde5948..44c883ac 100644
--- a/os-plugins/plugins/vmware/files/README
+++ b/os-plugins/plugins/vmware/files/README
@@ -7,11 +7,6 @@ files aren't needed any more!!
Files
-- client-config.xml.default
- Describes how the xml config needs to look like which will be used by
- the Virtual Machine (see nvram below). Currently used internal and
- shouldn't affect normal OpenSLX users. Data will be available on every
- OpenSLX Client.
- nvram.5.0
This nvram supports a second Floppy drive. Helpfull if you want to
get some data from linux to your Windows VirtualMachine (like
diff --git a/os-plugins/plugins/vmware/files/client-config.xml.default b/os-plugins/plugins/vmware/files/client-config.xml.default
deleted file mode 100644
index f1612fc9..00000000
--- a/os-plugins/plugins/vmware/files/client-config.xml.default
+++ /dev/null
@@ -1,8 +0,0 @@
-<settings>
- <eintrag>
- <computername param="HOSTNAME">
- </computername>
- <username param="USER">
- </username>
- </eintrag>
-</settings>
diff --git a/os-plugins/plugins/vmware/files/install-vmpl1.0.sh b/os-plugins/plugins/vmware/files/install-vmpl1.0.sh
new file mode 100644
index 00000000..a733031a
--- /dev/null
+++ b/os-plugins/plugins/vmware/files/install-vmpl1.0.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+vmplversion="vmpl1.0"
+url=http://download3.vmware.com/software/vmplayer/VMware-player-2.0.4-93057.i386.tar.gz
+
+echo "This script will download and install vmplayer from http://www.vmware.com/"
+echo "Please go to http://vmware.com/download/player/player_reg.html"
+echo "and ..."
+echo " * complete this registration form"
+echo " * click on \"Download Now\""
+echo " * read and decide if you want to accept the VMware master end user license agreement"
+echo
+echo "If you have done this and accepted the enduser licence type in yes in uppercase."
+echo "This will install vmplayer on your vendor-os. If you don't agree this license"
+echo "vmplayer won't be installed."
+echo
+read
+echo
+
+if [ "${REPLY}" == "YES" ]; then
+
+ echo " * Downloading vmplayer as ${vmplversion} now. This may take a while"
+ cd /opt/openslx/plugin-repo/vmware/${vmplversion}
+ wget -c ${url}
+
+ echo " * Unpacking vmplayer"
+ tar xfz VMware-player-2.0.4-93057.i386.tar.gz
+
+ echo " * copying files..."
+ mkdir root
+ mkdir -p root/lib
+ mv vmware-player-distrib/lib root/lib/vmware
+ mv vmware-player-distrib/bin root/
+ mv vmware-player-distrib/sbin root/
+ mv vmware-player-distrib/doc root/
+ rm -rf vmware-player-distrib/
+
+ # I don't want to understand what vmware is doing, but without this
+ # step we need to have LD_LIBRARY_PATH with 53 entrys. welcome to
+ # library hell
+ echo " * fixing librarys..."
+ cd root/lib/vmware/lib
+ mkdir test
+ mv lib* test
+ mv test/lib*/* .
+ cd ../../../..
+
+ echo " * fixing gdk and pango config files"
+ sed -i \
+ 's,/build/mts/.*/vmui/../libdir/libconf,/opt/openslx/plugin-repo/vmware/${vmplversion}/root/lib/vmware/libconf,' \
+ root/lib/vmware/libconf/etc/gtk-2.0/gdk-pixbuf.loaders
+ sed -i \
+ 's,/build/mts/.*/vmui/../libdir/libconf,/opt/openslx/plugin-repo/vmware/${vmplversion}/root/lib/vmware/libconf,' \
+ root/lib/vmware/libconf/etc/gtk-2.0/gtk.immodules
+ sed -i \
+ 's,/build/mts/.*/vmui/../libdir/libconf,/opt/openslx/plugin-repo/vmware/${vmplversion}/root/lib/vmware/libconf,' \
+ root/lib/vmware/libconf/etc/pango/pango.modules
+ sed -i \
+ 's,/build/mts/.*/vmui/../libdir/libconf,/opt/openslx/plugin-repo/vmware/${vmplversion}/root/lib/vmware/libconf,' \
+ root/lib/vmware/libconf/etc/pango/pangorc
+ sed -i \
+ 's,/etc/pango/pango/,/etc/pango/,' \
+ root/lib/vmware/libconf/etc/pango/pangorc
+
+ echo " * creating /etc/vmware"
+ mkdir -p /etc/vmware
+
+ echo " * unpacking kernel modules"
+ cd root/lib/vmware/modules/source
+ tar xf vmnet.tar
+ tar xf vmmon.tar
+ tar xf vmblock.tar
+
+ echo " * building vmblock module"
+ cd vmblock-only/
+ # TODO: check if /boot/vmlinuz is available if we get the kernel version this way
+ # perhaps we don't need a check... perhaps openslx always use
+ # /boot/vmlinuz
+ # This problem happens 3 times. see below!
+ # TODO: error check if build environment isn't installed...
+ sed -i "s%^VM_UNAME = .*%VM_UNAME = $(ls /boot/vmlinuz*|grep -v -e "^/boot/vmlinuz$$"|sed 's,/boot/vmlinuz-,,'|sort|tail -n 1)%" Makefile
+ make -s
+ cd ..
+
+ echo " * building vmmon module"
+ cd vmmon-only
+ sed -i "s%^VM_UNAME = .*%VM_UNAME = $(ls /boot/vmlinuz*|grep -v -e "^/boot/vmlinuz$$"|sed 's,/boot/vmlinuz-,,'|sort|tail -n 1)%" Makefile
+ make -s
+ cd ..
+
+ echo " * building vmnet module"
+ cd vmnet-only
+ sed -i "s%^VM_UNAME = .*%VM_UNAME = $(ls /boot/vmlinuz*|grep -v -e "^/boot/vmlinuz$$"|sed 's,/boot/vmlinuz-,,'|sort|tail -n 1)%" Makefile
+ make -s
+ cd ../../../../../..
+
+ echo " * setting up EULA"
+ mv root/doc/EULA root/lib/vmware/share/EULA.txt
+
+ # TODO: remove. just for debug reasons
+ #echo "Press any return to process"
+ #read
+
+ echo " * finishing installation"
+
+else
+ echo "You didnt't accept the end user license. vmplayer is not installed."
+fi