{"id":1757,"date":"2013-09-25T09:37:03","date_gmt":"2013-09-24T21:37:03","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=1757"},"modified":"2013-09-25T09:53:57","modified_gmt":"2013-09-24T21:53:57","slug":"parallels-9-and-vms-on-external-drives","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/1757\/","title":{"rendered":"Parallels 9 and VM&#8217;s on External Drives"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p>Not a Delphi or even Pascal related post on this occasion, but an experience that may interest any developer running Windows in a VM on a Mac.<\/p>\n<p><!--more--><\/p>\n<p>I have been using <a href=\"http:\/\/www.parallels.com\/au\/\">Parallels desktop virtualisation solution<\/a> to run Windows on my iMac since the day I got it (or I should say &#8220;them&#8221;, since I have one at work as well as my own at home).<\/p>\n<p>Up to now it has &#8220;just worked&#8221;, and worked very well.<\/p>\n<p>A few weeks ago I decided I needed to shuffle things around to free up some space on my system volume.   As part of that I decided to move my VM&#8217;s onto an external HDD.  After some initial experimentation with one VM I concluded that this was not having any material impact on performance (one concern I had read when considering such a move) so went ahead and moved them all.  I have quite a few:<\/p>\n<ul>\n<li>Oxygene (Windows 8 64-bit, Oxygene + Visual Studio Express editions for Mobile and Web etc)<\/li>\n<li>Delphi (Windows 7 64-bit, all key\/interesting versions of Delphi)<\/li>\n<li>Windows 7 for apps &#8211; a &#8220;sandbox&#8221; where I can try apps out<\/li>\n<li>Windows 7 for games<\/li>\n<li>Android x86<\/li>\n<li>LAMP<\/li>\n<\/ul>\n<p>Plus various templates that provide &#8220;clean&#8221; baseline VM&#8217;s that I can use to create new VM&#8217;s as\/when appropriate.  All up, almost 500GB of VM&#8217;s, so moving these things takes time, especially over USB 2.0<\/p>\n<p>But for a couple of weeks this has all been chugging along nicely.<\/p>\n<p>Then, this past weekend, there was an <strong>OS X Mountain Lion<\/strong> update and a <strong>Parallels 9<\/strong> update, which I applied and that&#8217;s when my troubles seem to have begun although I didn&#8217;t realise until a little later.<\/p>\n<h3>The Problem<\/h3>\n<p>On Sunday I tried to fire up my <strong>Oxygene<\/strong> VM and was told that the VM could not be started due to an error: &#8220;<strong>Unable to change permissions on virtual machine<\/strong>&#8221;<\/p>\n<p>I hadn&#8217;t changed any permissions myself so had no idea why this would be a problem now.  I tried my <strong>Delphi<\/strong> VM.  Same problem.  Same problem with <strong>all<\/strong> my VM&#8217;s in fact (except one, which I only discovered yesterday &#8211; I&#8217;ll come to that in a minute).<\/p>\n<p>But I have had trouble &#8211; once &#8211; after a power outage damaged a volume leading to spurious errors that had me similarly scratching my head for a while.  Verifying and repairing the volume fixed things on that occasion.  There was no power outage in this case, but I thought I&#8217;d try it anyway.  It didn&#8217;t help on this occasion.<\/p>\n<p>Worth noting is that the specific &#8220;<strong>Repair permissions<\/strong>&#8221; facility in <strong>Disk Utility<\/strong> only applies to files installed by software packages and so cannot help if the issue is with permissions on user created files, as in this case.<\/p>\n<p>A peek at the Parallels support forums provided a few clues from older Parallels versions (but nothing recent), such as explicitly setting read-write permissions on specific files in the VM bundle.  Initially this seemed to help.  I was able to start my VM&#8217;s after changing the permissions, but once having been stopped\/suspended they again refused to restart.  Curiously, the modified permissions had reverted and this time changing them back to read-write made no difference.<\/p>\n<h3>Have You Tried Switching It Off and Back On Again ?<\/h3>\n<p>I tried re-booting the entire system.<\/p>\n<p>Hey presto!  My VM&#8217;s would once again start\/resume as normal.  But only on and only once.  Having started just one VM and then suspended it all the VM&#8217;s once again became unusable.  It didn&#8217;t seem to matter which VM I chose as my one and only VM to start.<\/p>\n<p>There then followed many fruitless hours trying to figure out how <strong>OS X<\/strong> permissions worked beyond the simplified level at which they are exposed via <strong>Finder<\/strong>.<\/p>\n<h3>Love \/ Hate<\/h3>\n<p>I confess to a love\/hate relationship with OS X.  I <strong>love<\/strong> the way it &#8220;just works&#8221; pretty much all the time and I <strong>love<\/strong> the way that the dirty details are kept out of the way but can be got at when needed.  But I <strong>hate<\/strong> the dirty details themselves.  Or rather, the fact that information about them can be hard to find.  I actually quite like working with a CLI, and the <strong>OS X<\/strong> terminal reminds me a lot of my old <strong>Amiga<\/strong>&#8230; but I digress.<\/p>\n<p>As I said, it was fruitless.  Getting dirty with details didn&#8217;t help.<\/p>\n<p>Parallels support remoted to my machine on two separate occasions, and they couldn&#8217;t figure it out either.<\/p>\n<h3>A Solution &#8211; Hopefully Only Temporary<\/h3>\n<p>Then yesterday I realised that there was one VM still living on my system volume &#8211; <strong>Windows Games<\/strong>.<\/p>\n<p>And it started just fine.  <em>Start-Stop-Start-Stop<\/em>&#8230; no problem.<\/p>\n<p>So I moved one of the smaller VM&#8217;s back from the external drive to the system volume.  <em>Start-stop-start-stop<\/em>&#8230; no problem.<\/p>\n<p>Clearly something has gone wrong either as part of the OS X update, the Parallels update, some bizarre interaction between the two or &#8211; possibly &#8211; corruption on the volume in question that the verify\/repair tools are not able to identify.<\/p>\n<p>Now though I can at least get back to &#8220;work&#8221; by simply moving my VM&#8217;s back to the system HDD.<\/p>\n<p>Hey ho.<\/p>\n<p>At some point I shall shuffle things around so that I can reformat before putting everything back and seeing if that fixes things.<\/p>\n<p>In the meantime, this could be a cautionary tale for anyone contemplating putting their VM&#8217;s on an external drive.<\/p>\n<p>Or, if someone has had similar experiences in the past and can shed some light on how they solved it, that would be useful too.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span>Not a Delphi or even Pascal related post on this occasion, but an experience that may interest any developer running Windows in a VM on a Mac.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,180],"tags":[],"class_list":["post-1757","post","type-post","status-publish","format-standard","hentry","category-delphi","category-oxygene"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-sl","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=1757"}],"version-history":[{"count":4,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1757\/revisions"}],"predecessor-version":[{"id":1761,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1757\/revisions\/1761"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=1757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=1757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=1757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}