Koozali.org: home of the SME Server

An Alternate approach to SME in a virtual setting

Offline daniel

  • ****
  • 146
  • +0/-0
  • Platinum Sponsor
    • http://www.charton-mgmt.com
An Alternate approach to SME in a virtual setting
« on: February 17, 2012, 04:51:54 PM »
I've been running SME 8bx successfully in a virtual environment for a year with no issues.  In the forums I typically find SME as the master server running on the hardware and VMware 2.0 or Virtual box running on top of SME for virtualization.  While this worked ok, I always had to monitor and manage the configuration. My configuration is somewhat different than what has been discussed in the forums so I'm posting my observations and experience here.
To start with, I'm using a Dell T410 server class box with 8 cores and 8GB of RAM, 3 hardware raid 1 drives.  First RAID1 is 500GB, Second RAID 1 is 1TB, third RAID 1 is 1TB. And two physical NIC cards.

I started by using the free VMware Hypervisor 4.1esxi and installed on the 500GB raid1 drive for the initial boot drive.  After booting into Hypervisor, I manually assigned NIC A (later referred to as LAN NIC) a hardware address of 192.168.X.254 and made it the Management Network card.  I also turned on the SSH so I could move files to the server manually from my workstation.  This is optional but will be useful if you build virtual servers from ISO files.  I decided to upgrade my VMware Hypervisor to the paid version ($1000) in order to take advantage of thin provisioning, APIs, and snapshot management.  For a basic VMserver, these are not required if you do not over provision your server or want to return a server to a point of time in history for beta testing purposes.

From this point all other work is done via a workstation on the physical LAN and the VMware VSphere client that comes with the VMware Hypervisor.  It can be installed by connecting to the VMware Server at 192.168.x.254 and installing the client.  I started by formatting and adding the two additional RAID drives to my Storage pool, changed the name of the first storage pool to BootStore, the second storage pool to SMEStore, and the third storage pool to OtherStore.  (note: if you want virtual servers with more than 256GB of hard drive storage, you must increase your block size when formatting the storage pool to 4MB) I added a networking virtual switch to the NIC A and called it VM LANswitch, I added NIC B to a second virtual networking switch and called it VM WANSwitch.   I only recommend doing the VM WANSwitch if your ISP provides you with multiple public IP addresses and you are assigning them to multiple VM guest servers. 

Using the VMware client folder browser I added a folder in the bootstore called iso.  I copied all the ISO files I will use, SME8b6 iso for example. I also have a windows xp pro iso, windows 7 pro iso for generating test workstations and other linux distros.  Next I create a virtual machine for SME.  I chose centos 4/5 as the virtual platform, memory 2MB, 2 processors (I found with hypervisor, I could run 2 processors and never over tax the virtual machine) virtual hard drive stored on SMEStore (I made one 750GB store) CD drive to boot the SME8b6 iso stored on the BootStore/iso folder, Network card 1 connects to the VM LANSwitch, Network card 2 connects to the VM WANSwitch (or NIC B for a single public IP connection)  I used the e1000 VM nic adapter emulation for Network adapter 1 and flexible VM nic for Network adapter 2.  THis way it was easy to tell in SME setup which one was internal and which one was external.  I changed them later for performance tuning after the initial SME install.  Start the VM for the first time and it will boot from the ISO and then start installing SME.  Note: Install SME with the noraid option, Raid is handled at the Hypervsior level and you will never need SME Software RAID in a virtual machine. 

By setting up the SME Virtual server on a different hard drive from the boot drive, it is separate from the hypervisor setup.  If you use the free version and want to move from one version to the next, you update the BootStore drive and then import the SME Virtual machine back into the inventory with very little down time.  If you only have one large drive in the physical server, this is a moot point and you will have to manually copy your Virtual Machine folders to another location for backup.

Setup SME with a DHCP that does not include the static IP address of your NIC A card (192.168.x.254)  This is reserved for the Hypervisor.  The rest of the SME install would be however you want, server or server/gateway.  After the SME server is installed and running as a Virtual server, you should change the CD rom to not use the ISO and not to connect on bootup.  Next, install the VMware tools.  I find this is the best procedure and does not break any templating in SME.  From the VMware VSphere client, select the guest install/update vmware tools.  This connects the vmtools cd virtually to the SME server.  For convenience, I install the vmtools into a folder of the root folder.  From there, ./vmware-tools.pl can be run.  Follow prompts and let it install.  After installation the install/update vmtools can be unchecked and it will release the cdrom image.  Next at the server prompt add the link to start the vmtools automatically.

Code: [Select]
ln -fs /etc/rc.d/init.d/vmware-tools /etc/rc7.d/S90vmware-tools
service vmware-tools start

The final step of SME setup in VMware, is to shut down the SME virtual server and change the network cards.  After the Virtual SME server is shut down, you can change the network card to one of the Vnet drivers.  Restart and reconfigure SME from the server console to recognize the new Virtual NIC card.  Depending on your physical card, it’s a trial and error as to what performance gains you might see.   I found e1000 driver to work the best for me using Dell Broadcomm Ethernet adapters. 

After you've finished building the SME in virtual and its running as you want, you can let SME do the yum update to update any new packages. 

At this point you have a virtual SME server running; now you can create other Virtual machines on your physical VMware Hypervisor box for other functions.  I use windows xp and windows 7 virtual machines and connect them to the SME server through the VM LANSwitch network.  They act as real physical computers on a real LAN. 
My current configuration hosts my SME 8.b7 server, another Linux server, two windows workstations, all running all the time.  I also turn on and off 2 other SME servers for testing as well as 2 other workstation configurations.  The VMware handles it all with no noticeable performance decrease for SME that acts as the primary file/print server, web server, and NAT gateway.

Hopefully some will find this useful in their virtual server strategies.  Thanks to all who’ve contributed to the success of SME.





Offline Knyte

  • ***
  • 41
  • +0/-0
    • knyte.org
Re: An Alternate approach to SME in a virtual setting
« Reply #1 on: May 24, 2012, 11:41:37 PM »
Thank you!!  My VMTools is working correctly, finally :)
SME 10.1 running in ESXi 5.5