Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

HOWTO generate a vmware deb package, and install it

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

HOWTO generate a vmware deb package, and install it

#1 Post by domecq »

This howto will guide on how to generate a "deb" package, and install it.
I translated this from a French document.
I also adapted a few things, from the original document, which was made for Ubuntu, into Debian Etch.
Because a simple alien --to-deb <rpm package> conversion won't work at all, a few things described in this howto would make it work.
Also, once the deb package is generated, it is necessary to run its installation via a 3rd-party script, what is also described here.

The original French document can be found here.


Pre-requisites
build-essential
gcc
g++
Linux headers
xserver-xorg-video-vmware

What to do
Obtain the vmware (workstation, not the player) rpm package
Open a terminal, and log as root
cd to the directory where you have the rpm
Enter this command: alien --to-deb --generate --scripts --fixperms <vmware rpm package>
Remark: this command will create a directory with all the "sources" of the future debian package.
cd to that directory (usually it starts with "VMwareWorkstation" so you could tab-complete that).

Now we will modify a few scripts that pose some issues when installing and updating this package.

We will start editing the pre-installation script:
With your favorite editor, open debian/preinst
Add the following line:
VMWARE_RPM_VERBOSE='yes'
After the lines that start with something similar to:
# BEGINNING_OF_TMPDIR_DOT_SH
#!/bin/sh
Remark: these lines usually are 15 and 16.
Save debian/preinst

Now, we will edit the pre-suppression script:
Again, with your favorite editor, open debian/prerm
Add the line:
VMWARE_RPM_VERBOSE='yes'
After the line:
instances="$1"
Change this last line to:
instances=0
Save debian/prerm

And the last edition we do is in the post-suppression script:
This is identical to the edition made in the pre-suppression script
With the editor, open debian/postrm
Add the line:
VMWARE_RPM_VERBOSE='yes'
After the line:
instances="$1"
Change this last line to:
instances=0
Save debian/postrm

Now, let's create the deb package
Enter dpkg-buildpackage
Wait for a few minutes while the package is being created.
Don't worry with the warnings that might be displayed, they are not very significant.
Once the package is created, go to the parent directory (cd ..).

Now install the package
dpkg -i <package name>

Don't run it yet, it has to be configured.
To configure it, it's necessary to obtain an 3rd-party script, and run it.
That 3rd-party script is inside the tarfile: vmware-any-any-update104.tar.gz
That tarfile can be obtained here
Suggestion: You can download that tar file by doing the following:
Open another terminal. No need to log as root, and enter the following

Code: Select all

wget http://platan.vc.cvut.cz/ftp/pub/vmware/vmware-any-any-update104.tar.gz
Untar that file (tar xvzf vmware-any-any-update104.tar.gz)
As root, go to the directory you untarred (vmware-any-any-update104)
Run ./runme.pl
Remark: pay attention because you will have to accept the terms of vmware company that will be shown to you.
Once this is done, still as root, you can set vmware to be allowed its execution as root (necessary for it to run well), by entering:
chmod +s /usr/lib/vmware/bin/vmware-vmx

Advanced Configuration (copied from this webpage)

Once running VMWare offers some configuration options, like tuning the amount of memory allocated to VMs. By default it grabs lots of physical memory; unless you are going to run lots of VM images side-by-side, this is too much. You can change the memory allocation in the GUI, but you cannot save the settings unless you have write access to the relevant directory. You will know if you don't, as you will get an error message about not being able to get a lock "Unable to save changes to settings: Failed to obtain a write lock on the file /etc/vmware/config."

As root, go to that directory and make the contents world writeable as shown:

Code: Select all

# cd /etc/vmware/
# chmod o+w . *
Then, try to save the settings again, then, make the directory secure by typing:

Code: Select all

# chmod o-w . *
You will find the following 2 new entries, in Gnome, under Applications ⇒ System Tools
VMWare Player
VMWare Workstation

Removing or update issues
If you come accross any problem related to removal/update, you can do, as root, the following:
rm -r /etc/vmware
apt-get remove vmwareworkstation

If you get no errors, vmware will be uninstalled from your system.

Cheers,

domecq[/code]
Last edited by domecq on 2006-11-11 17:38, edited 1 time in total.

mikekgr
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

#2 Post by mikekgr »

Dear domecq,
many thanks for you excellent howto.
I did successfully already!

Best Regards,
Mike Kranidis

P.S. In case that some body (me to another pc box) have vmware installed following vmware installer (not as deb package), is there any easy way to uninstall the vmware installation and install then the deb package???).

mikekgr
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

In case that vmware does not start...

#3 Post by mikekgr »

Please follow this thread :

http://kanotix.com/PNphpBB2-viewtopic-t ... mware.html

(or read my copy bellow)
========= Quote =========
open /usr/lib/vmware/lib/wrapper-gtk24.sh as root.
search for the lines
Code:
vm_run() {
local exitCode;


add:

Code:
# Fix for vmplayer pulling in libdbus-1.so.2 instead of .3
export LD_PRELOAD=/usr/lib/libdbus-1.so.3:$LD_PRELOAD


so your new /usr/lib/vmware/lib/wrapper-gtk24.sh looks like this:

Code:
# Run "$binary" while watching its progress on its stderr.
vm_run() {
local exitCode;

# Fix for vmplayer pulling in libdbus-1.so.2 instead of .3
export LD_PRELOAD=/usr/lib/libdbus-1.so.3:$LD_PRELOAD

# Append any libraries that are still missing.
if [ "$VMWARE_USE_SHIPPED_GTK" = 'force' ]; then


now you can have installed libdbus-1-2/3 at the same time and vmware will run, too.

======= UnQuote =======

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#4 Post by domecq »

mikekgr wrote:P.S. In case that some body (me to another pc box) have vmware installed following vmware installer (not as deb package), is there any easy way to uninstall the vmware installation and install then the deb package???).
Try to cd to the directory parent (or above) of the one created after untarring the vmware, and enter this command:
rm -fr <name of that vmware directory>
I hope that this works.

Cheers,

domecq

mikekgr
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

#5 Post by mikekgr »

OK. I will try it!

Again Best Regards,
Mike

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

resolving a sound problem with esd

#6 Post by domecq »

I came across the problem of having no sound in Windows emulated by VMWare in Gnome, having received the message:

Failed to open sound device /dev/dsp: Device or resource busy
Failed to connect virtual device sound.


I found the following workaround, from this vmware page.

The idea behind this workaround is to install a wrapper and start vmware workstation from a different command that adds that wrapper.

This also resolves the same issue for arts, in KDE.

That page mentions about 2 limitations:
* No volume control.
* No recording.

I tested volume control, and it worked for me. I didn't bother to see recording.
I'd add another limitation: this allows vmware to start ONLY from the workstation. I could not figure out how it could start from the vmplayer.

Pre-requisites:
Install either mod-esddsp-ws3.gz or vmwaredsp-1.3.tgz.
mod-esddsp-ws3.gz is for VMWare Workstation version 3.x.
vmwaredsp-1.3.tgz is for VMWare Workstation versions 4.x and 5.x

Both can be downloaded from the same vmware page mentioned above.

Setting up:
As root, extract the tar file, look for runme.sh inside the directory that is created, and run it by entering:

Code: Select all

./runme.sh
Start Workstation (no need to be root at this point) using the appropriate wrapper, depending on which sound drivers you have installed.
* vmwarearts (for ARTS - KDE - support)
* vmwareesd (for ESD -Gnome - support)

Cheers,

domecq

nunana
Posts: 1
Joined: 2006-12-10 19:48

vmware:9406

#7 Post by nunana »

VMware workstation 5.5.3 on Debian Etch.

Pre-requisites:
build-essential
gcc
g++
Linux headers
xserver-xorg-video-vmware

Download VMware-workstation-5.5.3-34685.tar.gz from the VMware site
tar xzvf VMware-workstation-5.5.3-34685.tar.gz
cd vmware-distrib
./vmware-install.pl

Make sure you are the owner (instead of root) of the vmware directory where your guest OS is saved.

I started VMware from a terminal with:
/usr/bin/vmware

browsing for files in VMware, hangs VMware and gives in the terminal this:

(vmware:9406): libgnomevfs-WARNING **: Cannot load module `/usr/lib/gnome-vfs-2.0/modules/libfile.so' (/usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6))

solution(1):
start vmware with:
VMWARE_USE_SHIPPED_GTK=yes vmware

solution(2):
add next line to your .basrc
export VMWARE_USE_SHIPPED_GTK=yes

I put solution(1) in a shell-script which I start from Apllications, System Tools, VMware workstation

User avatar
ChrisW
Posts: 34
Joined: 2007-03-01 11:40
Location: Manchester, UK

...also works for VMplayer v2.0.1

#8 Post by ChrisW »

Domecq, Thank you for this useful Howto.

I've got the method you describe to work with a few minor modifications for VMplayer v2.0.1 on Debian Etch.

I followed the original with the following exceptions:

1) Download the VMplayer rpm (I used the latest which was v2.0.1)

2) DON'T USE the 3rd-party script <vmware-any-any-update???> as advised in original howto
this did'nt produce usable modules for me
instead do: as root run:
/usr/bin/vmware-config.pl
I accepted all the defaults the script offered.
this version (v2.0.1) does not require you to accept the terms of vmware company
(as advised in original howto) at this point, you have to accept this the 1st time you run VMplayer in a user ID

3) The EULA file did not get unpacked properly by the package install so:
a) unpack: /usr/share/doc/vmware/EULA.gz
b) make a symlink from the unpacked file:
/usr/share/doc/vmware/EULA
to:
/usr/lib/vmware/share/EULA.txt

jackroth
Posts: 5
Joined: 2007-10-14 14:31
Location: US

New

#9 Post by jackroth »

I must be incredibly stupid, or whatever. I follow the instructions and 2 directories are created when I perform the alien --.........vmwarepkg, one says 'original'.
Then I change the 3 files (that is literally stating to change that to a 0, not '$0' ?), and then I perform the dpkg-buildpackage and I get a vm*.deb generated, but when I attempt the dpgk -i vm*.db, it states an installation of vmware has been detected and fails.
I'd appreciate any pointers here. I started out with Debian, but then have been out of Linux for a couple of years, so I'm just getting back into it, much has been forgotten.

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#10 Post by Harold »

Harold, wearing his moderator hat...

Jackroth: As stated in the forum index, the Docs, Howtos, Tips & Tricks forum is not for support questions. Your question was moved to http://forums.debian.net/viewtopic.php?t=20279

jackroth
Posts: 5
Joined: 2007-10-14 14:31
Location: US

Thanks

#11 Post by jackroth »

Thanks Harold. It really didn't seem to matter much as far as a response. How difficult would that have been ? For someone to have posted a simple reply.
You can be so big on rules that you forget the whole reason of why forums are created. Normally, there's at least one extremely friendly person who will move a thread like this and if possible, give some type of answer.
I really didn't think I was on the OpenBSD forum.

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#12 Post by Harold »

If there has not been a response to your question, then it is because no-one who has yet read the question has a helpful response,

Please read the forum description on the forums index page:
Docs, Howtos, Tips & Tricks
Share your own howto's etc. Not for support questions!

Post Reply