3 Replies Latest reply on Nov 8, 2012 10:26 AM by samdoyle

    Create VM Screenshot process hangs in VMWare Studio 2.6

    BillWade Lurker

      Greetings.

       

      I am using VMWare Studio 2.6 with ESX 5.0 as the provisioning server. I am pretty sure this is a bug in version 2.6.  Here is what I have.

       

      The 2.6 version of VMWare studio introduced a new feature where a screenshot is taken of the provisioning process every 5 seconds.  This is, I guess, a nice trouble-shooting feature (you can see what was on the screen of the guest VM in the event that the provisioning process fails).  However, I find that sometimes the screenshot fails (or rather never completes).  It just sits with a status of "In Progress."  If that happens, then my whole build just hangs (it's sitting there waiting for the OS and Applications to install). In actuality, all the OS and Apps HAVE been installed, and the provisioned VM is shut down just waiting to be copied back to Studio.  But with the Create VM screenshot process sitting in that "In Progress" state, this never happens.  This only happens intermittently, so it seems to be some kind of timing issue (my guess this is occuring when the VM shuts down for the last time...the screenshot is trying to go, but the VM shuts down in the middle, or something like that).

       

      OK, so what I REALLY want to be able to do is just disable the stupid screenshot feature.  But there doesn't seem to be any way to do that. After a long and frustrating time Googling, and some more time grepping the word "screenshot" on the Studio box, I found a script that appears to control the feature. There is a function in /opt/vmware/lib/build/VMDK/ProvInterface/Vim.pm.  I simply replaced this:

       

      #==============================================================================
         # To get screenshotfile by calling downloadScreenshotFromDatastore
         #==============================================================================
         sub getScreenshotFile {
            my $self = shift;
            my $filename = VADK::Constants::SCREENSHOT_FILENAME;
            my $status = $self->downloadScreenshotFromDatastore($self->{&K_STATUSDIR},$filename);
            if ($status) {
               my $fullpathname = $self->{&K_STATUSDIR}.'/'.$filename;
               return $fullpathname;
            } else {
               return "";
            }

       

         }

       

      With this:

       

      #==============================================================================
         # To get screenshotfile by calling downloadScreenshotFromDatastore
         #==============================================================================
         sub getScreenshotFile {
            return "";
      #      my $self = shift;
      #      my $filename = VADK::Constants::SCREENSHOT_FILENAME;
      #      my $status = $self->downloadScreenshotFromDatastore($self->{&K_STATUSDIR},$filename);
      #      if ($status) {
      #         my $fullpathname = $self->{&K_STATUSDIR}.'/'.$filename;
      #         return $fullpathname;
      #      } else {
      #         return "";
      #      }

       

         }

       

      I'm no Perl expert, but I think that I am basically just commenting out the screenshot pathname and returning 0. I know this is not the "right" way to do this.  But I have to say that this HAS cleared up my problem.  My VMs no longer hang.  And the "Creating screenshot" process that was happening every 5 seconds has ceased. Everything seems to be working fine now. I find the whole feature kind of useless anyway.  I wonder how hard it would be to put a setting on the profiles to disable the dumb thing?

       

      Am I the only one that has seen this?  Anyone know of a better way of disabling the automatic screenshot feature?