How to Install and Configure VMware on SLED
Novell Cool Solutions: AppNote
By Dave Simons
Digg This -
Posted: 25 Oct 2007
In this article I will show you how to install and configure the free VMware server from VMware. A lot of people will use VMware, I'm sure of that, but have you ever run it on SLED? I must tell you that it runs perfectly and very fast. Much faster and stable than on Windows XP!!!
The first thing to do is to download the VMware server package from the VMware website.
Accept the license agreement and download the VMware Server for Linux Binary (.rpm) to your desktop.
Now run the rpm from a terminal window.
Make sure you are logged in as root by entering su in the terminal windows
cd directory to the Desktop
Now instal the vmware rpm. This can be done by entering this command:
rpm -i VMware-server-1.0.4-56528.i386.rpm
In my case you see that I already installed the VMware Server but you will see something like: Installation ready.
After you install the VMware Server, you will have to configure it. This can be done with this command:
vmware-config.pl, run it in a terminal window:
You will see the first question, hit enter to continue
- In which directory do you want to install the mime type icons?
- What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]
- In which directory do you want to install the application's icon?
- Try to find a suitable vmmon module for your running kernel.
None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes]
- Using compiler "/usr/bin/gcc". Use environment variable CC to override.
What is the location of the directory of C header files that match your running kernel? [/lib/modules/220.127.116.11-0.12-smp/build/include]
- Shutting down http.vmware: done
Starting httpd.vmware: done
Please specify a port for remote console connections to use 
- Do you want this program to set up permissions for your registered virtual machines? This will be done by setting new permissions on all files found in the "/etc/vmware/vm-list" file. [no]
- In which directory do you want to keep your virtual machine files?
- Do you want to enter a serial number now? (yes/no/help) [Yes]
You can get a serial number from the VMware download page.
Now you have a VMware Server installed on your SLED system, lets see if we can start the GUI.
Close the Terminal window.
If everything went well, you should have an icon on your Desktop named VMware Server Console, double click it to open it.
Now you have to click connect. The VMware Server Console will connect to the local VMware Server.
After you click on connect, you will see a screen like this.
I already have some Virtual servers running so they are in my Inventory list.
Now you are ready to install the Virtual servers. In this article, I will not go into detail on how to do this.
Remotely control VMware Server machines
The ability of VMware Server to run virtual machines "behind-the-scenes" is great. This means you no longer have to have the GUI screen open on your desktop taking up valuable screen real-estate. It also means that you can switch your virtual machines to another machine that is constantly up and have your virtual machines available to you at any time, keeping them up and running around the clock. Running the server without a GUI interface makes it more difficult to control the machines, but with a little effort, you can get the same functionality via the command line. You will still want the GUI in order to change configuration options and create new machines, however.
The vmware-cmd program is your gateway to controlling virtual machines.
Lets see how to use the vmware-cmd.
I have a virtual machine installed in the directory: /home/dsimons/Virtual Machines/DA1-LINUX.
The name of the VM is also DA!-LINUX.
To see in what state this VM is, enter this command from the root:
vmware-cmd /home/dsimons/Virtual Machines/DA1-LINUX/sles.vmx getstate
As you can see the vm is down. Also, when you open the VMware Server client, you will see that the VM is down.
To start the VM from the terminal window, enter this command:
vmware-cmd /home/dsimons/Virtual Machines/DA1-LINUX/sles.vmx start
After a couple of seconds you will see the above screen. Now the VM is powered on.
Lets see the VMware Server client.
As you can see the VM is starting.
You can also suspend the VM. To do that, enter this command:
vmware-cmd /home/dsimons/Virtual Machines/DA1-LINUX/sles.vmx suspend
When you now look in the Vmware client you will see that the VM is suspended.
Looking at the output of vmware-cmd -h will give you a lot of other options that you can play with to manipulate virtual machines.
Usage: /usr/bin/vmware-cmd <options> <vm-cfg-path> <vm-action> <arguments> /usr/bin/vmware-cmd -s <options> <server-action> <arguments> Options: Connection Options: -H <host> specifies an alternative host (if set, -U and -P must also be set) -O <port> specifies an alternative port -U <username> specifies a user -P <password> specifies a password General Options: -h More detailed help. -q Quiet. Minimal output -v Verbose. Server Operations: /usr/bin/vmware-cmd -l -- lists the registered VMs /usr/bin/vmware-cmd -s register <config_file_path> -- registers a VM /usr/bin/vmware-cmd -s unregister <config_file_path> -- unregisters a VM /usr/bin/vmware-cmd -s getresource <variable> -- retrieves a server resource /usr/bin/vmware-cmd -s setresource <variable> <value> -- sets a server resource VM Operations: /usr/bin/vmware-cmd <cfg> getconnectedusers /usr/bin/vmware-cmd <cfg> getstate -- gets the execution state of the VM /usr/bin/vmware-cmd <cfg> start <powerop_mode> -- powers on or resumes a VM /usr/bin/vmware-cmd <cfg> stop <powerop_mode> -- stops a VM /usr/bin/vmware-cmd <cfg> reset <powerop_mode> -- resets a VM /usr/bin/vmware-cmd <cfg> suspend <powerop_mode> -- suspends a VM /usr/bin/vmware-cmd <cfg> setconfig <variable> <value> -- sets a configuration variable /usr/bin/vmware-cmd <cfg> getconfig <variable> -- retrieves the value for a configuration variable /usr/bin/vmware-cmd <cfg> setguestinfo <variable> <value> -- sets a guest info variable /usr/bin/vmware-cmd <cfg> getguestinfo <variable> -- retrieves the value for a guest info variable /usr/bin/vmware-cmd <cfg> getid -- retrieves the VM id /usr/bin/vmware-cmd <cfg> getpid -- retrieves the process id of the running VM /usr/bin/vmware-cmd <cfg> getproductinfo <prodinfo> -- gets various product information /usr/bin/vmware-cmd <cfg> connectdevice <device_name> -- connects a virtual device to a VM /usr/bin/vmware-cmd <cfg> disconnectdevice <device_name> -- disconnects a virtual device from a VM /usr/bin/vmware-cmd <cfg> getconfigfile -- retrieves the path to the configuration file /usr/bin/vmware-cmd <cfg> getheartbeat -- retrieves the heartbeat value of the guest OS /usr/bin/vmware-cmd <cfg> getuptime -- retrieves the uptime of the guest OS /usr/bin/vmware-cmd <cfg> getremoteconnections -- retrieves the number of remote connections to a VM /usr/bin/vmware-cmd <cfg> gettoolslastactive -- retrieves the number of seconds since last notification from the tools /usr/bin/vmware-cmd <cfg> getresource <variable> -- retrieves a VM resource /usr/bin/vmware-cmd <cfg> setresource <variable> <value> -- sets a VM resource /usr/bin/vmware-cmd <cfg> setrunasuser <username> <password> -- sets the user that the VM runs as /usr/bin/vmware-cmd <cfg> getrunasuser -- retrieves the user that the VM runs as /usr/bin/vmware-cmd <cfg> getcapabilities -- retrieves the access permissions of the current user on a VM /usr/bin/vmware-cmd <cfg> addredo <disk_device_name> -- adds a redo log to a virtual disk /usr/bin/vmware-cmd <cfg> commit <disk_device_name> <level> <freeze> <wait> -- commits the redo log of a virtual disk /usr/bin/vmware-cmd <cfg> answer -- answers a question for a VM requesting input
I will not go into all the option above, but the ability to start, suspend, and stop virtual machines from the command line (or a script) is perhaps vmware-cmd's most useful feature.
There is also a web GUI you can install on SLED. This is a web client that can do almost the same. Download the rpm from:
Download the management interface and save it to a directory on SLED.
Open the terminal window and browse to the directory where you saved the VMware GUI. Now extract the file with this command
tar -zxvf Vmware-mui-1.0.4-56528.tar.gz
A directory vmware-mui-distrib will be created and all of the needed files will be placed in here.
Change to that directory and enter:
Press enter and "Q" to accept the license agreement. The screen below will come up.
Enter YES and hit enter.
Now hit enter a couple of times until you see:
The configuration of VMware Management Interface completed successfully.
Now that the VMware Management Interface is installed. lets see if we can open it.open your web browser and go to the URL: https\\localhost:8333
Accept the certificates and you will see the login screen.
Now login with the root user.
As you can see I have one server in suspend mode. You can also see the Memory and CPU usage of the SLED Host.
If you play a bit white this web interface you will see that its not to hard to learn. If you configure you router you now can also manage you Vmware machines you any PC with a Internet connection.
As you can see it is not to difficult to install and configure VMware Server on SLED.
There are some tricky things you need to know. After I installed th VMware Server on my SLED, I could not browse to an existing VM.
After doing this from a terminal window:
cd /usr/lib/vmware/lib/libpng12.so.0 mv libpng12.so.0 libpng12.so.0.old ln -sf /usr/lib/libpng12.so.0 libpng12.so.0 cd /usr/lib/vmware/lib/libgcc_s.so.1 mv libgcc_s.so.1 libgcc_s.so.1.old ln -sf /lib/libgcc_s.so.1
I was able to browse again!!
So, I hope that if you have not already installed VMware Server on SLED, you are now a step closer to starting. VMware Server really runs very smoothly on SLED.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com