WorldVistA Server in VMWare

From VistApedia
Revision as of 13:45, 1 April 2012 by NeilArmstrong (talk | contribs) (Added a glossary link to record~)
Jump to: navigation, search

VMWare -- the newer version (2) has a quite complex browser-based user interface setup and a networking scheme which is somewhat tricky to configure. However, once it has been installed it can be administered over a network and has many more configurable networking and remote control options (achieving greater flexibility than some other virtualization platforms). This may make it more suitable for multi-server installations (such as cloud-computing environments, for example). The free Server edition allows the creation of virtual machines and is recommended. VMWare is also available as a compact free Player edition (for use with pre-configured appliances), a desktop Workstation, and an ESX "baremetal" hypervisor edition.

These instructions use the Server edition for installing an Ubuntu Server guest OS within the virtual machine. (However, with a little extra effort, an Ubuntu / Astronaut VistA server appliance could also be created for subsequent use with VMWare Player, a process that is not discussed here.)

Install VMWare in Windows

(During the entire installation process I recommend turning off your firewall. Once everything is working properly, turn your firewall back on and then adjust it so that everything again functions properly. VMWare has a very complex networking structure that is sure to bamboozle even the most sophisticated firewall. I spent more than half my installation time working with the firewall.)

Install Ubuntu server in a virtual machine

There is a version of the Ubuntu server that is optimised for usage within a virtual machine. It is provided on the Ubuntu Server edition LiveCD. The LiveCD image (.iso) found here can be downloaded onto your hard drive. It can then be installed into your virtual machine directly from the hard drive. Alternatively, you can also burn the .iso image onto a CD and install Ubuntu Server into the virtual machine from the CD. Both methods work identically during the Ubuntu Server installation process.

  • Start the VMWareVirtualUbuntu virtual machine that you created in the previous step:
Start menu -> Programs -> VMWare -> VMWare Server -> VMWare Server Home Page
-> VMWareVirtualUbuntu (highlighted) -> Console -> Click on window to Power On -> Click again to Open the console in a New Window

A window for the virtual machine opens and starts either the Ubuntu Server LiveCD in the CD-ROM drive or the Ubuntu Server (.iso) image, depending on the configuration you specified during installation.

  • Install Ubuntu Server virtual machine edition:
  • Choose language: English ->
  • Important: note this step carefully! Select the minimal virtual machine installation mode:
* Click the F4 (modes) key -> Install a minimal virtual machine ->
  • Install Ubuntu Server
  • Select your installation options.
  • When asked about partitioning, use the guided partitioning method and use the entire disk. This uses the entire virtual machine disk (which is 8 GB or whatever size you created when creating the virtual machine), not the entire physical hard drive disk.
  • Task selection. A menu will appear to select options for additional packages to be installed along with the server. Now is a good time to install two packages that will be required by WorldVistA: the LAMP (Linux, Apache2, MySQL, and PHP) server package, and the OpenSSH package. Make sure these two packages are starred (use the space button to select them) before completing the installation.
  • You will be prompted to enter an MySQL root user password during the LAMP server package installation. This password becomes important later on (in some instances). Record your chosen MySQL password in a safe location. Do not use your primary user password as the MySQL password; it ought to be unique.
  • Finish the remainder of the Ubuntu Server installation. At the conclusion the Ubuntu system will automatically reboot within the virtual machine. When it restarts, you will then have a fully function Ubuntu Server within the virtual machine. Login using the primary user and password (that you created during the Ubuntu Server installation process) and immediately update the operating system:
sudo apt-get update
sudo apt-get upgrade
  • If you added the Ubuntu Server edition (.iso) CD image (stored on your hard drive) as a bootup storage device for the virtual machine, you must remember to remove it (once installation has been completed). (This is only necessary if you used the (.iso) image on your hard drive to install the Ubuntu Server.)
  • Stop the Ubuntu Server OS (sudo halt) and shutdown (close) the virtual machine.
  • VMWare -> Machine -> Settings -> Storage -> ubuntu-9.10-server-i386.iso -> Remove attachment (-) icon (looks like a computer drive symbol with a (-) sign on it) -> Remove -> OK

Install a desktop

This is a decision that is difficult to make. Having an Ubuntu or Kubuntu GUI desktop is nice, but it also slows down the virtual machine server considerably and takes a large chunk of the 8.00 GB virtual disk (which may need to be dynamically expanded and thereby occupy more space on your hard-drive). A GUI desktop is not required to run the WorldVistA server.

If you intend to use many other features of Ubuntu or Kubuntu, however, this may be worthwhile. To install a desktop:

sudo apt-get install ubuntu-desktop
or
sudo apt-get install kubuntu-desktop
  • After all the packages are installed, restart the OS within the virtual machine (sudo reboot) and you should now boot into the GUI desktop.

Install pre-requisites if no desktop installed

To run the WorldVistA server, a GUI desktop is not required. (Personally, I don't use a desktop for the virtual machine server.) But to do this, several packages that are normally installed with the desktop must be installed individually:

  • Install wget (to retrieve packages) and iptables (for firewall rules) and nano (for configuration file editing):
sudo apt-get install wget iptables nano
  • Also install some packages that the WorldVistA server requires:
sudo apt-get install whois xinetd update-inetd apache2-suexec

Download the Astronaut WorldVistA server package

Depending on the networking configuration selected in the next step, Internet access for the virtual machine may not be available (if the "host-only adapter" networking mode is selected, for example). Therefore, it is important to download all packages from the Internet prior to changing the network adapter configuration.

  • Download (but do not install) the Astronaut WorldVistA server package:
wget -O astronaut-wv-server-current.deb http://downloads.sourceforge.net/project/worldvistaautoi/Astronaut%20WorldVistA%20Server%20Installers/astronaut-wv-server-beta-0.9-3.deb?use_mirror=superb-sea2

The Astronaut installer recognizes the network configuration during installation, so Astronaut installation should not be started until the virtual machine's network adapter is configured correctly (see below).

  • If the virtual machine cannot connect to the Internet, you must restore the network-adapter configuration that allows it:
  • Shutdown the Ubuntu Server OS (sudo halt) and close the virtual machine.
  • Select the NAT network adapter mode in VMWare:
VMWare -> Summary -> Commands -> Add hardware -> Network Adapter: NAT -> Next -> Finish
  • Restart the virtual machine (which should reboot the Ubuntu Server OS). Proceed with downloading the packages, as above.

Configure virtual machine networking

This can be a tricky exercise. However, if Bridging networking has been set up correctly from the outset, no adjustment may be needed.

ifconfig
The eth0 networking interface should read something like 192.168.1.114. This is the ersatz IP address that the virtual machine will present (as its own) to the host OS. It will also be the IP address that the WorldVistA server will automatically detect and which should also be used for the clients. (Note that this works only on a single-computer self-contained system. A different interface-bridging configuration will be required if you want the server in the virtual machine to be visible to the rest of the LAN.)
  • To test that the Windows host can connect to the Ubuntu guest OS (in the virtual machine), open a Windows command Prompt:
Windows Start menu -> Programs -> Accessories -> System Tools -> Command Prompt ->
ping 192.168.1.114
If you get a response, then the internal networking connection is working properly.

Install the WorldVistA server into the virtual machine

  • Use the Astronaut VistA installer to install the WorldVistA server (downloaded in a previous step) into the Ubuntu Server OS running in the virtual machine:
sudo dpkg -i astronaut-wv-server-current.deb
  • The installer will automatically recognize the IP address of the VMWare virtual machine to be 192.168.1.114, as well as Instance Name: EHR and Port: 9260.
  • The initial login ID is noted to be worldvistaEHR with an initial default password vista!123. This is used for logging into the WorldVistA server directly from within the Ubuntu Server OS. It is not the access code/verify code pair that a user enters when logging in from a WorldVistA client module (e.g. TMG-CPRS).

Install the Astronaut WorldVistA Clients on the host OS

  • When installing the Astronaut clients, use the IP address of the virtual machine (192.168.1.114, for example) as the server address.