Thursday, April 29, 2010

Kernal update destroyed VMWare

Kernal update on my system destroyed Vmware finally /usr/bin/vmware-config.pl saved the day.


Tuesday, April 27, 2010

SIT to STAND table

Man I wish that I could buy one table like that for working :-D

http://www.youtube.com/watch?v=oowSZUDCKTc

Sunday, April 25, 2010

Port Forwarding to Virtual Machines :-D

Many a times we would install some server on a virtual machine and wondered how on earth could we show that to the outsite world, well here is a tutorial which shows just that.

Open Bash "Bourn again Shell"

Here you can see that this file is just read only even for root, first change that permission.

bala@ubuntu:~$ ls -l /etc/vmware/vmnet8/nat/nat.conf
-r--r--r-- 1 root root 1246 2010-04-25 11:16 /etc/vmware/vmnet8/nat/nat.conf

Here we are changing that permission.

bala@ubuntu:~$ chmod 644 /etc/vmware/vmnet8/nat/nat.conf
chmod: changing permissions of `/etc/vmware/vmnet8/nat/nat.conf': Operation not permitted

Changing the permission of a file required root privilege in this case.

bala@ubuntu:~$ sudo chmod 644 /etc/vmware/vmnet8/nat/nat.conf
[sudo] password for bala:
bala@ubuntu:~$ ls -l /etc/vmware/vmnet8/nat/nat.conf
-rw-r--r-- 1 root root 1246 2010-04-25 11:16 /etc/vmware/vmnet8/nat/nat.conf

Now that we have got write permission for root let us gedit it :-D

bala@ubuntu:~$ sudo gedit /etc/vmware/vmnet8/nat/nat.conf

I have just taken one small part of the file, as I am going to allow the port forwarding of host machine 80 to the virtual machine 80. In this case my Virtual machine's IP is 10.8.0.128 and the apache server is running on port 80.

# WEB (make sure that if you are using named webhosting, names point to
# your host, not to guest... And if you are forwarding port other
# than 80 make sure that your server copes with mismatched port
# number in Host: header)
# lynx http://localhost:8888
#8888 = 10.8.0.128:80

80 = 10.8.0.129:80


After this save the file by pressing "CTRL + S" if you are using gedit, if you are using vi editor for saving
Press ESC key
Then press :
Then type wq
Then press enter.

After this let us change back the permission on the file back to its original value.

bala@ubuntu:~$ sudo chmod 444 /etc/vmware/vmnet8/nat/nat.conf

Now we need to restart the vmnet8 network so that this will start functioning as we expect.

This "http://webalution.com/techshare/category/vmware/" website helped me a lot with it.

Use the following command.

bala@ubuntu:~$ sudo /usr/lib/vmware/net-services.sh restart 8
DHCP server on /dev/vmnet8 done
NAT service on /dev/vmnet8 done
Host-only networking on /dev/vmnet8 done
Host-only networking on /dev/vmnet8 (background) done
DHCP server on /dev/vmnet8 done
NAT service on /dev/vmnet8 done
bala@ubuntu:~$

Now try to access http://localhost via your browser and wola you are in your virtual machine now :-D hurray.

Now don't stop there if you need to access the same on your LAN then your host firewall should allow it. Add in a rule according to the firewall you use on your host machine. From now on if any one hits your host IP on port 80 they will be get the web-page hosted on your virtual machine.

Fixing bugs for Vmware on Karmic Kola

It took a lot of time for me to get vmware 2.02 server running on Karmic Kola, and still there was this issue with Mouse pointer not working. At last I came across this link "http://ubuntuforums.org/showthread.php?t=1298781" where in they have given a Shell script to run.


#!/bin/bash
################################################## ##############################
# Call VMWare Server's Remote Console in a clean GTK setup.
################################################## ##############################

# Clean GTK setup for VMWare
export VMWARE_USE_SHIPPED_GTK=yes

# Find console executable in Firefox plugins.
vmrc="$(find "$HOME/.mozilla/firefox" -name vmware-vmrc -type f -perm -111 | tail -1)"
[ -x "$vmrc" ] || exit 1

set -x
cd "$(dirname "$vmrc")" && "$vmrc" -h 127.0.0.1:8333


What I did is, we need to go to some path, in my case I have chosen my home folder.

bala@ubuntu:~$ pwd
/home/bala

Use some editor, in my case I have used gedit to create a file called vmware.sh

bala@ubuntu:~$ gedit vmware.sh
bala@ubuntu:~$ ls
vmware.sh

The created file will not have executable permissions, as shown with the ls -l command

bala@ubuntu:~$ ls -l vmware.sh
-rw-r--r-- 1 bala bala 521 2010-04-25 08:56 vmware.sh

I am changing the permission of that file here.

bala@ubuntu:~$ chmod 654 vmware.sh
bala@ubuntu:~$ ls -l vmware.sh
-rw-r-xr-- 1 bala bala 521 2010-04-25 08:56 vmware.sh

Then when I try to run it as normal user it told permission denied. So I ran it as sudo user and wola, it prompts for username and password key in those and you are as good as new :-D

bala@ubuntu:~$ ./vmware.sh
bash: ./vmware.sh: Permission denied
bala@ubuntu:~$ sudo ./vmware.sh

Tuesday, April 20, 2010