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, 2020 in DevOps Tools by anonymous
• 6,260 points

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, 2020 by anonymous
• 59,230 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

  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, 2020 by Pistle
• 1,000 points

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
• 52,360 points
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, 2020 in DevOps Tools by akhtar
• 38,230 points
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, 2020 in DevOps Tools by MD
• 95,440 points
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+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 25, 2019 in DevOps Tools by Neel
• 3,020 points
+2 votes
3 answers

mvn not recognized as an internal or external command error

Setting the environment variables JAVA_HOME, MAVEN_HOME and  ...READ MORE

answered Jun 3, 2019 in DevOps Tools by Sirajul
• 59,230 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP