VMWare on Linux
Oh, this is cool.
Okay, so I’ve been doing a lot of work on Linux lately. Not only for the bootable ZENWorks imaging system, but just plain Linux stuff.
Last week, I set up a Red Hat AS2.1 machine for use as an FTP server, but, just as I was starting this for the folks who need it inhouse, they start talking about needing a Windows 2000 server to run some specialized print server for eMatrix, which is what the FTP server was for. So, my boss suggests that we use VMWare for Linux. Brilliant! Of course, most people are running VMWare on a Win32 machine and emulating Linux, but we think outside the box. No problem, I get it all installed and running, though the first time I ran the VMWare PERL script that set up the program, it failed. No reason for it to fail, as far as I could tell, because it ran the second time. Great, so I get it all installed an running and let the boss know. Then, he asks me, so what are we going to manage this machine with? Er…. VNC, I guess.
Right, so I get that setup on the Windows machine in VMWare without a hitch. Getting it installed on Red Hat wasn’t a problem, but getting it running…. Well, thankfully, I finally figured out that the Real VNC website has the answer on a page called Native X display Support. The only thing is I need to edit XF86Config-4 instead of XF86Config. No problem! Now the VNC server autostarts. And the boss asks me if I can get the VMWare session to automatically launch at reboot. Er…. Well, I can see what Google turns up!
What I eventually came up with was a shell script I called “xvmstart” that was as follows:
#!/bin/sh
# Written by JKH on 10-13-04
. /usr/bin/vmware -x /vmcfg/Windows2000Server/Windows2000Server.vmx
(Where vmcfg is where you stored your configurations for the virtual machines. Oh, and if the last line wraps around, that should be a three line script.)
I saved that file in /root/.kde/Autostart and rebooted. As soon as I logged in, BAM! VMWare loaded like a charm. So, now, I had to make this badboy autologin… Er, back to Google.
I finally found a forum that told me I had to edit /usr/share/config/kdm/kdmrc to set AutoLoginEnable=true and AutoLoginUser=skippy (or, whatever you want to autologin as). KerPlow! A fully automated solution brought to you by Linux, Google, VMWare, VNC, and me, the Network Geek.
I love my job!