Displaying Our Vagrant VMs User Interface
Displaying the GUI
By default when Vagrant boots a VM it do so in a mode know as “headless mode”. Headless mode just means that no UI from the underlying provider is displayed. There are going to situations where we’re testing changes to our VM and we’ll be unable to access the VM using vagrant ssh
(such as when we make a mistake altering the firewall rules). In order to display the UI we can add vb.gui = true
to our virtualbox configuration.
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2004"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
end
The next time we perform a vagrant up
or vagrant reload
VirtualBox will open and we’ll see the virtualbox displayed.
Then we can login using vagrant as the username and password and preform any actions we need to troubleshoot the problem.
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows
More In This Series
- What's a Virtual Machine?
- Why Use Vagrant?
- Initializing a Vagrant Development Environment
- Managing A Vagrant Environment's Power State
- How to Reset/Delete A Vagrant Development Environment
- Configuring Our Vagrant Development Environment's Network
- Remotely Accessing Our Vagrant Development Environment (Linux/Ubuntu)
- Syncing Files to Our Vagrant Development Environment
- Customizing the Amount Of RAM in Our Vagrant VMs
- Displaying Our Vagrant VMs User Interface
- Saving Vagrant States Using Snapshots