Table of Contents

Support bhyve as a Vagrant VM backend.

Project description

Vagrant is a software tool used to create and configure virtual environment, i.e. virtual machine. It’s like a wrapper around virtualization software to make it easy to use virtual machine in developing. It was tied to virtualbox during its early days. But now it supports many other backends (e.g. hyper-v), which is called provider, and can be easily extended to add more providers through its plugin system (e.g. vagrant-aws). Through this plugin system, we can add bhyve as a provider of Vagrant. So that setting up a bhyve machine can be done only with “vagrant init” and “vagrant up”, which will make using bhyve in development much easier.

Approach to solving the problem

(Details as to how you intend to approach the problem, if applicable. May include ideas as to how to break the problem down into smaller parts, or notes on research you need to do before settling on your final approach to solving the problem)

Deliverables

Status

Function Status
Box format Defined
Check bhyve support Working
Cloning and booting Working(needs gcp package to copy image)
Network Working(needs pf and dnsmasq to provider NAT and DHCP)
SSH/SSH run Working(SSH run may needs bash)
Graceful shutdown Working
ACPI shutdown Working
Destroying Working
Provision Working(Basically)
Port forwarding Not working
File sharing Not implemented(Maybe uses NFS at first and waits for bhyve's VirtFS support)
Suspend Not supported by bhyve yet
Resume Not supported by bhyve yet

Milestones

Week 1 - 2 Implement methods needed to run/destroy VMs
Week 3 - 4 Work on ssh access support
Week 5 - 6 Finish works about ssh access support. Here is the point we can let people do some basic tests. So that a box for bhyve may also be needed to be created.
MID-TERM
Week 7 - 11 Implement funtionalities which works through the action method as many as possiable.
Week 12 Arrange documents.
FINAL

Test Plan

Vagrant has a library, named vagrant-spec, providing testing helpers which can be used to write unit and acceptance tests for Vagrant plugins. It includes some acceptance tests which treat Vagrant as a black box. This can be used to test whether the plugin can work with whole Vagrant system correctly. The library also ships with some provider acceptance tests to test its built-in provider virtualbox, these tests can be reused to test basic factionalities of this new plugin. And for the bhyve-specific those might be introduced in, some new test cases should be created to make sure that they work correctly.

The Code