All Projects → terra-farm → Go Virtualbox

terra-farm / Go Virtualbox

Licence: apache-2.0
VirtualBox wrappers in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Virtualbox

Macinbox
Puts macOS in a Vagrant box
Stars: ✭ 599 (+1147.92%)
Mutual labels:  virtualbox
Deep Learning Vm
Sets up a VM with Keras, TensorFlow, TFLearn and Theano installed
Stars: ✭ 23 (-52.08%)
Mutual labels:  virtualbox
Metta
An information security preparedness tool to do adversarial simulation.
Stars: ✭ 867 (+1706.25%)
Mutual labels:  virtualbox
Pentest Env
Pentest environment deployer (kali linux + targets) using vagrant and chef.
Stars: ✭ 610 (+1170.83%)
Mutual labels:  virtualbox
Deploy Docker Swarm
Deploy scripts for docker-swarm.
Stars: ✭ 17 (-64.58%)
Mutual labels:  virtualbox
Linux Microsoft Ie Virtual Machines
Run Internet Explorer 8/9/10/11/MS-Edge Virtual machines from Microsoft under Linux via VirtualBox.
Stars: ✭ 934 (+1845.83%)
Mutual labels:  virtualbox
Packer Boxes
Jeff Geerling's Packer build configurations for Vagrant boxes.
Stars: ✭ 495 (+931.25%)
Mutual labels:  virtualbox
Workstations
Vagrant virtual workstations and development environments with Visual Studio, Docker, IIS and SQL Server on Windows for .NET development
Stars: ✭ 45 (-6.25%)
Mutual labels:  virtualbox
Vagrant Docker
A lightweight Docker based development environment
Stars: ✭ 17 (-64.58%)
Mutual labels:  virtualbox
Macos Virtualbox
Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox for Windows, Linux, and macOS
Stars: ✭ 11,634 (+24137.5%)
Mutual labels:  virtualbox
Vboxhardenedloader
VirtualBox VM detection mitigation loader
Stars: ✭ 641 (+1235.42%)
Mutual labels:  virtualbox
Vm
💻☁📦 The (official) Nextcloud VM (virtual machine appliance), Home/SME Server and scripts for RPi (4).
Stars: ✭ 716 (+1391.67%)
Mutual labels:  virtualbox
Nixops
NixOps is a tool for deploying to NixOS machines in a network or cloud.
Stars: ✭ 838 (+1645.83%)
Mutual labels:  virtualbox
Customarch
Arch Linux Based Custom ISOs Made With "Archiso"
Stars: ✭ 606 (+1162.5%)
Mutual labels:  virtualbox
Virtualbox4dsm
VirtualBox package for Synology DSM 6.2.x
Stars: ✭ 34 (-29.17%)
Mutual labels:  virtualbox
Antivmdetection
Script to create templates to use with VirtualBox to make vm detection harder
Stars: ✭ 527 (+997.92%)
Mutual labels:  virtualbox
Penetration Testing And Hacking
Collection of tips, tools and tutorials around infosec
Stars: ✭ 25 (-47.92%)
Mutual labels:  virtualbox
Ansible Role Packer rhel
Ansible Role - Packer RHEL/CentOS Configuration for Vagrant VirtualBox
Stars: ✭ 45 (-6.25%)
Mutual labels:  virtualbox
Docker Swarm
🐳🐳🐳 This repository is part of a blog series on Docker Swarm example using VirtualBox, OVH Openstack, Azure and Amazon Web Services AWS
Stars: ✭ 43 (-10.42%)
Mutual labels:  virtualbox
Runmacosinvirtualbox
Run macOS 10.16 Big Sur (and other versions) in VirtualBox on macOS
Stars: ✭ 839 (+1647.92%)
Mutual labels:  virtualbox

go-virtualbox

This is a wrapper package for Golang to interact with VirtualBox. The API is experimental at the moment and you should expect frequent changes.

Table of Contents

  1. Status
  2. Usage
    1. Library
    2. Commands
    3. Documentation
  3. Building
  4. Testing
    1. Preparation
    2. Run tests
    3. Re-generate mock
  5. Caveats

Status

Project Status Notes
Github Actions Continuous Integration
Go Report Card Go Report Card scan code with gofmt, go vet, gocyclo, golint, ineffassign, license and misspell.
GoDoc Go Doc
Release Release

Usage

Library

The part of the library that manages guest properties can run both from the Host and the Guest.

    err := virtualbox.SetGuestProperty("MyVM", "test_key", "test_val")
    val, err := GetGuestProperty(VM, "test_key")

See GoDoc for full details.

Commands

The vbhostd commands waits on the vbhostd/* guest-properties pattern.

  • When the guest writes a value on the vbhostd/open, it causes the host to open the given location:
    • Write http://www.hp.com will open the default browser as the given URL
    • Write mailto:[email protected][email protected] opens the default mailer pre-filling the recipient and carbon-copy recipient fields

Documentation

For the released version, see GoDoc:terra-farm/go-virtualbox. To see the local documentation, run godoc -http=:6060 & and then open http://localhost:6060/pkg/github.com/terra-farm/go-virtualbox/.

Building

First install dependencies

  • GoLang
  • GNU Make (Windows: via `choco install -y gnuwin32-make.portable)

Get Go dependencies: make deps or:

$ go get -v github.com/golang/dep/cmd/dep
$ dep ensure -v

Then build: make build or:

$ go build -v ./...
  • default run everything in order
  • deps install dependencies (dep and others)
  • build run go build ./...
  • test run go test ./...
  • lint only run gometalinter linter

Testing

Preparation

Tests run using mocked interfaces, unless the TEST_VM environment variable is set, in order to test against real VirtualBox. You either need to have a pre-provisioned VirtualBox VM and to set its name using the TEST_VM environment variable, or use Vagrant.

$ vagrant box add bento/ubuntu-16.04
# select virtualbox as provider

$ vagrant up

Then run the tests

$ export TEST_VM=go-virtualbox
$ go test

...or (on Windows):

> set TEST_VM=go-virtualbox
> go test

Once you are done with testing, run vagrant halt to same resources.

Run tests

As usual, run go test, or go test -v. To run one test in particular, run go test --run TestGuestProperty.

Re-generate mock

mockgen -source=vbcmd.go -destination=mockvbcmd_test.go -package=virtualbox -mock_names=Command=MockCommand

Using local changes with your own project

If you have a project which depends on this library, you probably want to test your local changes of go-virtualbox in your project. See this article on how to set up your environment to do this.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].