|
VMware is a commercial PC emulator running on i386 compatible cpus. It allows you to run any x86 compatible OS in a kind of 'sandbox' - inside the VMware virtual machine you can run other operating systems like Windows or some other version of Linux. Both Windows and a Linux versions are available. |
For free software alternatives see our SystemVirtualization section.
A zero-cost version called VMware Server and Management Console is available at http://www.vmware.com/download/server/ .
Other zero-cost VMware software that allows you to convert your physical OS to a virtual environment OS can be found here: http://www.vmware.com/products/converter/ .You can use it for example to convert your Windows NT, XP, Server 2000/2003,Vista installation to a vmware virtual environment.
Commercial products like the VWware Workstation is available for both Linux, and starts at about 200 US dollars, see http://www.vmware.com/vmwarestore/pricing.html.
VMware is not a true emulator, it doesn't emulate a CPU like Bochs does, it wraps CPU commands around... It does emulate various hardware devices like network-, graphic- and sound cards.
VMware Installation Instructions
- Very good how-to which takes you through step by step instructions in order to install vmware on debian and then windows xp as a guest os.
License Keys
To enter Serial Number you can click on Help->Enter Serial Number or you can run:
/usr/lib/vmware/bin/vmware-vmx --new-sn 123-123-123-123...123
VMware on amd64
- In order to install vmware on amd64 you have to install few extra libs:
aptitude install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc build-essential ia32-libs
VMware, Debian Kernel Upgrade
On an apt-get upgrade when your kernel has been updated you need to download the kernel headers and reconfigure vmware.
apt-get update apt-get install linux-headers-$(uname -r) /usr/bin/vmware-config.pl
VMware, Etch to Lenny upgrade
There is a incompatibility issue with a kernel shipped via lenny and vmware servers: 1.04, 1.05. 1.07 was shown to work for some users after applying the any-any patch
For the users who do not have 1.07 or higher or cannot get vmware working even with the patch you will need to upgrade to vmware server 2.0.
- Before you install you need to do the following:
aptitude update aptitude install gcc-4.1
- This is the version of the gcc that the kernel was build and vmware needs it. Lets provide a shell variable so vmware knows which gcc to use:
export CC=/usr/bin/gcc-4.1 echo $CC
Vmware should be ready to install. run ./vmware-install.pl. Adjust the "where you want to store you vmware servers" path as prvious releases used /var/vmware and a new one uses /var/lib/vmware
- You can accept all the defaults.
Please remember the port you have used for http. The new vmware server 2.0 does not provide gui anymore, you need to access it through your http://127.0.0.1:portnumber/ui/
Installing VMware Server 2 on Lenny
Howto install VMware Server 2 on Debian Lenny. Since kernel modules for the Lenny Kernel are not shipped with VMware server 2, the kernel modules need to be build. However, there is a bug in the file vmware-config.pl. See here for more details. The patch available for Ubuntu works for Debian Lenny too. You can chooose to follow this instructions to install correctly VMWare Server 2.0.x into Debian Lenny. Before you install you need ensure that thefollowing dependencies are installed into your system:
binutils gcc libc6 libc6-dev make linux-headers-2.6.26-2-amd64 (or other version according to your installed kernel. Use "uname -a" to get you kernel version) psmisc
Download vmware server 2 from VMware - Official Site and register to obtain your licence key.
Unzip the tar.gz
tar -zxvf VMware-server-2.0.x-xxx.tar.gz cd vmware-server-distrib/
let the installer use gcc 4.1 and not gcc 4.3 and run the installer
export CC=/usr/bin/gcc-4.1 ./vmware-install.pl
Probably you will receive an error in building the vsock module:
... Unable to make a vsock module that can be loaded in the running kernel: insmod: error inserting '/tmp/vmware-config5/vsock.o' ...
To avoid this problem and build correctly the vsock module, you will need to create and apply a patch. Create a vmware-config.pl-patch
nano vmware-config.pl.patch
paste the following text into the editor:
--- /usr/bin/vmware-config.pl.orig 2008-11-28 12:06:35.641054086 +0100
+++ /usr/bin/vmware-config.pl 2008-11-28 12:30:38.593304082 +0100
@@ -4121,6 +4121,11 @@
return 'no';
}
+ if ($name eq 'vsock') {
+ print wrap("VMWare config patch VSOCK!\n");
+ system(shell_string($gHelper{'mv'}) . ' -vi ' . shell_string($build_dir . '/../Module.symvers') . ' ' . shell_string($build_dir . '/vsock-only/' ));
+ }
+
print wrap('Building the ' . $name . ' module.' . "\n\n", 0);
if (system(shell_string($gHelper{'make'}) . ' -C '
. shell_string($build_dir . '/' . $name . '-only')
@@ -4143,6 +4148,10 @@
if (try_module($name, $build_dir . '/' . $name . '.o', 0, 1)) {
print wrap('The ' . $name . ' module loads perfectly into the running kernel.'
. "\n\n", 0);
+ if ($name eq 'vmci') {
+ print wrap("VMWare config patch VMCI!\n");
+ system(shell_string($gHelper{'cp'}) . ' -vi ' . shell_string($build_dir.'/vmci-only/Module.symvers') . ' ' . shell_string($build_dir . '/../'));
+ }
remove_tmp_dir($build_dir);
return 'yes';
}save the file and apply the patch:
patch /usr/bin/vmware-config.pl vmware-config.pl.patch
now you can re-run the installed vmware-config.pl and build correctly the vsock module:
cd /usr/bin/ ./vmware-config.pl
Once you are done with no errors, you can check that all vmware's modules are loaded corretly:
# lsmod | grep v vmnet 43460 13 vsock 26032 0 vmci 52904 1 vsock vmmon 72144 0
VMWare server 2 web interface problems
People find that that the Vmware Server 2 web interface stops responding properly (Browsing the datastore, adding hardware to a virtual machine). Perhaps this problems are caused by Java runtime environment (JRE) shipped with VMware which can be found in the directory vmware/webAccess/java/jre1.5.0_15. The JRE in this directory can be updated with a newer one. However, the file vmware/webAccess/java/jre1.5.0_15/bin/webAccess needs to be retained. Otherwise the web interface would not work. See Constant NullPointerException: Operation failed. errors in web UI.
Scripts to start and stop the VMWare server 2 Web Interface
If you don't manage your virtual machines everyday you should consider to free you ram by turning off the Web Interface.
# nano vmware-stopWebAccess
and paste the following code
# Web Access configuration webAccess="/usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess" watchdog="/usr/bin/vmware-watchdog" webAccessServiceName="VMware Virtual Infrastructure Web Access" CATALINA_HOME="/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16" webAccessOpts="-client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed -classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-logging-api.jar -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$CATALINA_HOME/temp org.apache.catalina.startup.Bootstrap" echo 'Shut down the webAccess watchdog...' $watchdog -k webAccess > /dev/null 2>&1 echo 'ok' echo 'Shut down webAccess itself...' $webAccess $webAccessOpts stop > /dev/null 2>&1 echo 'ok' echo 'killall webAcces...' killall webAccess > /dev/null 2>&1 echo 'ok' echo ' '"$webAccessServiceName"' OFF'
Watch out that the variable webAccessOpts ' must be written on a single line! and if you have installed a vmware's 64 bit version you need to set webAccess variabel to /usr/lib64/vmware/webAccess/java/jre1.5.0_15/bin/webAccess"
Save and exit. Now you will create the startup script
# nano vmware-startWebAccess
and again paste the following code
# Web Access configuration webAccess="/usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess" watchdog="/usr/bin/vmware-watchdog" webAccessServiceName="VMware Virtual Infrastructure Web Access" CATALINA_HOME="/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16" webAccessOpts="-client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed -classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-logging-api.jar -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$CATALINA_HOME/temp org.apache.catalina.startup.Bootstrap" $watchdog -s webAccess -u 30 -q 5 "$webAccess $webAccessOpts start" > /dev/null 2>&1 & echo ' '"$webAccessServiceName"' ON'
Watch out that the variable webAccessOpts ' must be written on a single line! and if you have installed a vmware's 64 bit version you need to set webAccess variabel to /usr/lib64/vmware/webAccess/java/jre1.5.0_15/bin/webAccess"
Save and exit. Now make them executable
# chmod +x vmware-stopWebAccess # chmod +x vmware-startWebAccess
and you are done!
Converting to vmware
You are able to convert any existing operating system to a virtual environment as a guest on Debian host using VMvareConverter.
Windows NT,2000
If you have existing windows nt domain and you would like to convert it to vmware on Debian Host you can do it in the following way.
- Install vmconverter on a windows nt, and restart
- Click convert and follow the instructions. Select the VMware server 1.0.x, select destination and start converting.
- When done, on Debian host Select the vmware image and start the virtual machine.
- If your network card is not detected you will have to remove the one that is in there and add "AMD Family of Network Cards".
- You will be asked for a Windows NT CD, to get the drivers.(If you can't read the cd, on host with k3b you can create iso image of the cd and point the cd settings of the guest vmware to the .iso image. VMware guest will be able to read the iso image.)
- When you network card is working you are good to go.
- You can select to power up when Debian Host is on to simulate production server environment.
Windows XP,2003,Vista
When you are converting existing windows you might need to activate you installation again. Windows will detect different hardware and will prompt you for a new activation/activation key.
Windows SQL Server
Make sure you are running ext3 and the disc space for the vmware image is preassigned on you Debian server. This makes sure that temporary query files inside of the vmware image file have enough space to be created on the fly and don't have to wait for another 2gb vmware file to be created. vmware and SQL Server Errors
Troubleshooting
gcc and cc1plus error
gcc-4.1: error trying to exec 'cc1plus': execvp: No such file or directory
If you are using sid, then the default compiler version might be higher than the one used to compile your kernel. The corresponding gcc-packages are installed automatically for the appropriate kernel versions (so, if you have 2.6.24 compiled with gcc-4.1, and apt has gcc-4.3, you will usually still have gcc-4.1), but the C++ compiler versions are not synced automatically, so you will also need to install g++-4.1
apt-get install g++-4.1{,-multilib}Also take care not to have overriden your environment to use a different CC version.
env | grep CC
should return nothing.
VMware Server on Lenny
- Workaround for the incompatibilities with libX11 between the VMware Server 1.06 and Debian Lenny
After starting, VMware ends up with
vmware: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Zusicherung »((int) ((xcb_req) - (dpy->request)) >= 0)« nicht erfüllt.
A workaround for this is to use the libX11 from Debian Etch for VMware (adept /usr/local/lib/vmware/lib to the directory used for vmware-lib at installation)
cd /tmp wget http://ftp.de.debian.org/debian/pool/main/libx/libx11/libx11-6_1.0.3-7_i386.deb dpkg -x libx11-6_1.0.3-7_i386.deb . sudo mkdir /usr/local/lib/vmware/lib/libX11.so.6.2.0 sudo cp usr/lib/libX11.so.6.2.0 /usr/local/lib/vmware/lib/libX11.so.6.2.0/
In order for VMware to use that libX11, it has to be added to /usr/local/lib/vmware/lib/wrapper-gtk24.sh. After the lines 63-65
vm_append_lib 'libfreetype.so.6' vm_append_lib 'libXft.so.2' vm_append_lib 'libXrender.so.1'
the line
vm_append_lib 'libX11.so.6.2.0'
needs to be added.
If VMware wrapper script still makes use of the lenny libX11, it can be forced to use its own GTK libraries
export VMWARE_USE_SHIPPED_GTK='force' && /path/to/vmware/vmware &
VMware on Linux Kernel > 2.6.25
Current versions of VMware (e.g. Server 1.06) won't run out of the box on systems with kernels higher than 2.6.25. While building the VMware modules, vmware-config.pl ends up with
/tmp/vmware-config1/vmmon-only/linux/driver.c:146: error: unknown field 'nopage' specified in initializer /tmp/vmware-config1/vmmon-only/linux/driver.c:147: warning: initialization from incompatible pointer type /tmp/vmware-config1/vmmon-only/linux/driver.c:150: error: unknown field 'nopage' specified in initializer /tmp/vmware-config1/vmmon-only/linux/driver.c:151: warning: initialization from incompatible pointer type
A workaround for this could be using vmware-any-any-update117c. For more information see:
http://communities.vmware.com/thread/164996?tstart=15
http://groups.google.com/group/vmkernelnewbies/web/how-to-install-vmware-in-2-6-26-linux-kernel
The latest vmware-any-any-update (117d for example) can be incompatible with VMware Server 1.0.x (1.0.8 for example). There are patches for original vmmon and vmnet sources those solve the VMware modules compilation problem on Debian Lenny 2.6.26-1:
http://www.paldo.org/paldo/sources/VMware-server/VMware-server-vmmon-1.0.6-91891-2.6.26-1.patch.bz2
http://www.paldo.org/paldo/sources/VMware-server/VMware-server-vmnet-1.0.6-91891-2.6.26-1.patch.bz2
Taken from: http://lenrek.wordpress.com/2008/08/09/vmware-server-106-for-linux-kernel-2626x/
vmware server 1.0.3 and Debian stable 2.6.18-5
- If you are not able to use the browser portion of the vmware server management console or get the following error:
(vmware:16003): 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))
- Symptoms: This seems to be only necessary when you are setting up your vmware or when using browse feature.
- This problem arises due to the fact that vmware gnome-vfs needs to be compiled with GCC_4.2.0 but Debian etch stable comes with GCC_4.1.0.
- You have two options:
- [Option1]Enter this command, which will use your systems GTK:
export VMWARE_USE_SHIPPED_GTK=yes
- Then run vmware:
vmware &
- Setup your vmware.
- [Option2]
rename the original library "libgcc" provided by vmware to keep a backup copy: cd /usr/lib/vmware/lib/libgcc_s.so.1/ mv libgcc_s.so.1 libgcc_s.so.1.old and put a link to the library provided by Debian: ln -s /lib/libgcc_s.so.1
See also
SystemVirtualization alternatives
