Virtualization

I am trying not to derail another topic in the Technical Discussion forum:

So what are people using virtualization for in FIRST circles?
It’s a technical specialty that really deserves it’s own discussion.

Team 11 is using VMWare for BobCAD on their Haas CNC machines.

Has anyone used the Driver’s Station in VMWare Fusion on an Mac OSX?

Has anyone used the Driver’s Station on an HVM on Linux?

I use virtualbox for virtualization. It works great and is free. It is quite feature-packed, and I can access the desktop from school because it has a built-in RDP server. That allows me to code in Linux from school, in robotics.

The reason why I like Linux running in virtualbox is because it is easier to work in from the command line (my opinion), and is much more stable (with my experience). Virtualbox allows me to put together the features of both OSes!

Back in 2011 I did all the code for our robot in a VMWare Fusion VM along with running the driverstation for testing. Never actually tried it in a match… we used the classmate back then.

For 2012 and 2013 I dual booted my Macbook with Windows 7 and have been using it for FRC coding and driverstation in competition without any issues

Dualbooting will give a better performance (by a lot). However, virtualization will allow you to run both OSes at the same time so you don’t have to reboot constantly. Because of that, I do both :smiley:
I dualboot Ubuntu, using Wubi
I run Debian, ChromeOS, Android and Ubuntu within virtualbox

If my dad gifts me with a 2TB HDD of christmas, the first thing I would do is install multiple OSes on it! :smiley:

By the way, can I boot my Wubi disk within virtualbox, somehow, or the other way (boot virtualbox with wubi?)

I run VirtualBox in seamless mode with CentOS and occasionally Ubuntu with Windows 8 as the main O/S. I do too much in Windows to give it up entirely (Plug-N-Play hardware, my encrypted USB jump drive, CAD, games, MS Office-required things).

The virtual machines are used so I can develop embedded applications using Linux since I understand the native development tools in Linux far better than Windows PowerShell (awk, sed, grep, find, etc). For my 3D print jobs Slic3r works better in Linux (requires a rebuild to see 3D renders of planned printed parts) but other parts of my process require windows-only apps (Pr0nterface).

VirtualBox seamless mode allows me to have the best of both worlds, most of the time.

We use both BobCAD and HAAS mills, but I’ve never heard of using VMware with it. What is it, and what does it do?

If I am right to understand that you want to know what VMWare it, it is one of those softwares that allows you to run an operating system within a working OS! That enables you to seamlessly work with multiple OSes at once. It is basically another exact competitor with VirtualBox, HyperV, Windows VirtualPC and other virtualization software!

2010 - 2012 seasons, I used to run Autodesk Inventor and LabVIEW in an XP VirtualBox VM running on top of Ubuntu. I used Ubuntu for all my non-FIRST computing (worked better for CS schoolwork and research projects). Took quite a bit of stubbornness to keep at this when Inventor would crash because it ran out of memory - 4GB isn’t a lot to split between two OSes. I’ve since switched back to pure Windows 7 because most of my projects (a lot of them at least related to work projects) are now Windows-based, but I may be going back to a Linux dual boot because I’m starting to a project using ROS.

To respond to the OP’s question: I did run the Driver Station in the XP VM, but only for shop testing, and USB support wasn’t very good then, so I could never get the joysticks to work.

That’s a one line question that is begs an answer much longer than one line :).

Basic information:

As noted by other posters above: virtualization software generally allows you to divide your computer somehow.
This technology has been around for decades.

That’s a nice simple one line answer. Now let’s get into details:

For the sake of this post: OS = operating system

HVM (hardware virtual machines) create a set of fake hardware that you can install another OS on.
The HVM conceals from the installed OS that it’s passing along requests to actual hardware so it’s often called: full virtualization.
Paravirtualization on the other hand, creates an environment where an OS aware of the paravirtualization can share resources with another.
Finally OS level virtualization creates a situation where an operating system can start more copies of itself with some containment.

Virtualization can be powered purely by software emulation which hurts the computer performance.
Virtualization can be accelerated by hardware built-in to the system processor (Intel calls this ‘VT-x’ and AMD calls it ‘AMD-V’).
Not all CPU support this additional feature, it’s quite common that the cheaper lower end Intel CPU do not have it enabled in the microcode.
When the feature is available generally it can be controlled (at least on and off) in the system firmware (BIOS or EFI).

Some virtualization software can only handle 32bit software others can handle 64bit and 32bit software.
If you intend to run a 64bit OS in a virtual machine it is best your processor and an host operating system support 64bit operation.

On a computer without PAE support a 32bit host OS is limited to 4GB of RAM and, as a result, you’ll be dividing that somehow with the virtualization.

In many cases there is a host or native OS. That’s the OS that basically would still be there if you removed the virtualization entirely (perhaps the copy of Windows that came on the computer from Dell for example). If the virtual machines run without this they are generally called ‘bare metal’ which really means they are running in a very tiny framework designed to just get things going and offer minimal features.

In the case of paravirtualized software there’s also what’s sometimes referred as the hypervisor OS. Xen for example boots a microkernel that starts the hypervisor OS (for example OpenSuse Linux) and then from there starts and monitors all the other virtualized resources. The Xen framework offers the guest OS (a guest OS plural or singular is anything not the hypervisor) the resources of the hypervisor operating system and the Xen microkernel upon which it all runs. In Xen you are not ‘bare metal’ you need the hypervisor operating system. In contrast VMWare ESX is bare metal it needs no hypervisor OS and provides all the basics to pack the computer with HVM.

Some common virtualization software capable of hosting an HVM (probably the most useful for FIRST teams):
VMWare: ESX, Workstation, Player, Server
Parallels
Oracle VirtualBox
Microsoft XP Mode
Microsoft HyperV

Some common virtualization software a FIRST team might find for their web hosting:
(Citrix) Xen (yes this microkernel can be run for HVM on a workstation but most people do not)
OpenVZ
FreeBSD jails

**
Preface:**

I have 6 licenses of BobCAD mill in my name, 5 licenses of BobArt and 3 licenses of BobNest. That represents versions 21, 22, 23 and 24. The current shipping product from BobCAD is version 26. Shortly I am working on transferring some version 25 licensing to my name as well. Version 22 has a USB key the others do not but require activation. BobCAD often is negotiable about the license cost but if you own BobCAD you probably recognize how much that much BobCAD I just listed would cost to acquire. I did so over the course of years for various CNC projects I built.

So the issue I have is that for me I will not hesitate to take one of the hundreds of computers I own regardless of age and put BobCAD on it in whatever OS is suitable as the older versions of BobCAD do not always work properly in the newest versions of Windows.

However where the school is involved I do not always have the luxury of picking the hardware or software I desire. Often times they are Dell computers with an OEM or educational volume license. These days they’ll arrive with Windows 8 and a free upgrade via the Microsoft App store to Windows 8.1. Anyone that is an administrator that opens the App store will likely be prompted to upgrade Windows. I found that BobCAD version 23 which I put on that sort of computer does not play well with Windows 8.1. It depends on .NET framework 1.1 and an older Visual Studio 2005 runtime that blows up fantastically in that operating system version. It generally installs with Predator CNC just fine. However BobCAD itself will not start properly even if you ‘run as an administrator’ and ‘run as Windows XP Service Pack 3’ per the BobCAD directions. You get an ‘unusual shutdown of the C++ runtime has occurred’ error from MSVCR80.DLL just before Windows slams the executable to a close.

As a Microsoft developer I am aware that there are standing compatibility issues with .NET Framework 1.1 and the Visual Studio 2005 runtime starting in Windows 7 and increasing into Windows 8.1. Patches have been made. Workarounds tried. Warnings during install exist. Still the issues remain.

What does VMWare do for us:

With VMWare I can put a copy of Windows XP Service Pack 3 in a virtual machine. Unlike the ‘XP Mode’ from Windows 7 this virtualized environment from VMWare offers pretty much top of the line graphics acceleration (for a virtual machine). Plus there’s support for passing through USB devices like we need for the Keyspan USB2-to-RS232 adapter we use to communicate with the Haas controller in the mill.

As an added bonus with the virtualized container it is possible to pick up the entire ‘virtual machine’ and move it to other PC (keeping in mind that a change from Intel to AMD virtualization technology is not transparent to the virtualized OS). So if the computer for the mill dies we can just move the data to another and all the details move with it (the tooling settings for the loaded 10 tool umbrella tool changer, the interface settings, whatever other utilities you may have installed, the virtualized OS settings). Literally just copy the virtual machine files to the other PC. Install the proper version of VMWare Player and you are all set. Heck if that virtual machine was suspended when you moved it, usually you can just restart it on the other hardware and it’ll start right back up.

In point of fact it should be possible to pick up the virtual machine from Windows 8.1 as we have it now and move it to a Linux host. Then pick it up from there and put it on Mac OSX. I move VMWare virtual machines all day and this works surprisingly well (of course most of the virtual machines I move are not attached to milling machines…but they do sort of run the economy).

More information:

In this case the Haas mill has a controller and therefore it handles generating the really hard timing requirements for the machine operation within itself. That means that effectively BobCAD can even drip feed G/M code to the machine at 19,200 baud and keep it running.

If the machine required precise timing for steppers that is typically done with the parallel port with or without an FPGA. This makes the PC connected to the machine the CNC controller and in that setup virtualizing the operating system running the timing critical parts is probably asking for trouble.

There is no reason, however, I can’t take a PC acting as a controller with the CNC controller software installed on the native OS (Linux or Windows) and suitable resources and put the VMWare virtual machine on it (with whatever OS is in that virtual machine) so I can run BobCAD to feed the CNC controller in the native operating system. Effectively doing both on the same computer from the user perspective at the same time. From BobCAD’s perspective it won’t really know it’s feeding a program in the native operating system on the same PC.

If I was so inclined there’s nothing stopping me from putting all the versions of BobCAD I own in separate virtual machines each with suitable OS licensing and having them all on the same computer so I can call each one up for use one at a time. Maybe there’s a feature I know how to use better in one version than the other or it just works better in version 21 than say version 24. Then one day dividing those virtual machines out to several machines by just copying the data (so Team 11 just needs to buy 5 more Haas TM-1P and we can test that :)).

An important note:

I have no idea if the BobCAD company would consider this setup supported.
It doesn’t matter to me as long as it works.
If you do this and BobCAD doesn’t like it…well it is what it is.
For me it’s easy to make this issue irrelevant: I do have BobCAD on non-virtualized systems.

Why bother with the students using this:

Virtualization saves: money, time, power and variations on those themes.
It is unavoidable in any large computing environment going into the future.
The cost savings can be enormous.
Even if the systems need every last bit of performance: odds are they do not need to run 24/7/365 so there can be energy savings.

For a student it usually comes down to:
No money for more hardware
No want to trash their existing system doing testing
Easier to run the virtual machine than repartition and reboot over and over

techhelpbb, to someone like me who is not super experienced in VMs, I have to be honest, this sounds like a complete nightmare.

It is no more difficult than installing the OS in the virtual machine.
Then installing the software in that OS.

VMWare especially works very well.

I own a license for VMWare Workstation: I create a virtual machine with a certain amount of storage, CPU and RAM. I tell it to mount the OS CD-ROM in my drive. It boots like your computer installing the OS and off you go.

There are no more unusual issues setting that up than setting up any other physical computer.
The only way you escape that aspect is to get the computer with the OS already installed.

Keep in mind…I have worked in virtual environments with literally thousands of virtual machines (my current employer has 25,000+ systems many of them virtual nearly 1,000 are basically my responsibility) and I have nothing to do with the other students who have posted that have actually made variations of this work (regardless of BobCAD).

Honestly most of the students that have posted are using Oracle VirtualBox. That’s free and it not only has all the usual installation issues it has some issues on top of those. They seemingly have managed to work it out.

I did not use VirtualBox for BobCAD because: I wanted good graphics and communications support.
If VMWare couldn’t make this work it probably wasn’t going to get better with other choices and I’d be forced to put the problem down by putting the software back on whatever the PC was running for a native OS.

Now…you want hard? Try getting all the drivers to natively run Windows XP on a Dell Inspiron 660s. Let me know when you give up on the Dell internal WiFi driver. Basically that’s the choice instead of what I did. Which Microsoft ‘complete nightmare’ would you prefer? :slight_smile:

Course for the next option I can spend thousands to upgrade: whenever Microsoft or some other company decides to drop support for something. Maybe Microsoft’s monetary bottom line is a little light this month so it’ll be Windows 9. What’s that value to insulate yourself from this treadmill? Take a good look at your IT budget and what actually drives your costs.

Let’s play my favorite IT business game: what new and highly valuable function does this software treadmill actually get me for the cost of my investment this week? It still runs Word for now :). Maybe it opens ISO files without a free 3rd party plug-in? Gets me a graph of my file transfer rates without a 3rd party plug-in? Hey I can make it work like the last OS GUI I was forced to learn by installing: a 3rd party plug-in.

Keep in mind: IBM has been virtualizing systems long before there was a personal computer revolution (late 1960s and early 1970s).
There’s a lot to learn but the real nightmare is piling up huge piles of waste to avoid learning it.
The fundamentals of this technology are older than I am.

Also there’s the simple matter that a virtualization engineer with experience can likely demand a six figure salary.
http://www.simplyhired.com/salaries-k-virtualization-engineer-jobs.html
Versus:
http://www.simplyhired.com/salaries-k-cnc-programmer-jobs.html

So since we are willing as mentors to introduce students to CNC perhaps we should be willing to introduce them to virtualization.

Oh and I can do a virtualization job from basically anywhere with Internet with the client’s permission.
It is a bit harder to program CNC without a machine which is a pretty serious capital expense.

Wait, You guys have Haas CNC machines? Lucky… (sorry for being off topic)

How did you guys get them? Was it a donation or something? They are at least $60,000 without add ons

I will short jack my own topic:

Team 11 is using my license of BobCAD (saves potentially thousands).
Other donors and the school contributed, many thanks.
I gave Team 11 $1,000 towards the cost and a few hundred in tooling so far.

It is quite expensive we have the TM-1P. The tools add several thousand as well.

We already had a CNC plasma table which was the combined effort of several generous donors besides myself.

As I understand it we have some arrangement for a Haas CNC lathe which is on the way.