Howto Install VMware Server on Ubuntu 7.10

Quick how to on installing VMware server under Ubuntu.

#become root
sudo -i

Open file /etc/apt/sources.list You’ll see the following commented lines (starting at line 50):

# deb http://archive.canonical.com/ubuntu gutsy partner
# deb-src http://archive.canonical.com/ubuntu gutsy partner

Uncomment both of them by removing the leading # character. Save the file, exit. Update the cached package lists (this will add packages from the sources we added above):

apt-get update

Now we’re ready to install VMware. If you’re using 64-bit Ubuntu (which is my case), then some additional packages will be installed along with the VMware package. This is because VMware is a 32-bit binary and needs 32-bit libraries. But apt-get takes care of everything for us. Run:

apt-get install vmware-server

After the install, a text-mode wizard pops up. Press tab to go to ok, press enter to ok, enter for Yes, and then type a VMware serial number. You can get the serial number from http://register.vmware.com/content/registration.html. Make sure you select Linux in VMware’s page. I usually ask for 100 serial numbers in one shot, save them to a text file, and use them one at a time. Either way, get your number and enter it into the wizard.

VMware Server is now installed. Since it’s a server product you are not required to run the X Window System in the host machine (which I don’t). You can start, stop, suspend, tickle and fondle your virtual machines using the command-line binary /usr/bin/vmware-cmd. Sadly you do need a graphical interface when you first create a virtual machine. Hence you must run the VMware Server Console, which does require X or Microsoft Windows. In Linux, the binary for the VMware Server Console is /usr/bin/vmware. You have three options:

  1. Install X in the host machine itself (the one where we just installed VMware). I never install X on my servers, so this is not an option for me. But if the host machine already has X or if you don’t mind installing it, this is the easiest solution.
  2. Run VMware Server Console from another Linux box that does have X installed. You do need to install VMware in the remote machine to get the Console binary. If the remote machine is Ubuntu, you already know what to do :)
  3. Run VMware Server Console from a Microsoft Windows machine. Since MS-Windows is my desktop of choice, that’s what I do.

The upcoming VMware Server 2.0 has a web-based server console, so there will be no need worry about the console. Any machine with a browser will do (go VMware!). Also, the console is rarely used - pretty much only when you’re adding a new virtual machine. Now, there is a bug in the vmware-server package that prevents a remote VMware Server Console from connecting to the host machine. If you try that now, you’ll get the dreaded:

There was a problem connecting:
Login (username/password) incorrect

To troubleshoot this issue you would look into /var/log/auth.log. Here’s what happens when I do tail -f /var/log/auth.log and then try to connect remotely using VMware Server Console:

Mar 15 17:23:27 subhuman vmware-authd[4898]: PAM (vmware-authd) illegal module type: @include
Mar 15 17:23:27 subhuman vmware-authd[4898]: PAM pam_parse: expecting return value; [...common-auth]
Mar 15 17:23:27 subhuman vmware-authd[4898]: PAM (vmware-authd) no module name supplied
Mar 15 17:23:27 subhuman vmware-authd[4898]: PAM unable to dlopen(<*unknown module path*>)
Mar 15 17:23:27 subhuman vmware-authd[4898]: PAM [error: <*unknown module path*>: cannot open shared object file: No such file or directory]
Mar 15 17:23:27 subhuman vmware-authd[4898]: PAM adding faulty module: <*unknown module path*>

So it’s a PAM issue. It turns out the VMware server package installs a bad /etc/pam.d/vmware-authd file. Now, one of the best aspects of Ubuntu is its awesome community: you can google almost any problem and find an up-to-date, correct answer. This is true in this case, and the solution is given by Walter Tautz in the bug report for this issue. Edit /etc/pam.d/vmware-authd file and replace its contents with:

auth sufficient /usr/lib/vmware-server/lib/libpam.so.0/security/pam_unix.so shadow nullok
auth required /usr/lib/vmware-server/lib/libpam.so.0/security/pam_unix_auth.so shadow nullok
account sufficient /usr/lib/vmware-server/lib/libpam.so.0/security/pam_unix.so
account required /usr/lib/vmware-server/lib/libpam.so.0/security/pam_unix_acct.so
#%PAM-1.0
@include common-auth
@include common-account

And we’re done. You have VMware running and ready to go. Create virtual machines using the Console and manage them via /usr/bin/vmware-cmd.

Comments

8 Responses to “Howto Install VMware Server on Ubuntu 7.10”

  1. Roan on April 1st, 2008 11:32 am

    I’d highly recommend sticking with VMWare Server 1.0x for the moment. The 2.0 beta has some pretty significant issues, and the web based console isn’t particularly useful. It’s worse if you’re used to using the standalone console of the 1.0x series. There’s a ton of discussion on the VMWare beta forums of people complaining about the performance of the web client. And the package bug is why I’ve always installed from the tar files on Debian/Ubuntu. :)

  2. Gustavo Duarte on April 1st, 2008 12:01 pm

    Hi Roan, Absolutely, stick to 1.x for now everyone. I’ve experienced problems with the 2.0 betas as well when running Windows as a guest. Now, the tar files are absolute dogs to compile with the newer kernels, at least on x64. Even after applying patches I was not able to get a clean compile, and later had issues with the binaries I did manage to build. The package stuff has worked great other than the Console login issue. cheers, Gustavo

  3. Gustavo Duarte on April 1st, 2008 12:04 pm

    On the web console though… I usually never run anything other than the original guest OS install on the Console. I’m either in via RDP for Windows guests or SSH for Linux. If you actually rely on the Console to interact with the guests often, then I can see the web stuff being a pig. But for my usage pattern (ie, once in a while for the install) it’s nice to be able to hit VMWare with any computer that has a browser. But yea, people aren’t quite in love with the web stuff :)

  4. Roan on April 1st, 2008 2:02 pm

    We use a lot of VMWare stuff at the webhosting company that I work for, mostly ESX and a few 1.x installs for customers that didn’t want to buy this expensive stuff. The one thing that I like about the 2.x betas (just upgraded a few test machines to the beta 2 today) is that you’ll be able to manage it through the VI client that ESX comes with. But for occasional use the web interface is a nice idea. But yeah, I agree that you’re far better off using native remote connection over virtual consoles. Most of my stuff is linux and Oracle, so it’s ssh and VNC for me. :)

  5. Joe on May 6th, 2008 7:58 pm

    I ran into some issues actually after installing the application, the remote console still is unable to log in. Is there a service that needs restarted or anything else?

  6. Gustavo Duarte on May 6th, 2008 9:03 pm

    @Joe: there could be. What exactly happens when you try?

    The service that services remote console is called “vmware-authd”. It is started by xinetd, and its configuration file is:

    /etc/xinetd.d/vmware-authd

    xinetd should be listening on port TCP 902 for connections from VMware console. If you run “lsof -i” you should see TCP *:vmware-authd (LISTEN), which would tell you xinetd is configured properly. If you telnet straight into that port, VMware prints a string saying “VMware Authentication Daemon…”

    Check this stuff and let me know if you find anything out or order.

  7. Roxy on July 3rd, 2008 2:02 pm

    we install the server and it was working, but the people form out side cannot establish connection. therfore we add some static IP to the server and after that we cannot now inside, it said we are no allow to conect. could you give us a hint?

  8. Gustavo Duarte on July 9th, 2008 5:06 am

    @Roxy: sorry for the delay. What kind of tests have you run?

    In VMware discussions, ‘guest’ is the virtual machine and ‘host’ is the computer running VMware with the ‘guest’. With that in mind, here are some questions that might help:

    Can you ping the guest from the host machine? If not, what is the error message?

    Can you ping the guest from outside machines? If not, what is the error message?

    Have you chosen the ‘bridged’ networking option for the guest? This makes the guest work almost like a separate device on the network, fully accessible.

Leave a Reply