-
Using VMs for development enviroment
Posted by
Harvs
on 19 May, 2014 02:49
-
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?
-
#1 Reply
Posted by
IanB
on 19 May, 2014 03:14
-
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.
-
#2 Reply
Posted by
GeoffS
on 19 May, 2014 03:20
-
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.
-
#3 Reply
Posted by
Harvs
on 19 May, 2014 03:30
-
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.)
-
#4 Reply
Posted by
GeoffS
on 19 May, 2014 03:45
-
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.
-
#5 Reply
Posted by
Rigby
on 19 May, 2014 03:51
-
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.
-
#6 Reply
Posted by
nerdyHippy
on 19 May, 2014 04:00
-
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?
-
#7 Reply
Posted by
hamster_nz
on 19 May, 2014 04:12
-
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.
-
#8 Reply
Posted by
IanB
on 19 May, 2014 04:23
-
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.
-
#9 Reply
Posted by
Harvs
on 19 May, 2014 04:33
-
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.
-
#10 Reply
Posted by
IanB
on 19 May, 2014 04:44
-
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.
-
#11 Reply
Posted by
hamster_nz
on 19 May, 2014 05:12
-
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.
-
#12 Reply
Posted by
plesa
on 19 May, 2014 06:44
-
I'm also using VMware workstation. There is only one exception- hardware keys, it does not work with VMWare.But it is rare nowadays.
-
#13 Reply
Posted by
Jeroen3
on 19 May, 2014 07:37
-
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.
-
#14 Reply
Posted by
nctnico
on 19 May, 2014 12:19
-
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.
-
#15 Reply
Posted by
Harvs
on 19 May, 2014 14:06
-
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.
-
#16 Reply
Posted by
krish2487
on 19 May, 2014 19:32
-
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.
-
#17 Reply
Posted by
synapsis
on 19 May, 2014 22:53
-
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.
-
#18 Reply
Posted by
codeboy2k
on 20 May, 2014 05:14
-
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.
-
#19 Reply
Posted by
jeremy
on 20 May, 2014 05:43
-
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!
-
#20 Reply
Posted by
krish2487
on 20 May, 2014 09:50
-
Centos as host.
Sorry, I should have be more specific in the first post.
-
#21 Reply
Posted by
neslekkim
on 20 May, 2014 11:04
-
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)
-
#22 Reply
Posted by
nctnico
on 20 May, 2014 12:32
-
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.
-
#23 Reply
Posted by
Rigby
on 20 May, 2014 12:59
-
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.
-
#24 Reply
Posted by
neslekkim
on 20 May, 2014 14:36
-
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..