Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28731

Starting a Virtual Machine in Jenkins via batch script causes immediate crash and result in aborted state

XMLWordPrintable

      == Symptom ==
      Whenever I try and start a VM from the Execute Windows Batch Command
      inside a freestyle Jenkins job, my VM immediately crashes.

      == Details ==
      Trying to execute a batch script inside a Jenkins job that starts a
      Virtual Machine via a batch script will immediately crash and go to the
      aborted state.

      However, the same exact batch script can be ran by the host machine with
      the same variable and parameters perfectly fine manually.

      Also another workaround is to have the Virtual Box GUI interface open and
      running and the VM will seem to start.

      Is this a permissions issue?

      == Steps to be able to duplicate the bug ==
      1. Have an instance of Jenkins running on the host machine.
      2. Create a freestyle Job that will allow you to execute Windows batch
      scripts
      3. Then create a batch script as such

       cd "C:\Program Files\Oracle\VirtualBox"
       VBoxManage.exe "Name_OF_VM"
      

      4. save and build the job
      5. Observer that it starts up but then immediately crashes and goes to the
      abort state.

      == Versions Affected ==

      • Windows 8.1 64-bit (Host and Guest)
      • Version 4.3.22

      == Workaround ==
      Please see Details for any workarounds at the moment.

            Unassigned Unassigned
            mtaylor Matt Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: