Installing VMware Server on unRAID Box


Recommended Posts

OK, so I finally got around to trying to make a package, and I met only limited success.  Here were my steps.

  • I unzipped the VMware installation packages on a clean install (upgraded to slackware-current, 2.6.24.4 kernel to match Beta 4)
  • I made a full file listing grabbing date, time, size, and file name with full path
  • I installed VMware Server 1.0.5 using the vmware-any-any-update116fix patch
  • I made a second full file listing

 

Not knowing how to compare the two lists any other way, I pulled them into Excel 2007 and found all the differences.  Out of the 250k files, a lot of them were the same and a lot of the different ones seemed to be "real time" files (like /proc files).  Excluding the doc files, I ended up with about 2500 files that seemed to result from the VMware Server install.  Copying these to a new directory tree probably took 20 or so copy commands and maybe 10 or 15 mkdir commands...tedious but not too bad.

 

After making the package, I went back to a clean VM and installed the package.  The good news is that invoking VMware brought up the console.  Bad news is that connecting to Local Host timed out saying that the VMware server was not installed or not running.  I added the VMware line to /etc/inetd.conf (which I didn't make a part of the package) and restarted, but I'm still getting this error. 

 

I'll have to dig deeper to see what is actually going on, but I am encouraged simply seeing the console appear!

Link to comment
  • Replies 333
  • Created
  • Last Reply

Top Posters In This Topic

I want to jump into the fray with this so bad...

But I'm still working out my hardware configuration.

Thanks for the update!!! Much appreciated!

 

I'm just waiting on a video card and I'll finally be able to set up something I can really do some testing on.  However, I took a look at josetann's page, and now I want to build a Mac OS machine!

Link to comment

I was finally able to get vmware server beta 2 going, but you HAVE to use PAM to authenticate.  Need to install Linux-pam.  I think previous versions would just see that pam wasn't there and let you login anyways, but not this one, argh.

 

In previous versions, you could just create an /etc/pam.d directory, and it would work.  Is VMware smarter than that now?

Link to comment

I was finally able to get vmware server beta 2 going, but you HAVE to use PAM to authenticate.  Need to install Linux-pam.  I think previous versions would just see that pam wasn't there and let you login anyways, but not this one, argh.

 

In previous versions, you could just create an /etc/pam.d directory, and it would work.  Is VMware smarter than that now?

 

Seems to be.  It installed fine but wouldn't accept any logins.  Once I installed Linux-pam, it worked right away.

Link to comment

I was finally able to get vmware server beta 2 going, but you HAVE to use PAM to authenticate.  Need to install Linux-pam.  I think previous versions would just see that pam wasn't there and let you login anyways, but not this one, argh.

 

In previous versions, you could just create an /etc/pam.d directory, and it would work.  Is VMware smarter than that now?

 

Seems to be.  It installed fine but wouldn't accept any logins.  Once I installed Linux-pam, it worked right away.

 

That's funny!!!  I installed it using the "trick," and I couldn't log in either.  I didn't think much of it guessing it might be a hostname or VM issue...figured I'd retry once I get some physical hardware to try it out on.  That's good to know.  I'll really have to look at the benefits of v2 versus v1 because I really don't want to load a lot of stuff onto my unRAID.  I'm really happy with 1.0.4 on my Windows machine, so I might stick with 1.0.5 on unRAID.

Link to comment

VMware Server 1 is just too hard to do, especially if you need to reinstall every time you boot up.  VMware Server 2 is soooo much easier.  I would go with that, except I want something more permanent (with Beta-2 I know it'll expire in July, and the next Beta will expire in another four months, until the final version finally comes out).  Basically you'd just install the Linux-pam package, then use altertrack on Server 2, it should catch everything.  To do Server 1 requires you to run the installer but not the config, patch the config, then run the config (with the --compile option), and when it doesn't work you do it again.

Link to comment

If you're still running off of the flash, then it's really easy to upgrade.  Just replace bzImage and bzroot.  All of your other modifications should still work as-is.  If they don't for some reason, just put the old bzImage and bzroot back and reboot.  Now if you're installing unRAID to a hard drive, then it's a little different but still not that hard.  Just see what files were updated between the two releases, make a note of them (I think from beta5 to beta6 there were only two or so files that were important), replace and reboot.  If that messed something up, copy back over the files you had before and reboot.

Link to comment
  • 4 weeks later...

Noticed people are trying to get vmware installed on unRAID system. Where are people at with this? I have next to no technical knowledge of linux so wouldnt even know where to start but would be very keen to get vm's running on that machine and get rid of a couple of other ones (anyone reading my other threads yes I would be forced to have to have wired network then  ;D)

 

If people have got it going and have either a rebuilt unraid package or good instructions it get vmware up and running I would a very grateful man.

Link to comment

Noticed people are trying to get vmware installed on unRAID system. Where are people at with this?

 

I've been trying to make some progress, but I haven't been able to put as much time into it as I'd like.  Last week, I created a VMware package using the latest Server 2 beta.  The package is encouraging, but it's not there for a couple of reasons.  First of all, it looks like some but not all of the software works.  This is based on installing the package on an unRAID machine and then running the VMware start & stop commands.  On the working (Slackware) build machine running the commands creates about 6 or 7 lines of progress reporting output talking about services being either started or stopped, but the unRAID machine with the installed package only produces two line, and the web admin page for VMware is not reachable.  It's encouraging because it looks like SOMETHING is happenining, just not everything.  The next steps (whenever I can get to them) would be trying the package on a Slackware build to see if the problems are with the package itself or if the problems are due to the combination of the package+unRAID.  The 2nd thing that I will need to try is installing VMware on an unRAID machine and building the package there (as opposed to building it on a Slackware development machine).

 

The other problem is the size of the package.  It weighs in at over 400 MB, and that's huge given that unRAID is running in RAM.  I haven't looked closely to determine what, if anything, can be removed.  In building the packaged, I saw a lot of OS/distro names (like RHEL 5.0) fly by.  I'm not sure if these are binanries that are not needed because we are on a Slackware base or if they are needed for virtualizing the guest OSs.

 

I'm getting really close to just installed unRAID to hard drive.  It would be extremely easy to get VMware Server working that way.

Link to comment
  • 2 weeks later...

I found a file (/etc/vmware/locations) that lists all the files that VMware Server uses.  Using this info, I rebuilt the package (hmmm...how did I miss adding the kernel modules the first time?  ::) ).  I also corrected the command to start all the services once it's installed.  The entire list of services appear to start fine, but when I go to the login page, the user/password combo is not accepted.  I'm not sure how to fix this.  The package was created on a no-password system and installed on a no-password system.  I can log in o nthe development system, but not the package-installed system.

 

Also, the package is huge.  I think the final install may be able to be installed as two packages.  One would be a one-time install to a permanent location, and then there would be a smaller real-time installation.

Link to comment
  • 2 weeks later...

Progress?  Maybe. 

 

Researching the login issue led to a few dead ends and then some focus on linux-pam.  Trying a newer version of linux-pam (linux-pam-0.99.10.0-i486-1gufo.tgz) seems to have resolved the issue, and I'm able to log in remotely to the VMware management console.  Now I need to test actual VMs to make sure they run correctly.

 

I also tried splitting the package into two parts.  One part would be a one-time installation to a non-volatile location (currently mapped through /boot/custom/vmware) , and the other would be real-time installation into the ram-based file system.  Hopefully, this will be a resolution to the large package size as the one-time installation is by far the bulk of the software.  Everything so far has been done in a virtual setting, but it looks like it might work.

 

To do:

  • Test install and VMs on physical system
  • Determine if/how to map settings to non-volatile location

Link to comment

It's still looking good.

 

I installed the package on my (physical) unRAID development system using the two-package install.  It looks like /boot/custom/ can't be symlinked to another location because of the flash's FAT32 file system, so I mounted a spare partition from one of the harddrives to that location using fstab.  I copied over a virtual machine (that was previously running on VMware Server 1.0.5) to VMware's datastore location.  Initially, VMware was not able to browse the datastore for some reason, so I deleted the path setting and recreated it (in VMware), and I was then able to see and import the virtual machine that I had copied over.  I tried to start the machine, and it progressed nicely until it errored out stating that /tmp/vmware-root was running out of space.  I assume that /tmp is being stored in RAM, so it looks like I'll need to add some swap space.

Link to comment

Looking very promising. Having good storage solution while being able to serve up website etc on same box would be awesome.

That's the plan.  Right now I have two 24x7 boxes--unRAID and a Windows machine running torrents and virtual machines for a website and Windows Home Server.  I'm hoping to consolidate into only one always on machine.

 

Is this running off hard drives now not USB stick?

No, this is running off of the unRAID USB stick.  However, since the entire package is close to half a GB, that's too much to have stored in RAM, and given the limited lifespan of USB sticks, I also don't want it stored there.  Now with the cache drive, we can have a permanent home for the bulk of the software.  The two package installation method lets most of the software be installed just once.  This includes all the files that were easily redirected to a custom path.  A second smaller package (which has the files that could not be redirected such as /etc files) weighing in at a couple hundred K could then be easily installed realtime using the go script. 

 

The goal of running off of USB is so I'd be able to easily keep up with the latest unRAID distro with minimal re-work.  However, I assume I'd need to rebuild the package each time there is a kernel version change.

 

The current package has the software install to /boot/custom, but since I can't symlink from this location, I need to rebuild the package to install to the cache drive.

 

Right now the real issue is the fact that VMware Server is closed source.  I'd really like for others to be able to try the package, but I can't redistribute their software.  If anyone has any ideas, let me know.

 

Oh and congratz on 100 posts!  ;D

Thanks!

Link to comment

VirtualBox doesn't have some of the features of VMWare, but it is open source and redistributable.  If you create a shared directory for the VM, symlinks are traversable, so you can symlink all the unRAID disks, and the VM can have access to the whole array.  It can also traverse remotely-mounted filesystems.

 

It isn't very difficult to install a conventional Slackware install to hard disk, and add unRAID to it.  The hardest part is ticking off the right drivers for the drive where your root fs boots from.  This could be done with an initramfs and a pivot_root, but I'm just to lazy to go there.

 

I'm running a full Slackware 12.1 install, with unRAID, Apache, and other apps, and VBox running CentOS/Trixbox for my phone system and a WindowsXP VM for my always-on Windows apps amd converting my HD movies to H.264 (20+ hours to convert each one). 

Link to comment
  • 2 months later...

I have VMware Server installed and a VM up and running on a stock unRAID! 

 

Since I can't legally redistribute VMware's software, I can't simply post the Slackware packages that I've built, but I will give step-by-step instructions of how I've gotten to this point.  However, first I want to give more info about the status, the background/thought process, and what's next.  I think feedback on some of this info can help us all get to the end goal of getting VMs working on our unRAID machines.

 

STATUS

The build I did was using VMware Server 2 RC1.  It looks like RC2 came out last week, and I bet the exact same instructions will work.  I have not done any real testing.  However, I was able to import a VM and confirm that it was working.  The test VM is a CentOS webserver built under VMware Server 1.0.x.  This webserver is running Gallery (a photo-album software), and I was able to browse to its IP address (DHCP via bridged networking), log in, and upload a new photo.  That's it.  That's the extent of the testing.  I haven't tried creating a VM directly on the unRAID host; I haven't tried taxing the guest OS to see if that causes any problems. 

 

So far, the only thing that I know is not working is the VMware Remote Console.  The Remote Console is like a remote desktop for the guest operating system; it is not the web management interface (which does work).  I think this Remote Console is similar to a functionality that exists in the closed-source version of VBox (i.e., the run script) but not in the open-source version.  I think the fix to this issue might be really simple.

 

If you choose to try any of this, you do so at your own risk.  I have this running on my main rig, but for all I know, it could catch on fire or run up my long distance phone bill at any time!

 

 

BACKGROUND / WHY VMware SERVER 2?

Below are the reasons that I concentrated on VMware Server 2 as opposed to VBox or even VMware Server 1.0.x.  These reasons may not be valid.  Input is welcome.

  • Ability to run on stock unRAID - When I played around with VBox, it looked like the kernel needed to be recompiled to include System V support.  I thought there might be better adoption if people could use a stock unRAID, but given that individuals will still have to build their own packages, this fact may not make much difference.  Also, you still may need to recompile the unRAID kernel to enable devices/support to pass through from the host to the guest.
  • Built in web management console - I'm lazy and I like a nice GUI to build and manage my VMs.  I think building VMs in VBox is command line (?), and I not sure if there is web management.  I think VMware Server 1.0.x requires Apache to already be installed in order to use web management from a remote machine.  On the other hand, VMware Server 2 installed Tomcat to provide web-based management from a remote machine.

 

WHAT'S NEXT?  HOW CAN YOU HELP?

  • Hopefully, some people will be willing to follow the directions and test this out.  We need to solve the Remote Console issue and determine if there are any other problems with this installation.
  • I'm not using the agreed-upon customization file structure, and help getting closer to it would be appreciated.  The reason that I'm not using it is because of the size of the installation.  At over half a gig, I don't want to waste memory in the RAM-based file system, plus installing a package this size requires a big flash drive and a lot of time each boot.  Therefore, I broke the install into a one-time package that can be permanently installed (I install to the cache drive) and a real-time package that is installed on each boot for the files/links that must reside in the RAM-based file system.  I also made the config files permanent (and link to them).
  • I'm not a linux expert, so there are probably some things in the step-to-step that could be made a lot prettier.  For example, I probably have a lot of cp -a followed by rm.  This is probably the same as a simple mv.  (I did it so I could recover from my inevitalble mistakes).  Anyway, help in cleaning up this process are greatly appreciated.
  • Anything the linux experts see that would make this better performance-wise would be great.

 

 

STEP-BY-STEP INSTRUCTIONS  ***USE AT YOUR OWN RISK***

BTW, I originally did this a couple of months ago back when the current version was RC1.  I didn't have a cache drive at the time, so it's only been recently that I've been able to start playing with it.  It does require an unRAID development system.

 

1.  On your unRAID development system, make the installation directory for VMware Server. This same directory/path will be used when the software is later installed on the actual unRAID system. The software is pretty bulky, so I want to make the bulk of it persistent (i.e., not have to be reinstalled on each boot).  I want to use thecache disk as the permanent home of my software, so I need to recreate it on the development system.  You might choose a different location.

   

mkdir /mnt/cache

 

2.  Install Linux-PAM (linux-pam-1.0.1-i486-1cjm.tgz)

wget http://repository.slacky.eu/slackware-12.0/system/linux-pam/0.99.10.0/linux-pam-0.99.10.0-i486-1gufo.tgz
installpkg linux-pam*

 

3.  Download VMware Server 2.  Currently it is version RC1 (VMware-server-2.0.0-101586.i386.tar.gz).  I can't give a direct download link because there is a EULA that needs to be accepted.  Make sure to make note of the software serial number for linux (you may need to register to receive this).

    http://www.vmware.com/beta/server/download.html

 

4.  Untar VMware Server

   

tar zxpf VMware-server*

 

5.  Install VMware Server

   

cd vmware-server-distrib
./vmware-install.pl

 

    You'll see:

 

   

In which directory do you want to install the binary files?
[/usr/bin]  

 

    Change this to

   

/mnt/cache/.vmware/usr/bin

 

    Note, I redirect this to the cache drive and I prepend the directory name with a "." to keep the mover from moving this directory to the protected array.

 

 

    At the next few prompts, you should be able to simply accept the defaults:

 

   

The path "mnt/cache/.vmware/usr/bin" does not exist currently.  This program is going to create it, including the needed parent directories.  Is this what you want? [yes]  
    
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]   

What is the directory that contains the init scripts?
[etc/rc.d/init.d]  

In which directory do you want to install the daemon files?
[/mnt/cache/.vmware/usr/sbin]

 

    All the directories that need to be re-directed should already be re-directed based on our first change (except for when we get to the storage directory for the virtual machines during configuration), so you should be able to just press ENTER through the rest of the installation.  NOTE:  By default, the installer will then start the configuration script (vmware-config.pl), and there will be some options that you'll probably want to change.  If you don't pay attention, it might not be obvious that the installation has ended and the configuration has begun.

 

6.  Configure VMware Server

    The configuration script may seem like just part of the installation because the installer defaults to running the configuration script.  The configuration script first compiles some needed modules (vmmon, vmci, and vsock).  You may receive some warnings while there are compiling.  Just make sure the status messages say that each module "loads perfectly into the running kernel."

 

    Next, networking will be configured.  I just chose the defaults.  This will give the virtual machines your choice of bridged, NAT, and/or host-only networking.  If you don't need all these choices, you can make changes here.  At the end, it should compile the vmnet module.  Make sure it "loads perfectly into the running kernel."

 

    Next, you'll need to choose the ports for connections.  For my installation, I left the port for remote connections as 902.  However, you'll need to decide what to do regarding the port for standard http connections.  The default is 80 which is also the port used by unRAID's emhttp (which serves the user interface).  Either VMware Server or unRAID's standard port will have to be changed so as not to conflict.  You can change the VMware Server port here, or you can change unRAID's port in the go script.  Since I will probably want to access unRAID's management page more often than VMware Server's, I chose to leave unRAID on the standard port (80) and change VMware Server to use port 81.  I left the port for secure http connections as the default (443).

 

   

Please specify a port for remote connections to use [902]
Please specify a port for standard http connections to use [80] 81
Please specify a port for secure http (https) connections to use [443]

 

   Choose where you want to store the actual virtual machines.  Again, I want a persistent location that's easy to access.

 

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]
mnt/cache/.virtualmachines

 

   Other items, I let default to the previously defined (custom) installation directory.

 

   

The configuration of VMware Server 2.0.0 build-10158 for Linux for this running kernel completed successfully.

 

7.  Prepare the Packages

    Stop VMware Server

   

/etc/rc.d/init.d/vmware stop

 

    Move VMware configuration and log files the "persistent location"

   

mkdir /mnt/cache/.etc
cp -a /etc/vm* /mnt/cache/.etc/
rm -r /etc/vm*
ln -s /mnt/cache/.etc/vmware /etc/vmware
ln -s /mnt/cache/.etc/vmware-vix /etc/vmware-vix
mkdir -p /mnt/cache/.var/log
cp -a /var/log/vm* /mnt/cache/.var/log/
rm -r /var/log/vm*
ln -s /mnt/cache/.var/log/vmware /var/log/vmware

 

 

    Create the package tree for the one-time (persistent) installation

   

mkdir -p /pkgONETIME/mnt
cd /pkgONETIME
cp -a /mnt/cache mnt/ 

   

 

    Note, I can simply copy /mnt/cache because I've used a clean development environment on which this directory did not exist before.  Everything that is in this directory comes from this VMware installation.

 

    Create the package tree for the realtime (each boot) installation

   

mkdir /pkgREALTIME
cd /pkgREALTIME
mkdir dev
mkdir -p etc/rc.d/init.d
mkdir -p lib/modules/2.6.24.4-unRAID/misc
mkdir -p var/log

cp -a /dev/v* dev/
cp -a /etc/rc.d/init.d/v* etc/rc.d/init.d/
cp -a /lib/modules/2.6.24.4-unRAID/misc/v* lib/modules/2.6.24.4-unRAID/misc/
cp -a /lib/libvixAllProducts.so lib/
cp -a /etc/rc.d/rc0.d etc/rc.d/
cp -a /etc/rc.d/rc2.d etc/rc.d/
cp -a /etc/rc.d/rc3.d etc/rc.d/
cp -a /etc/rc.d/rc5.d etc/rc.d/
cp -a /etc/rc.d/rc6.d etc/rc.d/
cp -a /etc/vm* etc/    
cp -a /var/log/vm* var/log/

 

    Create the packages

   

cd /pkgONETIME
makepkg VMware-server-2RC1-ONETIME.tgz
cd /pkgREALTIME
makepkg VMware-server-2RC1-REALTIME.tgz

   

 

8. Using the packages

    Install the one-time package.  Like it says, it should only need to be installed once.  However, if something ever happens to corrupt the software, you can easily delete the directories and and reinstall the one-time package to get it working again.

   

installpkg VMware-server-2RC1-ONETIME.tgz

 

    Install the real-time packages on each boot:

   

installpkg linux-pam-0.99.10.0-i486-1gufo.tgz
installpkg VMware-server-2RC1-REALTIME.tgz

 

 

9. Move the /tmp directory

    I discovered that I was getting some hanging issues (and maybe some performance issues, as well) due to running out of space in the /tmp directory.  It also seems that the individual VMs use their own individual directories within the /tmp directory so simply redirecting the /tmp/vmware-root didn't work, so I moved the whole damned thing!  Note, the following lines are written so they can be used on subsequent reboots.

   

rm -r /mnt/cache/.tmp
mv /tmp /mnt/cache/.tmp
ln -s /mnt/cache/.tmp /tmp

 

10.  Start VMware Server

       

/etc/rc.d/init.d/vmware start

 

       Browse to it via:

       http://tower:81/

 

   

 

 

EDIT:  I originally referenced one version of linux-pam to download but a different one to install.  This has been corrected.

Link to comment

Had a quick skim over this and looks excellent that it is now up and running. You mentioned not being able to distribute (sorry not up to speed on these things) but isnt VMServer free to download? So what stops you from releasing it?

 

Anyway great work. I'm extremely snowed under with work at the moment but been looking forward for someone to get this working so I will try and get some time this week to get it testing on one of my systems. (thankfully sleep is overrated  ;D)

 

 

 

Link to comment
You mentioned not being able to distribute (sorry not up to speed on these things) but isnt VMServer free to download?

 

It's free to download and use per person, but they require you register your own license.

It's part of the agreement. Small inconvenience considering all that it does provide.

 

 

 

Really good work MusicMan!!! Kudos!  ;D

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.