Author Topic: Using VMs for development enviroment  (Read 11507 times)

0 Members and 1 Guest are viewing this topic.

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Using VMs for development enviroment
« Reply #25 on: May 20, 2014, 07:09:19 pm »
If one understands what IOPS are and how they apply to physical disk, one would never consider a single-disk virtualization solution.

Run a VM from a USB 2.0 thumbdrive to see what an exaggerated version of that feels like.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26952
  • Country: nl
    • NCT Developments
Re: Using VMs for development enviroment
« Reply #26 on: May 20, 2014, 07:58:42 pm »
That may be true if you run a a couple of dozen heavily loaded server VMs but for desktop use a single disk is just fine as long as the OS does proper disk caching and memory management (IOW: I wouldn't use Windows as an OS to run VMs on).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Using VMs for development enviroment
« Reply #27 on: May 21, 2014, 02:04:45 am »
Linux grinds the disk plenty if it's doing actual work.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26952
  • Country: nl
    • NCT Developments
Re: Using VMs for development enviroment
« Reply #28 on: May 21, 2014, 08:10:01 am »
True but only if it really has to or has nothing better to do. Like I mentioned earlier: even for a huge compilation task it doesn't make a difference to use an SSD or a relatively slow hard drive on Linux.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Using VMs for development enviroment
« Reply #29 on: May 21, 2014, 01:36:26 pm »
Well then it's a good thing no one uses Windows.
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Using VMs for development enviroment
« Reply #30 on: May 22, 2014, 12:29:39 am »
Well then it's a good thing no one uses Windows.

I have up to now, simply the dev tools I need to make a living are Windows only.

While I'm not willing to bet the farm on it just yet, swapping to Linux and running all the dev tools under VMs would be an interesting proposition.

But how do you go with USB devices that only have Windows drivers?  Is it as simple as the VM with Windows on it can communicate with the USB device without the host OS being capable of recognising it?
 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Using VMs for development enviroment
« Reply #31 on: May 22, 2014, 12:31:33 am »
But how do you go with USB devices that only have Windows drivers?  Is it as simple as the VM with Windows on it can communicate with the USB device without the host OS being capable of recognising it?

yep
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Using VMs for development enviroment
« Reply #32 on: May 22, 2014, 12:33:41 am »
But how do you go with USB devices that only have Windows drivers?  Is it as simple as the VM with Windows on it can communicate with the USB device without the host OS being capable of recognising it?

yep

Wow...  I always assumed it just wouldn't work.
 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Using VMs for development enviroment
« Reply #33 on: May 22, 2014, 12:42:06 am »
Well with VMWare, it just provides a standard generic "device" driver which can be selectively attached to any USB device plugged into the system. When it is attached, the host can't touch it and the VM has all of the USB traffic forwarded to the virtualised USB chipset.

I've had a >99% success rate with it, even with random devices from all over the place. You can even attach a USB HDD with NTFS to a windows VM and pull the data out through there if you don't have the necessary filesystem drivers to mount it with your host. Same goes for EXT2/3/4 on windows/mac. I have in the past attached a USB drive to a linux vm for data recovery purposes.

There is also a VMWare tool which exports a physical system to a VM. I used it for an old win98 PC which had some obsolete PLC software for which the disks had been lost many years ago. Worked perfectly, and now everyone can have a copy of the software on their modern computers.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Using VMs for development enviroment
« Reply #34 on: May 22, 2014, 01:33:17 am »
VMware Converter.  Yep, it works great.

If you run windows on either the host or the guest, which most do, at least use a separate disk for the VM. Ideally you would use an SSD that held both the host and guest. 
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Using VMs for development enviroment
« Reply #35 on: May 22, 2014, 01:50:54 am »
Wow...  I always assumed it just wouldn't work.

Linux Windows and Mac all support USB "pass-through" which does what you imagine.  Passes it straight through to the VM.

Some virtualization platforms support PCI and PCI-E pass through as well.  Hyper-V does this on windows server with supported cards.  This is how one can use high performance workstation graphics cards in a server, through a virtual machine or machines, over remote desktop and get great frame rates with real CAD apps remotely.

Virtualization tech has come a very long way.
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Using VMs for development enviroment
« Reply #36 on: May 22, 2014, 03:12:04 am »
Please excuse my noob questions, but is there a particular flavor or configuration of Linux that works best as the host in this situation?
 

Offline alex.forencich

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: us
    • Alex Forencich
Re: Using VMs for development enviroment
« Reply #37 on: May 22, 2014, 04:04:53 am »
VirtualBox's USB support is horrible and mostly broken. VMWare's is much better. It's a shame because I would prefer a FOSS product, but end up using VMWare because, well, it actually works.

What does that mean? Please be a little specific.

On Windows it just doesn't work most of the time. When it does I find it flakey. For some reason it just doesn't attach the USB device to the VM. I am on Windows 7 x64, might be better on x86. I couldn't be bothered to find out, VMWare just works.

That's very interesting.  I have had no problem with passing various USB devices through to a 64 bit Windows guest in Virtualbox under 64 bit Arch Linux.   I have an old USB based scope that I used to use that way all the time, and it even worked on my eee pc.  It was slower than molasses due to the single-core Atom processor, but it worked. 

More recently, I have had no issues with passing a USB network card through so I can use my N5306A PCI express protocol analyzer.  The dang thing is network booted, so it needs a dedicated network interface and the control software installs all manner of BS including a 3rd party DHCP server and FTP server.  Incidentally, I tried to install the control software on an older windows laptop a few days ago, and I couldn't get it to connect correctly, even after completely turning off the firewall.  I ended up setting up another VM.  But with all the baggage it drags along, I think the VM solution is definitely the way to go, even if the host itself is windows.  It also works just fine with a shitty Chinese EPROM programmer. 

Most of my development is done under Linux, so having a working VM is very important when I do need to fall back in Windows.  The one thing that eally gets to me, though - every time I turn it on, it has some damned windows update to install.  Every. Freaking. Time.
Python-based instrument control: Python IVI, Python VXI-11, Python USBTMC
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Using VMs for development enviroment
« Reply #38 on: May 22, 2014, 04:29:53 am »
Turn Windows update to manual install, or download and let me decide. that way when you are finished with the VM or are going home you can do the updates and leave them to run without bothering you. Just minimise the VM window while it is doing that, and check after an hour to see if it has the nag screen about rebooting. Reboot the VM and then shut it down.
 

Offline alex.forencich

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: us
    • Alex Forencich
Re: Using VMs for development enviroment
« Reply #39 on: May 22, 2014, 04:47:24 am »
Turn Windows update to manual install, or download and let me decide. that way when you are finished with the VM or are going home you can do the updates and leave them to run without bothering you. Just minimise the VM window while it is doing that, and check after an hour to see if it has the nag screen about rebooting. Reboot the VM and then shut it down.

I suppose I should probably do that, but it's more just surprising that they release so many updates that basically every time I start up the VM, there is something new to install. 
Python-based instrument control: Python IVI, Python VXI-11, Python USBTMC
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Using VMs for development enviroment
« Reply #40 on: May 22, 2014, 07:04:21 am »
So are people sharing an OS virtual disk between their various VMs?
With WXP I could get the OS, a toolset, and a set of projects, on a 10G virtual disk, and that wasn't so bad.  But W8 is much larger (30G according to "system requirements") and does seem as tunable for smaller systems, and that starts to get painful.  Sharing a single W8 OS disk and putting the tools and projects on separate disks would be OK, except that most tools tend to heavily pollute the OS disk with DLLs and such.  Sigh.

My experience (Older Mac Pro 8core/10Gmem host, Virtual Box, no SSDs) has been pretty pleasant.  Host OS disk caching seems pretty effective; the first time you start up AS6 (for example) is pretty painful (as it is on real hardware!), but subsequent startups are better, even if you've rebooted the VM in between.

Don't start up enough VMs that your host starts swapping/paging, though!  Ouch!  (2G has been enough RAM for WXP VMs.)
 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Using VMs for development enviroment
« Reply #41 on: May 22, 2014, 07:55:37 am »
I run all my stuff on a little macbook retina 13inch. The secret is not really much of a secret. Get an enormous SSD, get it on PCIX, get a ton of RAM. Rarely is anything CPU bound. 512GB PCIX SSD, 16GB RAM for me and it cost about AU$2000 if I recall. Given that I use my computer for all of my work basically every day, this paid for itself practically straight away. I can have a win8 VM with 6GB, linux VM with another 6GB and still leave 4GB for the host or for another little VM (usually a little install that just includes some stupid vendor tool that I have to use).

The mac/pc/linux wars are not a thing for me, I just use all of them  ^-^

And yes, fast SSDs are expensive. But so is your time! And the reason I use VMs is to keep the systems separated, it would be against my goals to have a shared disk. I'd rather just pay for the disk space.
« Last Edit: May 22, 2014, 07:57:16 am by jeremy »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26952
  • Country: nl
    • NCT Developments
Re: Using VMs for development enviroment
« Reply #42 on: May 22, 2014, 11:05:10 am »
So are people sharing an OS virtual disk between their various VMs?
I'm using a network share to store the data. The network share is on the same machine as the VMs so that is extremely fast. I found sharing a local folder with Virtualbox to work flaky (I didn't test the latest version though).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online hans

  • Super Contributor
  • ***
  • Posts: 1642
  • Country: nl
Re: Using VMs for development enviroment
« Reply #43 on: May 22, 2014, 11:26:29 am »
I'm an occasional user of VirtualMachines on VMware player or Virtualbox (most often Vbox).

In general, I don't see the comments made here. Maybe I'm not using them enough to encounter them, or they are specific to the host platform (I use Windows 7 in Test Mode), but USB and shared folders support has all worked mostly OK for me. USB took 2 tries initially, but it took my G25 wheel joystick fine and installed the "custom" driver inside the Windows machine.

I've even ran some OpenGL games inside Vbox, as it's a nicer place to be when you're trying to see how their internals work. That way I don't spoil my host Windows, where I run all games in Steam with it's lovely DRM & Punkbuster-kinda bots.
DirectX seems to be broken or very flaky support, also in VMware player (the sole reason I have it installed). Especially on Linux with ATI graphics. I hate that, I was hoping it may be an alternative to applications that don't run on Wine but benefit from (light) 3D work.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf