Tuesday, September 16, 2008

Adding a Serial port to a VM on ESXi

Back when we setup our System Center Operations Manager servers, we decided to virtualize them using VMware. Although we had an ESX cluster with datastores on our SAN, we felt that it would be counterproductive to put the monitoring system on the same hardware that we wanted to monitor. After all, an ESX or SAN outage would take the monitoring system offline so nobody would get notified.

Therefore we setup a separate Dell 2850 with Windows 2003 Server 64-bit, running the free VMware Server. At the time we setup our virtual root management server with a serial GSM modem so that it could send SMS notifications (more on that here). Since our GSM modem was serial based, all we needed to do was plug the cable into the 2850's COM1 port, then add a virtual serial port onto the virtual machine and connect it to COM1.

When VMware released their ESXi hypervisor for free, we decided to change from VMware Server to VMware ESXi. The hypervisor promised better performance and memory management and seemed like a nice upgrade. Unfortunately we soon discovered that VMware ESXi 3.5 update 2 does not support mapping a physical serial port to a virtual serial port.

To work around this problem, we purchased a Digi One SP serial over ethernet device for around $150. So now instead of connecting the modem directly to the COM1 port on the back of the Dell server, it now connects to this device which is connected to an ethernet port. The steps are pretty simple:
  1. Attach the device directly to a spare ethernet NIC on the back of our Dell server using a cross-over cable. Note that we could just connect it to our existing network infrastructure, but again we wanted the monitoring system to be self contained and able to send pages even if the network was offline.
  2. In the VMware Infrastructure Client, add a new virtual switch to the ESXi server.
  3. Shut down the RMS virtual machine to add a new virtual NIC which is assigned to the new switch we just created.
  4. Power ON the VM and configure the new NIC with an unused private address (in our case 192.168.0.1).
  5. Uninstall the existing GSM modem from the RMS virtual machine.
  6. Install the Digi One SP software on the RMS virtual machine. The software takes you through a wizard which detects the device and allows you to configure its IP address (in our case 192.168.0.2). Accept all the defaults to install a "RealPort" virtual COM3 port.
  7. Install the GSM modem through the control panel and connect it to the new COM3 port.
  8. Test using the Microsoft SMS Sender and then with Operations Manager.
On a side note, we've been extremely happy with VMware ESXi. I think the performance improvement has been noticable. Besides, I appreciate not having to install all the Microsoft patches on it every month.

8 comments:

Øystein said...

I've tried to use another type of ethernet to serial adapter - but I can't get it to work. Does the type you use show up in device management as a comport ?

Scott said...

Yes, after installing and configuring the Digiport software in the VM, there is a new COM3 port. I then added the modem using the normal Windows modem discovery through the control panel.

Soren Larsen said...

Are you running Windows Server 2008 on the guest VM? Digi's official stand is that they support Windows Server 2008 for the Digi One SP, but not in virtual enviroments.

If it works for you, I guess i will go ahead and order a Digi One SP.

Scott said...

Hi Soren. My server is running Windows Server 2003. Everything is still working like a charm. I have not tested on Windows Server 2008.

I'm sure you'll agree that it's a poor business choice if Digi decides not to support virtual environments, since their product seems ideally suited for them. I've seen similar warnings from a lot of companies that are scared to support VMware. However, I've yet to run into anything that hasn't worked when I thought it should.

Dmathurin said...

Hey Scott. I have tried everything that you just did. Dosen't seems to work. Do I need to reboot the Host server? So far it looks like there is no communication between the DIGI SP and the virtual switch cause it shows connect at 1G speeds. I have updated the firmware and downloaded the latest realport drivers. The Digi Discovery still dosen't pick it up. Any suggestions would be helpful. Thanks in advance

andy said...

Thank for this post. I used some of your information to successfully setup my own configuration of a multitech modem with Digi One SP on my SCOM R2 environment.

I documented the complete procedure and everything purchased on my blog, http://andywolf.com/scommodem/.

The only issue that I had was that I was trying to attach to HP Blades and the Chassis only had pass-thru NIC's that were gigabit only. The details can be found on my site for the work around.

ircmaxell said...

Just as a fyi:

The reason that some manufacturers don't support virtual environments is a matter of timing. On a physical machine, timer interrupts are all but guaranteed to fire at the appropriate time, which makes sending or receiving a stream at a predetermined rate (anywhere from 9600bps to 256000bps)... On a virtual system all that's guaranteed is that a timer will fire, not when... It may work, especially if both sides have sizable buffers, but some serial hardware doesn't like sloppy tolerances in the signal. There's a decent chance that the signal will not conform to standards (due to low timing tolerances), so they don't support it.

If it works for you, great! But chances are pretty high that for a heavily loaded VM host it may or may not work at all...

Ian Narcisi said...

Has anyone tested SMS using Orion NPM?