title: VBoxManage.exe: error: Could not find a registered machine named 'Windows-PC' while Running from Jenkins
body: <p>Here is the details of my environment.
  1. I have two nodes(win7x64 and winserver2008R2) added as slave in Jenkins.
  2. I have installed virtualbox to both the system and created virtualbox image with same MachineName, VM Name and Snapshot name.
  3. Now I have batch file with following commands:</p>
  
  <pre><code>    cd /d "C:\Program Files\Oracle\VirtualBox"
      VBoxManage snapshot "Windows-PC" restore "CleanPC"
      VBoxManage startvm "Windows-PC"
  
      VBoxManage --nologo guestcontrol "Windows-PC" execute --image "c:\\IntegrationTestAssemblies\\RunIntegrationTests.bat" --username "user1" --password "pwdddd" --wait-exit --wait-stdout --wait-stderr
  
      VBoxManage controlvm WindowsPC poweroff
  </code></pre>
  
  <p>*</p>
  
  <ol start="4">
  <li><p>When I run this command manually from host/slaves, it works perfectly. I have checked, vms are registered and <em>VBoxManage list vms</em> also returns list of vms.</p></li>
  <li><p>But issue i am facing is, while i am trying to run it through jenkins " using a Multi-configuration project, it fails to launch vm with error </p>
  
  <p>[exec] C:\Program Files\Oracle\VirtualBox>VBoxManage.exe snapshot "Windows-PC" restore "CleanPC" 
   [exec] 
   [exec] C:\Program Files\Oracle\VirtualBox>VBoxManage.exe startvm "Windows-PC" 
   [exec] 
   [exec] 2/25/2015 7:33:18 PM:     error: VBoxManage.exe: error: Could not find a registered machine named 'Windows-PC'
   [exec] VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
   [exec] VBoxManage.exe: error: Context: "FindMachine(bstrMachine.raw(), ptrMachine.asOutParam())" at line 280 of file VBoxManageSnapshot.cpp
   [exec] VBoxManage.exe: error: Could not find a registered machine named 'Windows-PC'
   [exec] VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
   [exec] VBoxManage.exe: error: Context: "FindMachine(Bstr(pszVM).raw(), machine.asOutParam())" at line 575 of file VBoxManageMisc.cpp</p></li>
  <li><p>Any clue what is wrong with the setup?</p></li>
  </ol>