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

0 Members and 1 Guest are viewing this topic.

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Using VMs for development enviroment
« on: May 19, 2014, 02:49:08 am »
A few people on here in the past have stated they have a VM for each major project specifically setup with all the tools etc needed.

As I spend more time on the road in different places juggling different clients projects (and some that get dragged up from the past) this idea sounds like it's got some real merit.

For those that do it, what are your experiences/recommendations?
- What VM software do you find best? (I mostly use Windows code/pcb tools with some Linux server development)
- Are there any significant hassles?
- What's performance like on a modern decent PC running things like Altium, VS and Eclipse?
- Does unplugging and plugging in embedded USB hardware cause any issues? (i.e. I assume it can be automatically routed through to the VM every time it's plugged in.)
- Any tips on managing them / archiving.
- Anything else?
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11902
  • Country: us
Re: Using VMs for development enviroment
« Reply #1 on: May 19, 2014, 03:14:34 am »
I don't use VMs much, but if I do I find VMware works better than Virtual PC.

It's best to have a modern processor with hardware virtualization. Most recent processors support this.

You can never have too much memory. 8 GB minimum, 16 GB better. If your VM starts paging to disk you will soon be re-programming your machine with a hammer.

You will also want a fast disk and disk interface. Not as important as memory, but faster is always better.

If you want to program/debug micros, you will need to check carefully to find what works. VMs often have limited access to external hardware and ports.
 

Offline GeoffS

  • Supporter
  • ****
  • Posts: 1272
  • Country: au
Re: Using VMs for development enviroment
« Reply #2 on: May 19, 2014, 03:20:13 am »
I've used VMware (Workstation) for a number of years and I've been happy with it.

As IanB said, lots of memory. I currently run an older AMD 1090T (6 core) with 16GB of memory. Host OS is Linux and guests are both linux and Windows.

Graphics response in the latest versions is pretty good (I do a bit of CAD stuff) and direct hardware access to USB ports is supported.


 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Using VMs for development enviroment
« Reply #3 on: May 19, 2014, 03:30:29 am »
If you want to program/debug micros, you will need to check carefully to find what works. VMs often have limited access to external hardware and ports.

That's actually my biggest concern.  I've got a i7-3770k with 16GB ram and decent drives, so I imagine performance will be adequate (at least IDEs if not CAD.)

VMware appears to have a free version that I could probably at least try the programmers and see if it works (Pickit3 and STLINK/V2 are the main ones I use.)
 

Offline GeoffS

  • Supporter
  • ****
  • Posts: 1272
  • Country: au
Re: Using VMs for development enviroment
« Reply #4 on: May 19, 2014, 03:45:39 am »
If the device is USB based, you should have no problems. 
USB ports can be switched from the host OS to guest OS seamlessly.  I do this with cameras, a weatherstation and Arduinos.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Using VMs for development enviroment
« Reply #5 on: May 19, 2014, 03:51:38 am »
For me the bottleneck has always been disk IO.  Get an SSD or you'll find yourself waiting a lot more than you should.

Spinning disk already has terrible seek time, and with a VM you have to divide that time up between concurrent operating systems.  You feel it fast.  If you wind up swapping in the host OS or the guest, kiss a few minutes goodbye.
« Last Edit: May 19, 2014, 03:53:23 am by Rigby »
 

Offline nerdyHippy

  • Contributor
  • Posts: 37
  • Country: us
Re: Using VMs for development enviroment
« Reply #6 on: May 19, 2014, 04:00:08 am »
If you want to program/debug micros, you will need to check carefully to find what works. VMs often have limited access to external hardware and ports.
I've only got experience with virtualbox, but I've never had a compatibility problem that upgrading to the latest version didn't fix. Granted my requirements aren't terribly esoteric - i.e. programming whatever micro with whatever USB-based programmer. Can you elaborate on what problems you've had?
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Using VMs for development enviroment
« Reply #7 on: May 19, 2014, 04:12:07 am »
The great thing about a VM is that any licensed software gets tied to the VM's MAC address or disk signature, so can be moved around quite easily if your upgrade your PC.

I use Virtual Box and have no complaints, other than you can't dynamically grow disks.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11902
  • Country: us
Re: Using VMs for development enviroment
« Reply #8 on: May 19, 2014, 04:23:06 am »
Can you elaborate on what problems you've had?

I haven't tried to use microcontroller dev tools from a virtual machine. But since VMs in general are somewhat insulated from the physical hardware, you do need to check what works with the setup you have in mind. You don't have any guarantees.
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Using VMs for development enviroment
« Reply #9 on: May 19, 2014, 04:33:10 am »
So would getting a second ssd just to hold the vm's disk be the best solution?

They're not that expensive anymore so if it makes a real difference it could be worth it.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11902
  • Country: us
Re: Using VMs for development enviroment
« Reply #10 on: May 19, 2014, 04:44:27 am »
So would getting a second ssd just to hold the vm's disk be the best solution?

I wouldn't go that far. A large ordinary disk should be fine for VMs unless you have some requirements out of the ordinary.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Using VMs for development enviroment
« Reply #11 on: May 19, 2014, 05:12:43 am »
The great thing about a VM is that any licensed software gets tied to the VM's MAC address or disk signature, so can be moved around quite easily if your upgrade your PC.

I use Virtual Box and have no complaints, other than you can't dynamically grow disks.

You can create a dynamic disk that will grow as needed but it will NOT shrink down again.

On VMware you can build a VM with a 20GB disk, and if you run low on space you can edit the VM and say "oh, make that disk 80GB". If the VM is running Windows you then hop into Storage Manager, rescan the disk and expand your C: file system by 60GB.  Virtual Box doesn't let you do that... Even in the Virtual Media Manager with a powered off VM you can't change the "Virtual Size"  of a disk.

Unless of cause I am being a stupid user and just can't find the feature.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Using VMs for development enviroment
« Reply #12 on: May 19, 2014, 06:44:46 am »
I'm also using VMware workstation. There is only one exception- hardware keys, it does not work with VMWare.But it is rare nowadays.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Using VMs for development enviroment
« Reply #13 on: May 19, 2014, 07:37:09 am »
I use Virtualbox as a sandbox for new tools (new versions and such) to test of they don't mess up my normal workstation.
Graphics is fine, you can play video in it, but you might get some mouse-lag when using cad tools.
USB is fine, but you have to tell virtualbox to route that specific PID/VID to guest. Otherwise the host locks it and you cannot pass it over anymore.

Yes, it is slow if you have a single hard drive.
And I've only seen the Windows XP mode thing being capable of shrinking a virtual disk.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26945
  • Country: nl
    • NCT Developments
Re: Using VMs for development enviroment
« Reply #14 on: May 19, 2014, 12:19:53 pm »
For me the bottleneck has always been disk IO.  Get an SSD or you'll find yourself waiting a lot more than you should.

Spinning disk already has terrible seek time, and with a VM you have to divide that time up between concurrent operating systems.  You feel it fast.  If you wind up swapping in the host OS or the guest, kiss a few minutes goodbye.
I use Virtualbox on Linux (32 bit with 12GB). The problem with Windows is that it tries to swap as much as possible to disk to keep as much memory unused. Far from ideal when you need lots of memory for running a VM. Linux tries to keep everything in memory (including a disk cache) so it only starts swapping when there is no other alternative. For example: sometimes I compile a complete Linux system which is several GB of source code and object files. Linux keeps everything in memory so there is no difference in time between a (silent) 5200rpm hard drive and an SSD.
« Last Edit: May 19, 2014, 12:24:19 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Using VMs for development enviroment
« Reply #15 on: May 19, 2014, 02:06:15 pm »
I ended up picking up an SSD on the way home anyway.  I wanted a separate drive for the jobs I'm currently working on that I could pull and take with me easily if and when needs be.

I popped Win7, Eclipse and Keil on a VMware machine, and well, it pretty much performs as fast as on the host machine.  Really I can't complain so far.
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 501
  • Country: dk
Re: Using VMs for development enviroment
« Reply #16 on: May 19, 2014, 07:32:17 pm »
Quote
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.

Centos + KVM.

works just fine.
If god made us in his image,
and we are this stupid
then....
 

Offline synapsis

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
    • Blackcow
Re: Using VMs for development enviroment
« Reply #17 on: May 19, 2014, 10:53:17 pm »
I use VMWare for almost all of my development environments and haven't had any problems since Workstation version 6 or so.

I've used Eclipse, IAR, Visual Studio, Arduino's crap IDE, Android development... all without problems. In addition, I use it at work with PLC packages from Siemens, Rockwell, Mitsubishi, Omron, etc... and even with the odd hardware interfaces they require it works fine.

Plus being able to take the whole development environment off my desktop to a laptop for field debugging is priceless in itself.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Using VMs for development enviroment
« Reply #18 on: May 20, 2014, 05:14:10 am »
Plus being able to take the whole development environment off my desktop to a laptop for field debugging is priceless in itself.

I do this.  I use a separate virtual machine for each development project.  I use a 256GB  sata3 on an USB 3 external drive, and it's pretty fast.
This way I can carry the SSD disk from home to office to client without a hitch.

Just remember to backup your project source code to another disk; the tools can be replaced but the source cannot.
Carrying the disk around has an extra risk associated with it that it will be lost or damaged.



 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Using VMs for development enviroment
« Reply #19 on: May 20, 2014, 05:43:32 am »
I use VMWare fusion 6 on Mac OS. I run various instances of OSX, windows, linux and solaris pretty much every day. I have an i5 with 16GB of ram with a PCI Express SSD and I have no noticeable slowdown. In fact I'm usually running 2-3 VMs at once.

Nowadays I never get any problems related to virtualisation other than the occasional really odd USB device (and usually it is the vendor's fault, not VMWare). Oh and I can't attach bluetooth low energy devices to any slave machines, not supported yet apparently.

PS: the best bit is that when you upgrade your laptop/desktop, you just need to copy + paste and all of your software is migrated!
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 501
  • Country: dk
Re: Using VMs for development enviroment
« Reply #20 on: May 20, 2014, 09:50:28 am »
Centos as host.

Sorry, I should have be more specific in the first post.
If god made us in his image,
and we are this stupid
then....
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Using VMs for development enviroment
« Reply #21 on: May 20, 2014, 11:04:38 am »
So would getting a second ssd just to hold the vm's disk be the best solution?

I wouldn't go that far. A large ordinary disk should be fine for VMs unless you have some requirements out of the ordinary.

I'm doing that on my office laptop, once you have tried it, you wont go back :)
(three ssd's, one for os/programs, one for sources, and one for all kind of stuff, amongst databasefiles and virtual machines, couldn't be happier)
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26945
  • Country: nl
    • NCT Developments
Re: Using VMs for development enviroment
« Reply #22 on: May 20, 2014, 12:32:58 pm »
I'm not a fan of using seperate disks. I quit doing that about 20 years ago. The problem is that you always run out of space on one disk and start putting stuff on the other disk(s) and thereby scatter information all over the place. If you are worried about losing data: get a NAS and use rsync to make a backup while you are sleeping.
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 #23 on: May 20, 2014, 12:59:28 pm »
I'm not a fan of using seperate disks. I quit doing that about 20 years ago. The problem is that you always run out of space on one disk and start putting stuff on the other disk(s) and thereby scatter information all over the place. If you are worried about losing data: get a NAS and use rsync to make a backup while you are sleeping.

That's a disk sizing and/or data management problem, not a disk quantity problem.

There's nothing fundamentally wrong with multiple disks, especially given that one can mount disks as folders within other disks using symbolic links or junctions.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Using VMs for development enviroment
« Reply #24 on: May 20, 2014, 02:36:06 pm »
I'm not a fan of using seperate disks. I quit doing that about 20 years ago. The problem is that you always run out of space on one disk and start putting stuff on the other disk(s) and thereby scatter information all over the place. If you are worried about losing data: get a NAS and use rsync to make a backup while you are sleeping.

Have 256GB+256GB+1TB, and data that I need to keep, is on server, only what I use here, I don't want to have an big disk that I cannot reformat if the OS craps on me, with this setup, I can take out the two last disk, reformat the maindisk, or replace it, and get up and running in notime. (kinda)
but yeah, stopped using multiple partitions, like I did for long time ago, but most of the problem back then, was the max size of the bootpartition, that is not an problem now, and regarding how windows works, it works good with multiple disk, instead of single disk, compiletimes are insanely fast compared to one single disk..
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf