Can I configure my virtual machine as slave in Jenkins?

0 votes
Can I configure my VM as a slave in Jenkins? My host machine will be master and my VM machine will be the slave machine. Is this possible?
Feb 4 in DevOps Tools by anonymous
• 6,260 points
554 views

2 answers to this question.

0 votes
You can certainly use a virtual machine as a Jenkins slave.

All you need to do is set up a VM (OS based on your requirement) to automatically start a service that runs a script to start Jenkins slave.

So if your host is a windows machine which is the Jenkins master, the VM could be used as a slave machine.
answered Feb 4 by anonymous
• 57,750 points
0 votes

The first step is the VirtualBox cloud configuration:

  1. Configure the VirtualBox server, that allows to remotely manage VMs, and start it.

    VBoxManage setproperty websrvauthlibrary null
    vboxwebsrv

  2. Manage Jenkins -> Configure System -> Cloud -> Add a new cloud -> VirtualBox
  3. Set Name, URL, Username and Password
  4. Test connection

    If it doesn't work, then you can try to disable authentication library by executing following command on VirtualBox host:
    VBoxManage setproperty websrvauthlibrary null

    If you got this error:

    Runtime modeler error: Wrapper class org.virtualbox_3_1.IWebsessionManagerLogon is not found. Have you run APT to generate them?

    Then you should upgrade Java (probably it is a bug in jax-ws). Also note that plugin was tested on Java 1.6.0_19.

VirtualBox slave

Now you can setup your nodes in Jenkins and use them to build your projects:

  1. Add Manage Jenkins -> Manage Nodes -> New Node
  2. Set Node name for VirtualBox Slave
  3. Select VirtualBox Host, Virtual Machine Name and Virtual Machine Type
Hope this will help
Best Regards
answered Aug 26 by Pistle
• 1,000 points
Hi@Pistle,

This is really helpful. It helped me to configure my virtual machine as a Jenkins slave.

Related Questions In DevOps Tools

+1 vote
1 answer

i have a pyhton code in my git/git repository how to build that code in jenkins

Follow these steps @Bhaskar: Step 1: Open the Jenkins ...READ MORE

answered Oct 14, 2019 in DevOps Tools by Kalgi
• 51,950 points
120 views
0 votes
2 answers
0 votes
0 answers

How can I use Tomcat in Eclipse IDE?

Hi everyone, Can anyone tell me, how can I ...READ MORE

Mar 12 in DevOps Tools by akhtar
• 24,030 points
44 views
0 votes
1 answer

How to configure Keyboard as stdin in Logstash?

Hi@akhtar, You can find stdin and stdout plugins ...READ MORE

answered Jun 17 in DevOps Tools by MD
• 53,620 points
53 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
663 views
+2 votes
1 answer
0 votes
2 answers

Can Jenkins detect and build new tags from Git repository?

Yes, this can be done in 3 ...READ MORE

answered Jun 24, 2019 in DevOps Tools by Neel
• 3,010 points
3,187 views
0 votes
2 answers