Cloudmesh Virtualbox/Vagrant Interface
Virtualbox provides a vonvenient way to manage virtual machines on a local computer. Graphical user interfaces, a commandline client, but also vagrant exist to access them. However we noticed that we often only need a very small subset to start a vm and to tear it down. Remembering the interfaces is difficult. Previously we developed a cloudmesh_client that has an easy to remember interface. We leverage from this experience and introduce a very easy to remember commandline client. At the same time we also allow a simpl python API to manage virtual machines on virtualbox. We use vagrant internally. However vagrants focus on directories and Vagrantfiles in a bit inconvenient also fo us, so we provided wrappers and utelize the design of vagrant to our advantage while only exposing the needed functionality.
Manual Page
Usage:
cm-vbox version [--format=FORMAT]
cm-vbox image list [--format=FORMAT]
cm-vbox image find NAME
cm-vbox image add NAME
cm-vbox vm list [--format=FORMAT] [-v]
cm-vbox vm delete NAME
cm-vbox vm config NAME
cm-vbox vm ip NAME [--all]
cm-vbox create NAME ([--memory=MEMORY]
[--image=IMAGE]
[--script=SCRIPT] | list)
cm-vbox vm boot NAME ([--memory=MEMORY]
[--image=IMAGE]
[--port=PORT]
[--script=SCRIPT] | list)
cm-vbox vm ssh NAME [-e COMMAND]
cm-vbox -h | --help
Source Code
github.com/cloudmesh/vagrant
Prerequisits
Make sure you have the python development libraries and pip installed
Ubuntu
sudo apt-get install python-dev sudo apt-get install python-pip
Inastall from pip
pip install cloudmesh_vagrant
Install from github
mkdir cloudmesh cd cloudmesh git clone https://github.com/cloudmesh/vagrant cd vagrant python setup.py install
Examples
Listing vms
List the vms:
cm-vbox vm list
name |
state |
id |
provider |
directory |
w12 w1 |
running running |
47347b4 db913dd |
virtualbox virtualbox |
~/w12 ~/w1 |
Listing images
List the images:
cm-vbox image list
name |
provider |
date |
ubuntu/trusty64 |
virtualbox |
20160406.0.0 |
Booting vms
Start a vm while taking an ubuntu image as default:
cm-vbox vm boot w12
Login
To login into a vm you can use the ssh command followed by the VM:
cm-vbox vm ssh w12
where w12 is the name of the vm.
Executing a command
To just execute a command, use:
cm-vbox vm ssh w12 -e uname
Destroy a vm
Deletes the specified vm:
cm-vbox vm delete w12
Create a Vagrantfile
Creates a Vagrantfile in ./w12/Vagrantfile:
cm-vbox create w12
Destroy the directory of the vm
Assume you like to destroy also the directory with all information about the previously run vm you can simple delete it with rm:
cm-vbox vm delete w12 rm -r w12
Please not that wen you delet the directory the list command will automatically remove it from the available vms. Hoewver before you delete it is advisable to destroy the vm so you do not have the vm any longer running.
Metadata
Release files for cloudmesh_vagrant 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cloudmesh_vagrant-1.2.2.tar.gz | 7.1 kB | Without provenance | Details for cloudmesh_vagrant-1.2.2.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cloudmesh_vagrant-1.2.2.macosx-10.6-intel.tar.gz | Details for cloudmesh_vagrant-1.2.2.macosx-10.6-intel.tar.gz | |||
| cloudmesh_vagrant-1.2.2-py2-none-any.whl | Python 2 | none | any | Details for cloudmesh_vagrant-1.2.2-py2-none-any.whl |
Total release size: 28.8 kB
Release files / cloudmesh_vagrant-1.2.2.tar.gz
| Download URL | cloudmesh_vagrant-1.2.2.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2149809e6373b18d862041c747597bb3b3224668b0cf1278b061f03b63609026
|
|
BLAKE2b-256 checksum How to use checksums |
d3c9c5f4dcaa2da0260b5b70d76b06bb7359d0d4d8baddfcfd81bc16c0a3f91d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / cloudmesh_vagrant-1.2.2.macosx-10.6-intel.tar.gz
| Download URL | cloudmesh_vagrant-1.2.2.macosx-10.6-intel.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27ae3211248244568c9cf01f0ef27a4324d84073bcc55b7622972f21cfc94afe
|
|
BLAKE2b-256 checksum How to use checksums |
8d7c9ee7d8fe22a1dbfb1044bc060713c2c366dd61010b4abbdc175028b85900
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / cloudmesh_vagrant-1.2.2-py2-none-any.whl
| Download URL | cloudmesh_vagrant-1.2.2-py2-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
046b1617c012ca8b2d41c107b9958eb08379855a1e59245ac0bba1042ee44e60
|
|
BLAKE2b-256 checksum How to use checksums |
b6bf001db0a583776ba494e320d58d57bdceab1e9cf268ef2d56414bdf98a187
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cloudmesh_vagrant 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.