Wednesday 27 November 2019

ssd - Can I run a virtual machine from external USB drive?


A question regarding how to setup my VMs on internal/external disks. First, here's my setup:



  • Host OS: Windows 10

  • Processor: i7 5600U

  • RAM: 16 GB

  • VMware Workstation Player (Licensed)


I have 3 VMs so far and I'm soon getting a 4th and there's not enough space on my internal SSD anymore, so I need an external disk to place some of them on. I have a laptop with USB3 ports and a dock for the laptop with an eSATA port. I read about the speeds of both, and 5Gbps vs 6Gbps doesn't look like that much of a difference to me (but I'm not an expert on this) - and the only other USB devices connected are cabled mouse and keyboard.


What I'm using the VMs for: I'm a developer, and the different VMs are for different development environments.



  • 1st VM is running Windows Server 2008 with Visual Studio, SQL server and K2 Blackpearl.

  • 2nd VM is running some Windows Server 2012 with Visual Studio, SQL server and BizTalk (among other things I don't know yet - this is the new VM I will get soon)

  • 3rd VM is running Ubuntu and will be used for Python development (probably in PyCharm)

  • 4th VM I haven't gotten around to yet - I was employed about a month ago :-)


My questions:



  1. Is it possible to run a VM from an external HDD? (Or is SSD a must here?)

  2. Will USB3 suffice or should I get one that also supports eSATA?

  3. Is it better to store the less frequent used VMs on the external drive and then move them to the internal drive, when I need to use it? This will require me to move a VM from internal drive to external first, hence this question.

  4. Is it even possible to run a VM from an external drive without major performance loss?


I think that was it for now. I look forward to your answers.


Best regards,


Joakim


For anyone who finds this post and wants to know the result: I had some doubts about this pre hand, and I would not recommend this setup for any developer. The boot time is horrible and starting apps like Visual Studio takes at least 3-4 times as long time.


My advice: Only use this solution if you have no alternatives.



Answer



The answer depends a bit on what the VMs are supposed to do. For "paperwork" like writing and reading you'll be fine. "Major performance loss" is not a well-defined value.


For most people it should be okay. If you find yourself to be an extremely impatient computer user, get the fastest equipment you can, I would even suggest replacing the internal SSD with a bigger one. A 2 TB SSD is now on the market, which may or may not be too expensive for you (700-800$).


For programming, you likely won't get much more bang when writing code. You might get a performance boost when compiling. If you're not the type to do stuff in parallel while your code is compiling, get the fastest equipment you can.


The TLDR is: If you can afford it or if you don't have HDD lying around, get an SSD, internal or external (eSATA or USB 3). When in doubt, get the good stuff.



  1. Is it possible to run a VM from an external HDD? (Or is SSD a must here?)


Yes, it is possible, but you will likely have some performance loss. The VM should run okay as long as you don't have operations that require a lot of file writing. Also, the smaller the VM, the better. If you have a 50-60 GB Windows VM, it will be very slow on an external 5400 HD with USB 3. I am speaking from experience here. You can still do stuff, but it will take a while.


Running more than one VM on an external HDD at a time may bring a severe performance loss. Consider using two external HDDs for that scenario.



  1. Will USB3 suffice or should I get one that also supports eSATA?


USB3 should be fine, at least it was in the cases where I used them. Faster is better. If you haven't bought the external HDD yet, you might want to go for eSATA because you never know what you'll use your spare USB ports for. (You may want to add a 2nd external drive for back-up purposes.) With an HDD, you might not get much more performance from eSATA because file-writing and -reading speeds on a spinning platter disk are the limiting factor.


Also try to get an SSD or at least a 7200 rpm HDD for the external drive, if you can still find one. Or build one from an external case and an external USB enclosure. If you can't afford an SSD, a 7200 will cut file transfer times by a few percentage points.



  1. Is it better to store the less frequent used VMs on the external drive and then move them to the internal drive, when I need to use it? This will require me to move a VM from internal drive to external first, hence this question.


I think you should keep the VMs that will do lots of heavy lifting like file-writing and computing intensive stuff on the internal drive, irrespective of how often you use them. Shifting them can be quite a pain. Copying a 20 GB VM from internal to external HDD will take about 6-7 minutes at 60 MB/s. Internal to external SSD will be substantially faster. If you find the performance from the VMs on the external disk acceptable, moving them around might not be necessary. You can cross that bridge when you get there.



  1. Is it even possible to run a VM from an external drive without major performance loss?


See 1., yes it is possible for normal to medium computer work, if the VM is small. If you do graphics design or lots of file transfers, there may be a severe performance loss.


For your programming needs I would suggest on data gathered elsewhere that you get an SSD (What is more important CPU or RAM for compiling large software, e.g. bootstrapping gcc?, http://www.overclock.net/t/997361/compiling-and-cpu-usage). Though there are some dissenting opinions (https://stackoverflow.com/questions/15199356/speed-up-compile-time-with-ssd). Again, when in doubt, get the good stuff.


Edit: Januar 5th, 2016 - added some information due to recent experiences


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...