LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

VirtualBox Article

Not sure if this is the right group or not, but probably the most relevant I could find.

I'm presenting at the ALARM user group next week and thought I'd share what I'd written with this group as well:


Thanks!
0 Kudos
Message 1 of 19
(14,958 Views)

Excellent article John,

I myself am an avid user of VirtualBox. I have a number of pre-prepared VirtualBox operating systems set up with different LV installations in each. For every project I do, I start from one of these clean, up-to-date, installations knowing there will be no interference from other applications of versions of LV. Then when a project is finished, I move the whole Virtual Operating System off my machine onto a secure backup. This way anyone in my company can grab a copy at any time and pick up the work if future development opportunities arise, without having to consider if they need to install/uninstall anything. It works very well and I've had no trouble integrating any of the National Instruments software on guest OS's.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 19
(4,743 Views)

Hey John,

Maintenance of multiple versions of the development environment is a very common problem and a hot-topic for our customers, so I'm very interested to learn more.  Aside from the fact that it's free, is there any other compelling reason to choose VirtualBox over VMWare or Parellels?  Do you have any licensing issues when activating multiple copies of Windows?  Why would you recommend virtualization over having multiple bootable partitions on your HDD?  Finally, how many different versions of LabVIEW do you keep handy at the same time, and what would you estimate is the total size on disk of lugging all those partitions around?

Thanks for posting the link!

Eli

Elijah Kerry
NI Director, Software Community
0 Kudos
Message 3 of 19
(4,743 Views)

Hi Elijah,

Let me join the discussion. I use VirtualBox as well. Mainly to test LabVIEW evaluations, but I did use it initially to work with LV 8.2 (now I have both LV 7.1.1 and LV 8.2 on one HDD and I learned to use them wisely).  VirtualBox is much smaller than VMware (never heared of Parellels). It's very simple in setup and use. Waiting for a PC to boot is a waste of time, so having virtual machines you save a lot of time. However even having virtual machines with different LV versions you still have to keep an eye on vi's if they are all on the same server. So it's still important to use different branches in  a version-control system for given LV version and work locally on the virtual machine.

Jakub

0 Kudos
Message 4 of 19
(4,743 Views)

Hi John-

Thanks for the detailed article.  We've been considering VMware internally for these same reasons.

You mentioned that PCI is not currently supported by the VirtualBox VMs.  To run DAQmx tasks on actual hardware, do you just export an NCE file from MAX on the VM and import the NCE file into the instance of MAX running in the native OS?  Have there been any associated challenges?

Is it acceptable to activate the native OS (e.g. Windows XP Pro SP3) on each VM with the same license?  What happens if you want to load the VM on another PC?  I'm picturing a central repository where we would keep all the VMs (e.g. LV 8.2, LV 8.2.1, LV8.5, etc.).  Then, if someone needs to edit old code, they pull down the VM and open the code.  Would not activating the VM solve the problem of having VMs with specific Windows license keys in the repository?  You recommended activating the appliance before creating the VMs, so I'm trying to understand if that would work with a central repository.  Or, is each VM hardware specific such that I cannot create a VirtualBox VM on one PC and open it on another?


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 5 of 19
(4,743 Views)

Is it acceptable to activate the native OS (e.g. Windows XP Pro SP3) on each VM with the same license?

I'm not sure, but I'd be willing to guess that this is not exactly acceptable in Microsoft's eyes.  Probably no worries if you're just doing in-house development. (depending on your ISO policies etc.)  But you would run into licensing issues if you tried to distribute the images.

What happens if you want to load the VM on another PC?

This is the best part!

You just "export" your VM from one PC, and "import" it into another.  I've done this several times and it's a huge time saver.

You recommended activating the appliance before creating the VMs, so I'm trying to understand if that would work with a central repository.  Or, is each VM hardware specific such that I cannot create a VirtualBox VM on one PC and open it on another?

Each VM *is* hardware specific.  But when you export the VM, you're exporting the hardware too....since it's virtual.  This means that regardless of the host PC, your VM is still running on the same virtual hardware.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 6 of 19
(4,743 Views)

Hi Eli,

I'll try to answer as much as I can:

I don't have any experience with VMWare or parallels, so I can't offer any differentaion or comparison. The free factor is pretty compelling. Also, parallels I believe is a Macintosh product, so that might be an obvious choice for Mac users.

As far as the activation goes, there have been a lot of questions about that. I have 2 suggestions. The first is to read the EULAs for Microsoft, NI, and Virtualbox Products thoproughly and understand what is and is not acceptable. The 2nd is an observation. When I've activated a Windows Key on a VM running on the same hardware as the host, it seems to activate withou fail every time. However, I have had some issues when moving that key to another hardware platform, so I would say trial and error is your best bet. Some on this thread have claimed to check the VMs in and out of a repository without problems, presumably across different hardware platforms.

As for VMs vs. disk partions, it seems to me that the advantages/disadvantages are mixed. I chose the VM so I can boot my main Windows 7 host and do everday tasks like email, browsing, Office apps, Accounting apps, etc. while leaving my LabVIEW development to the VMs. I do install the latest version of LabVIEW on my main host for issues that may arise on the VM, and also so I can do "power development" and use my three 26" monitors and have lots of diagram open simultaneously. Multiple monitos on VirtualBox is an advanced and somewhat cumbersome feature. If I were to use partitions, I would have to boot into a particular version for development, and reboot to do my everyday tasks.

The number of versions I keep go something like this:

The XP Appliance

LV 7.1.1 + realtime

LV 8.0 + PDA toolkit

LV 8.5.1

LV 8.6.1 + toolkits:internet, office, sql

LV 2009 + TestStand 4.2 + PDA + toolkits:internet, office, sql

The last one is the largest at about 15GB, the rest are smaller, especially the LV 7.1.1 at about 7G, and the appliance at about 2GB. Looks like a total of about 40GB

sizes.PNG

0 Kudos
Message 7 of 19
(4,743 Views)

HI LabBEAN,

As for the PCI issue, I must admit I've made an ssumption here based on some gogling about VirtualBox. I just shipped out my last DAQ board last month and haven't actually tried to talk to a DAQ PCI card in a VM. It would be interesting if someone on this thread could confirm that. I can confirm that I have tried a simulated DAQ device in MAX, and that works just fine. I believe an NCE export/import would work OK.

As for activation, I'll have to defer to my reply to Eli above. It is possible that moving it from one platform to another could work, but I would cite several findings. On page 6 of my article, I've shown a dialog that I recieved when trying to move an activated VM from my Windows 7 dekstop to my Windows XP ULCPC netbook. I did not try to reactivate it, but instead purchased another copy of XP for the netbook. I suspect you could activate it, but that would likely require the phone in to Microsoft, and I'm not sure how many of those they will allow, but I would guess that it is finite.

Also, on page 9 of my article, I cite 2 links regarding activation which imply possible circumventaion, which I am not advocating here, just including for information and completeness in understanding how activation works.

0 Kudos
Message 8 of 19
(4,743 Views)

Hi

     VirtualBox cannot pass through any PCI cards, as their drivers will require direct memory mapping. You would require a specialised virtual machien to do this. Systems like NI RealTime Hypervisor or Xen act as a bare metal hypervisor and interrupt any interrupts through to the virtual machines and automatically map memory. Hosted virtual systems cannot allow this. USB and ethernet devices can be passed through in a hosted virtual environment as they are software drivers and not DMA based. For DAQ you could try using CompactDAQ as this could be passed through, I haven't tried so cannot guarantee it would work, but it should . I looked at Xen a couple of years ago and it was going to be very hard to do this, and the amount of effort to get it to work versus getting a machine and ghosting it didn't seem to pay off. Things may well have changed by now.

Mike

0 Kudos
Message 9 of 19
(4,743 Views)

Mike,

On the issue of CompactDAQ in VBox, I can confirm that it does work .

I've used CompactDAQ with LabVIEW 8.6.1 in XP within a virtual environment, hosted by Windows 7. I remember some small technical issues with VirtualBox managing to successfully pass the device through, which were a little frustrating, but in the end I managed to get it to work perfectly well. There have been a few new releases of VirtualBox since then that may have tackled these USB-related issues (I did all this about a year ago).

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 10 of 19
(4,743 Views)