SUSE 11.2 on VMWare Server 2.0 with Windows XP Host

Hello All

I just had one hell of an experience trying to get openSUSE 11.2 to run on VMware server 2.0 on a Windows XP host. I am posting some instructions on how I finally got things working. Hopefully this will save some people some headaches....

1) Download the openSuse iso image (and add-on CD if needed)

2) Download and install the VMWare server

3) Before you try to start the server console, you will need to configure the web access to allow you to log on. go to press Start->Programs->VMware->VMWare web access->Configure Tomcat

4) on the logon tab check logon as: option

5) add your account there and set the password

6) Now in your web browser (I use firefox) access the console via:
     http://127.0.0.1:8222 (unsecure)
     http://127.0.0.1:8333

7) Before you start to create a virtual machine, you will want to set up the server to have access to your iso's. The server will only allow VM's access to specific directories through "datastores". You can either move the iso images to what has been specified as the default datastore... or create another datastore that points to the where you have the iso's. 

8) Now we can create our virtual machine. This is simple, just press the button and follow the prompts. 
    a) at some point it will ask about an CD-Rom, you will want to use your suse DVD iso image. Select the option and then navigate the datastore that contains the image. Once found click and continue.
    b) Network interface has 3 choices:
         Bridged - the virtual machine will appear on the network as any other computer. Allows the VM to host server applications. User needs to have control over the network to ensure DHCP requests are handled (or static IP is assigned). 
         NAT - VMWare server will manage a virtual router, the VM is then connected to this router. On this router, the hosts internet is used as the WAN. Users do not have to have control of the network, but will have to setup port forwarding in VMWare to host server applications
         Host Only - This means that the virtual machine can only talk to the host. The only way to get networking is to have a proxy through the host machine. This is setup on the host independent of VMWare. Users do not need control of the network, but control over the host. I doubt you could host server applications though.

9) With the VM created we can start it up. We can open a window to it through the console tab of the VMWare server console. When I first started it, it was stuck looking for an OS once the console finally rendered the graphics. A reset, an F2 at the post and selecting the appropriate boot media for boot got the installation started. 

10) Install Suse as you would any other suse installation. I added a separate partition for swap, but kept the rest on one big one. Others may still want to maintain the separation of home and root

11)   ---- Important Error/Solution ---- 
    Once the installation has completed many will notice that the mouse or keyboard does not work!!! This was the source of my biggest head-ache.  Some may think it was a problem with VMWare tools... I tried that to fix that and found the tools were working properly. 

    Thanks to the two posts: 

Virtual OpenSUSE 11.2 on VMWare Server 2.0 - openSUSE Forums
no keyboards no mouse - openSUSE Forums

    I was able to solve the problem. The problem is with the Suse installation, not VMware (how else would the installer have recieved mouse and keyboard?). Let me walk you through it...

12) The first problem is how do you affect a system without mouse or keyboard? Well you can't, you have to force a reset through VMWare. Once in GRUB, add a 3 to the boot options. This forces suse to boot into command line mode. 

13) login as root,

14) First create and xorg.conf file, this is done by typing:

         sax2 -a

15) Once completed, you should be able to cd into /etc/X11/ there you will find your xorg.conf file open it up in your favorite command line text editor. Scroll down near the bottom to the Server Layout Section add the line:

Option “AllowEmptyInput” “false”

    Save and quit
      a) For newbies, vim is a simple editor (sorry emacs lovers I don't know your beast) you can use the arrow keys to scroll to the right line. When you want to type it in, press "i" this puts you into "Insert mode" where you can edit text. Then add the text as you would in any editor. Once complete you need to leave Insert mode by pressing escape. Then type ":wq" the : tells vim you are about to give a command, then w means write the file to disk, q says quit.

16) Now at this point you should be able to start up and get mouse and keyboard. Two options, run

init 5

    "init 5" will continue the boot as if you didn't add the 3 to the boot options from before. 

    Or you could simply just restart the VM and let it boot normally.

At this point you should have a working installation of OpenSUSE in VMWare!!! Hopefully this helps others. I wrote this from memory so there could be some errors. Post if the procedure differed for you. 

Take Care
Pilot

If you thought installation was difficult… try getting access to your host computer files…

I have just spent most of the remaining day getting things to work there. My first attempts were flawed, the final solution turned out to be quite simple. As before I am posting my experience so other users have an easier time…

My first attempt was trying to maintain the POSIX environment on the Linux guest. So I was trying to get my Windows XP Professional machine to serve up NFS shares. I have managed to get this to work once a long time ago… This time I tried everything… cygwin and windows services for unix both failed to work. I spent a lot of time trying to correct both. The former I had set up and running but for whatever reason could not make connections. Then the later I couldn’t even get to start.

I gave up and tried an old standby, SAMBA

Samba wasn’t so straightforward but in the end it worked. Let me explain…

  1. Make sure you windows shares are set up and working properly. I had to disable “simple shares” and set up the right security. Used another computer to ensure that the average user on the network could not access my shares. Your setup may differ, it is up to you, how you want to handle shares.

  2. Before you get into your VM and try to find your shares, you need to review you network settings for VMware so you can find your host computer. How you find your host depends on the network adaptor you selected.

If you selected bridged, then it is simple you just access your host through the ip the host has for its physical ethernet adapter (run ipconfig to find out). If you have multiple physical adapters, (like on most laptops), then you need to find out what physical adapter the VMWare virtual adapter was bridged to. If you selected bridged, and you know the network settings for the physical adapter, then you can skip to step 4 (don’t know what adapter was bridged? don’t skip and read through).

  1. First we need to see how the virtual networks are set-up. VMware simulates these virtual networks by installing virtual adapters on the host system. Each adapter is a separate network, thus there is one for bridged, NAT and host only. You need to figure out which one is what, and then you need to know its network settings. This is all done through a simple utility:

Click Start->Programs->VMware->VMware Server->Manage virtual networks

The summary tab will tell you what adapter is for what type of network. For example the NAT adapter on the host communicates with all the VM’s with a NAT adapter. On my computer vmnet0 is the bridged adapter, vmnet1 the host only and finally vmnet8 is the nat adapter.

The summary tab can tell you what adapter the connection is bridged to, however, if it is something like auto or you want to manually specify then you can under “Host Virtual Network Mapping” tab. There you can use drop down boxes to set how things are bridged.

The DHCP and NAT tabs will give clues on the network settings. The first will show all the subnets for all the virtual networks. The later will show that and the gateway through a drop down box. If you are running your VM with a NAT or host only network adapter, the gateway is most important, this is the IP of the host computer. You can change this if you wish. Remember with bridged adapters the settings used are those for the real adapter that has been bridged (ie the host ip is that adapters ip, the subnet for the network is the subnet for that adapter etc.).

Now we have the network information, we can set things up on the guest system. So go ahead and start it up.

  1. Once the VM is started and running, there are two ways to mount the share, one is temporary, the other is permanent. The tutorial by swerdna is much better than anything I can compose now, so refer to it for details:

Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 11 plus FAQs

I will give a brief overview.

a) mounting via file system type smbfs will not work. You have to use cifs

b) for temporary mounts use:

mount -t cifs -o username=<host_user_name>,password="<host password>" “//<host ip>/<host share>” “/<guest mount point>”

every <term> needs to be replaced with the appropriate term for your system. The username and password options are only needed if you have set securities on the windows share.

c) for permanent mounts you need to edit the /etc/fstab file Simply add a line similar to:

\<host_ip>&lt;host_share> /<guest_mount_point> cifs username=<host_user_name>,password=<host_password>,uid=<your_uid>,gid=<your_gid>,_netdev 0 0

something new here, the uid and gid is used if you want your user account (non-root) to access the share. This forces the ownership of everything in the share to be mapped to <your_uid>:<your_gid>. Don’t know that stuff? run whoami or simply look at your /etc/passwd and /etc/group files to find out.

Also notice that in the temporary mount command the <term>'s had spaces in them, but were wrapped in “”'s this is because bash will strip the “”'s and pass the spaced arguments as one argument to the mount command. However, bash is not parsing fstab, here any space is interpreted as the end and beginning of an argument. spaces can be inserted into the fstab arguments using “\040” in place of spaces (note the quote here is not copied into fstab).

Conclusions:

So there, if you followed through and everything went smoothly. You should have suse running on your windows xp machine (not sure if this will work for vista or windows 7, likely will). Within suse you should have access to all your windows files.

If you want to have access to your guest linux files from your host windows machine, then things get messy. I read once that there was a utility that would read the vmware files on the host machine and be able to extract files from its virtual hard drive. I am not sure if you can write to it.

If you want read write through some network share, then you will need to do something similar to the above, but reversed. You would have to set up the shares in the linux machine, then make sure you have the network information for the guest, finally you would either browse to the shares or set them up as mapped network drives. Again, you could attempt to set up NFS or MS type shares. Not sure what works better.

The messy part is that connection to the virtual machine will require you to log on to your vmware server console and start it up, wait, connect and access. I suggest you use the host hard drive to store your guest files. This way you can read and write to with those files no matter what state the VM is in!!!

Just some notes on running virtualized linux…

— Keyboard Issues —

You will notice some strange keyboard behavior at times. I think something is wrong with the keyboard and mouse drivers that come with vmware tools. Basically when you type “a” you will get “aa” that works for nearly all keys. The fix is a bit of a hack, in the (control center) accessibility options you can set things up for slow keys. This is a little annoying as not key strokes have to be slower than my normal typing speed.

— Mouse Issues —

It seems that the mouse speed in Linux differs than that of the host. What ends up happening is that the host mouse position will drift off the guest position. This is a problem when you are in full screen mode with the console. When you go to access a menu, all of a sudden the VMWare menu drops down. If you are not careful you can start passing un-wanted mouse clicks to VMWare. The temporary fix is to move the mouse to the far left or right until it gets to the edge of the display. This seems to force VMware to sync the two mouse positions.

— Disk IO through Samba —

Also, if you are reading and writing files to your host computer a lot, then keep in mind that the host is not updated as frequently as you are reading and writing. The Linux kernel will buffer the file system reads and writes in RAM. Thus, what looks like files on the HD aren’t always there but in RAM. Simply run the command:

sync

This will flush out any buffers and force them on the disk.

This isn’t a problem if you are working purely within Linux. If you are working on files with multiple programs, via the host and the guest, then it becomes a problem. Basically the same file on both systems will be appear different to the two computers.

— Something cool —

So I just want to say what I am doing. At the research center here, I have some closed source proprietary engineering software on Windows XP. I also have software for scientific calculations written specifically for Linux. I want the two to work together to perform a larger set of calculations. Given the alternative of painfully porting code, virtualizing Linux has proven to be a very effective way of getting the best of both worlds!!!

Had the same problem running OpenSuse 11.2 on VMWware Fusion v3: no mouse or keyboard after install. Did the grub 3, sax2 -a, edited and added the “AllowEmptyInput” to the xorg.conf, rebooted and got mouse and keyboard control. Great memory!

Thanks a ton.

> — Something cool —
>
> So I just want to say what I am doing. At the research center here, I
> have some closed source proprietary engineering software on Windows XP.
> I also have software for scientific calculations written specifically
> for Linux. I want the two to work together to perform a larger set of
> calculations. Given the alternative of painfully porting code,
> virtualizing Linux has proven to be a very effective way of getting the
> best of both worlds!!!

yep, best of both worlds except someday you might consider running XP
in a VM hosted by Linux/AIX or other *nix (rather than the other way
around) that way you put the more fragile and less secure system in
its rightful place, being carried by the more ‘industrial’ of the two…

think about it.


palladium

You might also look at VirtualBox. It has a feature that allows a shared directory between host and guest. I have never used it on a Windows host (why would I) But XP runs great on a Linux Host.

Hello All

 So a couple replies, 

 kguthner - Really happy my post helped someone, it is why I do it in the first place!!! These forums have saved my bacon many times over, love giving back.

 gogalthorp & palladium - Why run Linux on Windows? Well this computer is a lab computer that needs to be accessible to all in the research group. I do not have the authority to switch it around as other peoples work is on this. So... thats why... at home I definitely run it the other way around, better yet, Windows gets a virus, just copy in the back up of the VM and voila problem solved...

 gogalthorp - Yes I have been considering virtual box, my read is that it isn't as stable or at least that is what I have been told. Although with all the problems I have been having... I might try it next time... at this point spent enough time messing around with virtualization, I need to get the project done.

Take Care
Pilot

Hello

 Adding more documentation to my virtual machine... Ok, so today's problem was that I could not access my server web management console. Basically when I access the web page I get a "503 Service not available". Solved the problem, posting it here, because the steps 4 and 5 are contributed to the problem. Not sure if they are wrong as they solved earlier problems...

 Basically all I had to do was re-configure Tomcat,. Go to:   

Start->Programs->VMWare->VMWare Web Access->Configure

 Tomcat  If you get an error that it is already running, then you will find a small apache icon (white circle around a symbol (green arrow or red square) on top of a pink feather) by the clock. There click and you will be able to configure. Just go to "Log On" and select the local system account option. Then back to general, press start, should work and now you have access. 

  This was the fix for me, but likely will be different... What is really strange is that with the old settings it worked fine. Further more once started, accessing it again, I notice the log on settings revert back to the old settings. So there is some strange behavior. Also never had the apache icon in the system tray. So it seems that there are some strange bugs in the system. Could be many things. 

 Reading the posts, it seems that this "Service Not Available" is a symptom to MANY problems. Hence, it is more helpful if I give tips on how you can figure out your problems.

 I will first tell you how VMware web access is structured. At least by what I have seen. Basically it is an apache web server running as a service. The Tomcat is a Java-esque open source extension to apache, this probably allows VMWare to implement a management console through browsers. This service is merely an access portal, not the actual server. Despite all the "Service Not Available" I was still able to access my running VM machine through ssh. 

 The rest of VMWare server consists of a whole suite for various things, DHCP daemons, NAT daemons, authorization daemons etc. 

 When you have similar problems with the web access tools you can debug it through the services logs. There is where I found errors about logging on. This is accessed through Administrative Tools, then system logs. Alternatively, others have found the cause by looking directly at the Tomcat log files. Where these files are is a configuration option for Tom Cat so you can find it reviewing the settings for Tom Cat itself. So for those with similar problems that is the first place to start. Wish you luck.

Take Care
Pilot