Denver - ALARM

cancel
Showing results for 
Search instead for 
Did you mean: 

Using VirtualBox with LabVIEW

Recently, I started using Sun's VirtualBox for the various LabVIEW versions I need to run as a Systems Integrator (yes, some of my clients still use LabVIEW 7.1). VirtualBox is a free VM from Sun that is much like VMware, Parallels, and other VMs.

With my LabVIEW subscription, I get quarterly updates of LabVIEW Professional Developer Suite, TestStand, and the PDA Module. I religiously uninstall and reinstall all of my LabVIEW software on my laptop and dektop (in full compliance with the EULA) on every quarterly release. This usually takes me an entire evening or two to accomplish, and is fairly disruptive since it ususally occurs right in the middle of a project.

To resolve this, I decided to install:

     - 1 VM for LabVIEW 7.1.1 on Windows XP SP3

     - 1 VM for LabVIEW 8.5.1 on Windows XP SP3

     - 1 VM for LabVIEW 8.6.1 on Windows XP SP3

     - and 1 VM for WIndows7 RC1 just for experimentation

Virtual box has been fairly stable running in this manner, and now, I've uninstalled all NI software off of the host computer, and run it strcitly on the VM now. This makes the host a lot cleaner, and each VM doesn't need to be reinstalled when I get my quarterly updates, just the most current version of LabVIEW (in this case 8.6.1 on the XP VM). When LabVIEW 2009 comes out, I can simply create another VM, and install the latest version there, keeping my old LabVIEW VMs pristine. Obvioulsy, you can also experiment with LabVIEW on different OS version and platforms this way too, if you have the licenses. By The way, My Windows XP Pro has not denied any activations while doing this (on the smae hardware), but I presume it will tap out eventually.

Have fun with VirtualBox, it's really cool!

0 Kudos
Message 1 of 10
(17,097 Views)

Hi John,

Thanks for sharing on this.  I've been considering this idea as I run into similar issues all the time.  The thing I haven't been clear on is the licensing.  Is it acceptable to have multiple VM's installed for Windows?  Does it matter for LabVIEW?  I'm sure it's within the "spirit" of the NI license as long as you're not running multiple VM's at the same time.  I'm not sure how "spirited" NI or Microsoft really are, however (although NI has been very good with the time's I've worked with them on flexing rules).  Do you know the official scoop for either of these?  I'm not trying to call you out, just wondering as I'd like to follow your lead!

This would be useful at larger companies who use a central code management group to do builds.  There are so many development environments in use here at Ball, for example, that having a central build manager deal with all of these is an issue.

Do you notice any speed difference?  My only VM experience was when I installed Win7 beta on the Microsoft VM product.  It was almost unusably slow, but that was a beta to be fair.

Thanks,

Mike Matthes

0 Kudos
Message 2 of 10
(9,526 Views)

Good Morning John and Mike,

     I don't see any reason why you could not legally install a number of older versions of LabVIEW on different virtual machines.  You can legally use any past version of LabVIEW if you have the current seat and you can't physically be programming in two of the different versions at the same time.  I think this is a great idea John!   I was considering setting this up on my personal machine as well and this is something that our support team does regularly to support Linux, Windows and multiple older versions of LabVIEW.  Thanks for the comment.

Sincerely,

Will

0 Kudos
Message 3 of 10
(9,526 Views)

John,

   I second Mike's thoughts:  Thanks for posting this!  I've been thinking for a while that some sort of virtualization should be a reasonable strategy for dealing with these issues.  A free tool that works well is definitely interesting...  The last time I played with virtualization, I think I used VMWare, and performance was lacking.  Are you satisfied with the responsiveness of these systems?  Also, what is hardware access like?  I assume LV can get to the serial ports and ethernet.  What about PCI boards?

   I also second Mike's licensing concerns.  When I did try this before, I got a second XP license for the virtual machine.  Maybe unnecessary, I'm not sure.  I wouldn't claim to speak for NI in any way, but my guess is that something could be worked out on the LV side.  At a minimum, we're allowed to install LV on three machines per license.  This would chew through the three pretty quickly, though.  It would be nice if NI would sign off on the idea that this all counts as one "real" machine...  In my experience, NI has been pretty accomodating for developers, recognizing that we're in positions that require slightly unusual setups to support all our customers.  This harks back to a discussion long ago about keeping old versions of LV installed.  Again, not claiming to speak for NI or to fully understand the licensing intracacies, but it is conceivable that the standard LV license allows for one installation, meaning that when you upgrade from 8.0 to 8.2, you technically should uninstall 8.0.  But my recollection is that NI signed off on the idea that developers really need to maintain older versions for customer support.  (As I'm writing this, Will has indicated that NI is fine with the multiple-older versions of LV idea.)

   On a related note:  It's soon getting time for me to replace my main development machine.  A thought I had was to buy a Dell laptop that comes with XP preinstalled and Vista on a CD.  When I get it, I'd image the XP install, then upgrade to Vista.  Install a partitioning tool and multi-boot tool, then reinstall the XP on a new partition.  Save another couple of partitions for W7 and maybe even Linux.  A different solution to a similar problem.  In this case, there is no performance penalty.  Lincensing questions still apply.  There is some flexibility lost:  e.g. with virtual machines, you can create more and more for each version of LabVIEW.  With multi-OS booting, it's a more involved process to keep creating more machines.

   Any comments on the multi-boot option?  What about disk space?  Multi-boot requires a defined partition for each machine.  VMWare reserved a big file in the native OS for each virtual machine.  How does the Sun tool work?  Can you change the size of the OS files after a virtual machine is created?  Even with today's huge disks, size is going to be an issue, especially for a laptop.

   I'm guessing that the best approach might be to get a laptop dual booting on Vista (or W7) and XP, then use virtual machines inside one of those for additional dedicated LV installations.

Cheers,

   DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
Message 4 of 10
(9,526 Views)

As for LabVIEW licensing, if you read through the EULA it states that you can install it on 3 machines. I presume that also means olders versions, in other words I can install LabVIEW 7.1 3-times, LabVIEW 8.5 3-times, and LabVIEW 8.6 3-times. I ususally only install it twice, Once on my laptop, and once on my dekstop. The use of VMs doesn't change that model, and I believe NI's EULA addresses VMs: http://www.ni.com/legal/license/. Since I'll only be using 1 version at a time, I presume I'm in compliance, as Will has already mentioned.

AS for Windows XP licensing, I can only share my experience. I have never been denied an activation. I own 4 Windows licenses (one Vista). When I have migrated a license to new hardware, the system would (ocassionally) not activate over the internet, but it would allow me to call Microsoft, and activate over the phone. This link will shed some light on how Microsoft grants activation: http://www.microsoft.com/piracy/mpa.aspx

By the way, this is similar to the model I'll be using in the Product Activation Toolkit I plan on releasing later this year.

I believe Windows activated on my box because it didn't detect any hardware changes, other than the Voume ID of the VirtualBox drive. Product Activation and enforcing EULA compliance, while closely related, are 2 very different things. It makes sense for NI, Microsoft, and any other software vendor to have a very robust activation algorithm that never fails, or not have one at all. Abuse or piracy could then be easily measured by simply monitoring the data collected at activation, and counting the number of activations, and the hardware deviations at each activation.

In any case, I own 4 Windows licenses, am about to buy a 5th, and am seriously considering a developer subscription: http://msdn.microsoft.com/en-us/default.aspx, which has it's own licensing gotchas. As for NI, I've been subscribing to LabVIEW, TestStand, and the PDA toolkit for over 6 years, and have invested nearly $20K into all of my software.

As for your performance question,  believe it or not, I have actually found some operations to be faster, which I have no explanation for. Sun is one of my clients, and I am a former employee. There are some very sharp people there, and some wonderful technologies have come out of that company. VirtualBox has been working great for me. I did notice that Windows7 in particular seemed more sluggish than XP, but that may be the OS itself, or the fact that it is in beta. On a side note, Windows 2000 never required activation, and for it's time, was a fairly tight little OS, so you may want to check that out also. But in a nutshell, I have found the performance of VirtualBox to be stellar!

0 Kudos
Message 5 of 10
(9,526 Views)

Thanks for the insight, John.

I'll go a little off track here.  I recently purchased a driver from a company that was protected and required activation.  This has proven to be painful on many levels, so I want to just issue a "be aware" notice.  One fun issue is it was tied to the NIC, which I believe is a common stategy.  Unfortunately, we were running with a USB network adapter when we activated, and subsequently removed the USB adapter, locking the driver.  Multiple NIC cards cause confusion.  For runtime, the licensing required the .exe name, but I like to place the revision number in the .exe.  I had to change my practice for this driver.  Lastly, activation was via email to this single guy.  He was pretty responsive, but his driver would be completely unusable without the activation, and we would sometimes have to wait a day or two for him to get a reply.  I just wanted to throw out these lessons learned, and hopefully you have all these types of issues covered

I like NI's activation for the most part, especially the 30 day grace period.  I will say our license server is down about 3 days a month, but it typically doesn't shut us down due to this grace period.

0 Kudos
Message 6 of 10
(9,526 Views)

You can spoof NIC MAC addresses in the registry:

http://www.nthelp.com/NT6/change_mac_w2k.htm

0 Kudos
Message 7 of 10
(9,526 Views)

Wow, that's some serious hacking!  Now I can finally hide from the world!

0 Kudos
Message 8 of 10
(9,526 Views)

Harware access is tricky. Check out this thread regarding hooking up my PDA via USB to the VM: http://decibel.ni.com/content/message/6099#6099I. did get it to work, but it took some finesse.

As for PCI boards, I've used MAX to setup simulated DAQmx devices, and that worked well, but I have'nt tried an actual board yet, so I'd be interested to see what happens if you try it. The serial port has several settings, as does the network. I had the best luck using the network in bridged mode. When I used NAT mode, it wanted my IP of the VM to be on the 10.0.0.x subnet, whereas my LAN is ssetup to be 192.168.0.x. Both are the typical ranges I've seen for LANs, but the VM couldn;t access my Workgroup across subnets, so I switched to briged mode, and walla, eveything worked better. I still need to experiment with this.

The serial port by default is set to "Disconnected", but there are several other modes called "Host Pipe", "Host Device", and "Raw File". THis is another area I need to experiment with, but it appears encouraging.

As for your laptop, I'm in the same boat. I sold an ASUS and a SOny earlier this year, and have been without a laptop for nearly 6 months, so I really need to get one. THe problem is, I can't find what I want. Eric recently bought a Dell that has 1920x1200 pixels. Pixels are REALLy important to me as a LabVIEW developer, but I seem to have to trade off weight, size, speed and cost, even on the Apple platform (which I alsmost bought). I really liked my Sony a lot, and the ASUS had some great pixel specs as it was built for gamers, but it was very heavy.

As for the disk, we have been benchmark testing Solid State Drives for about 2 years now. Without disclosing any confidential information, I'll just say theat the technology is not quite fully baked yet. However, Tom's Hardware has some real good info on SSDs. I am targeting this technology for my next laptop. The Lenovo X301 is more or less in the same class as the MacBook Air. It's only 2.5 pounds, but I realy want more pixels (it has 1440x900). I also want more speed (it's 1.4GHz). The Dell Adamo is one of the new kids on the block, but I'm more inclined to get a Lattitude. Anyhow, SSDs are getting bigger, so you should be able to dual boot and still have room for VM disks. VirtualBox default to 10G. I would reccomend upping that for LabVIEW development. My LabVIEW 8.6.1 installation plus TestStand 4.2, the PDAtoolkit, and the Pocket PC SDK got my drive up to about 8G. I would also reccomend setting up a contiguous swap file. Usually, windows makes this dynamic. If you simply set the 2 number to be the same, you should get 1 unfragmented file.

If your laptop has easy disk removal, you could buy 2 SSDs and swap them when necessary.

0 Kudos
Message 9 of 10
(9,526 Views)

I've found that the "Import Appliance" and "Export Appliance" save some steps in cloning VMs. I'm not commenting on the legal, ethical or licensing implications here, merely the functional benefits. Once you've installed an OS, you can clone it by using "Export Appliance" and then later import it. This saves you the steps of going through the installation, activation, and customization, and configuration steps for each VM.

0 Kudos
Message 10 of 10
(9,526 Views)