Tools for VirtualBox to simplify manual usage and automated integration.
Install project dependencies:
script/setup.sh
Install pip package from GitHub:
pip3 install git+https://[email protected]/FunTimeCoding/virtual-box-tools.git#egg=virtual-box-tools
Install pip package from DevPi:
pip3 install -i https://testpypi.python.org/pypi virtual-box-tools
Uninstall package:
pip3 uninstall virtual-box-tools
Configuration file location: ~/.virtual-box-tools.yaml
(Optional) Use a host configuration from a different location:
host_file: ~/srv/salt/pillar/host.sls
Optional: Run virtual machines as a different user:
sudo_user: vbox
Run the main program:
bin/vbt
Run the main program inside the container:
docker run -it --rm funtimecoding/virtual-box-tools
Show help:
vbt --help
vbt host --help
Create a host:
vbt host create --name example
Create a host and connect it to a bridge interface:
vbt host create --name example --bridge-interface en0
Destroy a host:
vbt host destroy --name example
Run the web service:
vbt-web-service
Show users:
bin/show-users.sh
Configure Git on Windows before cloning:
git config --global core.autocrlf input
Install NFS plug-in for Vagrant on Windows:
vagrant plugin install vagrant-winnfsd
Create the development virtual machine on Linux and Darwin:
script/vagrant/create.sh
Create the development virtual machine on Windows:
script\vagrant\create.bat
Run tests, style check and metrics:
script/test.sh [--help]
script/check.sh [--help]
script/measure.sh [--help]
Build project:
script/build.sh
Install Debian package:
sudo dpkg --install build/python3-virtual-box-tools_0.1.0-1_all.deb
Show files the package installed:
dpkg-query --listfiles python3-virtual-box-tools
Run the web service in a virtual environment:
script/start.sh
Run VirtualBox commands as a different user:
sudo -u virtualbox vboxmanage showvminfo --machinereadable ${MACHINE_NAME}
Send a request to the web service:
curl --silent --header 'Authorization: Token example' localhost:5000/host
curl --silent --header 'Authorization: Token example' --header 'Content-Type: application/json' --request POST --data '{"name": "example"}' localhost:5000/host
curl --silent --header 'Authorization: Token example' --request DELETE localhost:5000/host/example