Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Using Vagrant Tooling in Eclipse

December 22, 2015
Roland Grunberg
Related products:
Developer Tools

Share:

    Vagrant gives developers a uniform way of configuring their virtual environment, regardless of the underlying hypervisor chosen (eg. KVM/QEMU, VirtualBox, VMware, Hyper-V). It's also available for Mac OS and Windows making it easier to run virtual Linux environments from these platforms.

    Today we'll be creating a simple virtual machine, using the Eclipse Vagrant Tooling plugin. This will be shipping as part of the Linux Tools Project 4.2.0 release (along with the Docker Tooling). The Vagrant tooling is targeted to make its way into the release of DTS 4.1 (Developer Toolset) and Fedora 23.

    Before using the Vagrant Tooling, we need to make sure we have all the pre-requisites installed.

    On Fedora, we'll need vagrant, and vagrant-libvirt for our provider. Our user will need to be under the libvirt group so that vagrant commands may run without the need for a password prompt. We'll also need to ensure that the libvirt daemon is started.

    dnf install vagrant vagrant-libvirt
    usermod -a -G libvirt $USER
    systemctl start libvirtd.service

    It may be necessary to log back in to ensure our user permissions have been updated. We could also use other providers such as VirtualBox and our Eclipse Vagrant Tooling supports this, but in Fedora it's pretty simple to use KVM/QEMU through libvirt.

    The Eclipse Vagrant Tooling was released recently as part of Linux Tools 4.2.0, under the Docker Tooling repository for now : http://download.eclipse.org/linuxtools/update-docker-1.2

    Once installed, you'll see that the Vagrant Tooling is exposed in two ways. Either may be used as it's a matter of preference.

    The Vagrant Tooling perspective contains a view of known Vagrant Boxes, as well as existing virtual machines.

    vagrant-perspective

    The Vagrant Toolbar menu button resides in the main workbench toolbar and exposes the virtual machine creation wizard. This contains a pull-down menu that will list the existing VMs, along with sub-menus for performing relevant actions. This addition to the workbench toolbar is always available so it doesn't require switching to the Vagrant Tooling perspective.

    So with the introduction out of the way, let's create our very first virtual machine.

    Switching into the Vagrant Tooling perspective, we'll go into the Box View, and click the Create VM button located near the top-right of the view toolbar. This will bring up the virtual machine creation wizard.

    We'll name our VM f23_test and we'll provide a URL for the Box Reference input. The Box we want can be found on the Fedora Cloud download page as :

    https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Atomic-Vagrant-23-20151030.x86_64.vagrant-libvirt.box

    We can now hit finish.

    Note: If we had a Vagrantfile already configured, we could have simply used that instead (by selecting Custom Vagrantfile).

    Once the creation process starts, we'll see an Eclipse Console come up to allow us to monitor the progress of the download operation, as well as the VM creation. This can take a bit of time so it's good to have some detailed feedback on how much longer is left.

    Once the creation process has terminated, we can begin working with our VM. In some cases it might even be possible to begin interacting with the VM before creation completes although it's ideal to wait as certain configuration steps may still be taking place.

    To SSH into our newly created VM, we select it from the Vagrant VM View, and click the SSH toolbar icon located near the top-right corner of the view.

    This plugin is new, and there are plenty of additional options/workflows to support (eg. package, provision, suspend) but this small demonstration shows how easy it is to get started.

    Last updated: February 7, 2024

    Recent Posts

    • More Essential AI tutorials for Node.js Developers

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue