vmware server 2 on ubuntu 8 / 9
installing vmware server 2
Note that there are a few prerequisites before you can install. On Ubuntu you need to have installed the following:
apt-get install xinetd build-essential linux-headers-`uname -r`
The latter is of the uttermost importance. You need to have the actual linux-headers. Run uname -r to know what your exact kernel-version you have. You will need this later.
- Now you can download the appropriate vmware-version for your system (linux->2.0.1->tar->64bit on my system)
- unpack it
- run the vmware-install command inside. If you have a older version installed all your config and VMs will stay intact (at least it was like this when upgrading from 2.0.0 to 2.0.1)
You will get some questions answered and you will answer them. Especially you want to build all modules that are offered !!
It will ask about the C-header-files and recommend default /usr/src/linux/include - and thats where you need to point it to the exact location depending on your exact kernel-version which is /usr/src/linux-headers-KERNELVERSION/include.
For kernel-version you enter the output of uname -r like explained above. Be sure to get things right here. On my system there are two folders:
- /usr/src/linux-headers-2.6.24-24/include
- /usr/src/linux-headers-2.6.24-24-server/include
The second is mainly a bunch of symlinks to the first but there is one very important file in it that is not in the first : linux/version.h
So if you use the first instead of the second you will get something like:
The path "/usr/src/linux-headers-2.6.24-24/include" is a kernel header file directory, but it does not contain the file "linux/version.h" as expected. This can happen if the kernel has never been built, or if you have invoked the "make mrproper" command in your kernel directory. In any case, you may want to rebuild your kernel.
administering vmware server 2
This shows the basics of administering vmware2 on commandline if the GUI is not available or if your terminal does not have a GUI or if you are just a freak that doesnt like gui :)
vmrun
vmrun is the mighty tool of vmware-commandline-administration. It does not access the vm’s directely but also uses the http-connection and the vmware-sdk. So you need to know the https-adress of your vmware-server installation and the port and you need to know the credentials (usermame/password) !! Note that this is different from using vmware-workstation where you can access the VM’s more directly !!
authentication
vmrun -T server -h https://YOURSERVER:PORT/sdk -u USER -p PASS list
This will list all running VM’s if PORT/USER/PASS are right. PORT is usually 8333.
If you specified the wrong port and connect to a standard webpage you will get pages of html-tag and xml-errors like noname.xml:10: parser error : Premature end of data in tag html line 2
If you USER/PASS is wrong you will get a Error: Insufficient permissions in host operating system.
If everything is fine you will get what you want:
Total running VMs: 4 [standard] goldfisch-zimbra/goldfisch-zimbra.vmx [standard] goldfisch-moodle/goldfisch-TNG.vmx [standard] goldfisch/goldfisch.vmx [standard] marcus/marcus.vmx
get help
vmrun --help | less
listing all (running) machines
- list
vmrun -T server -h https://YOURSERVER:PORT/sdk -u USER -p PASS listwill list all running VMs - listRegisteredVM
vmrun -T server -h https://YOURSERVER:PORT/sdk -u USER -p PASS listRegisteredVMwill list all registered VMs
start/stop/reset
- start
vmrun -T server -h https://YOURSERVER:PORT/sdk -u USER -p PASS start “[STORAGE] PATH/FILE.VMX”- storage/path/file are listed as output of the list-command and can be copy/pasted. dont forget the quotation-marks !! - stop
vmrun -T server -h https://tng.goldfisch.at/sdk -u USER -p PASS stop “[standard] goldfisch/goldfisch.vmx” - reset
There are extra parameters to each command that can be appended after the location of the vmx-file. Like hard/soft/gui/nogui - I dont know what they exactely do and some - like reset .. soft gives an error on my machine.
snapshots
- snapshot
vmrun -T server -h https://tng.goldfisch.at/sdk -u USER -p PASS snapshot “[standard] goldfisch/goldfisch.vmx”create a snapshot - deleteSnapshot
- revertToSnapshot
vProbes
vProbes sounds cool - it allows kind of injecting little debug-scripts in a VM, but I couldnt even enable the feature here. see http://x86vmm.blogspot.com/2007/09/presenting-vprobes.html
vmware-config.pl
after you changed something on your system, ie. : you upgraded to a new kernel or changed networkcard or ... you should reconfigure vmware. Stop all your running VMs and then run vmware-config.pl - No existing settings will be changed unless you want it too. vmware-config.pl will recompile your vmware-kernel-modules if necessary.



