Difference between revisions of "Managed Virtual Machine (MVM)"

From DAVE Developer's Wiki
Jump to: navigation, search
(Introduction)
(Introduction)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
Development environments of modern embedded systems are getting more complex as technology of systems-on-chips (SoC) evolves. A lot of things have to be set up on host side - cross-tool chains, libraries, debuggers etc. - before developer can put his/her hands on the target. This process is mandatory but really boring and often even frustrating. Also, even if instructions provided by board vendor are clear and exhaustive, it is likely that the resulting host configuration is either incorrect or incomplete.
+
Development environments of modern embedded systems are getting more complex as technology of systems-on-chips (SoC) evolves. A lot of things have to be set up on host side - cross-tool chains, libraries, debuggers etc. - before developer can put his/her hands on the target. This process is unavoidable but really boring and often even frustrating. Also, even if instructions provided by board vendor are clear and exhaustive, it is likely that the resulting host configuration is either incorrect or incomplete.
  
 
DAVE Embedded Systems has developed a new powerful tool to tackle this issue, called Managed Virtual Machine (MVM for short).
 
DAVE Embedded Systems has developed a new powerful tool to tackle this issue, called Managed Virtual Machine (MVM for short).
  
Managed Virtual Machine (MVM) is a virtual machine that allows developers
+
MVM is a virtual machine that allows developers
 
*to '''start working on DAVE Embedded Systems's platforms very quickly''', because it avoids manual installing and configuring of the development environment
 
*to '''start working on DAVE Embedded Systems's platforms very quickly''', because it avoids manual installing and configuring of the development environment
 
*to keep development host configuration '''synced with the updates''' released by DAVE Embedded Systems.
 
*to keep development host configuration '''synced with the updates''' released by DAVE Embedded Systems.
 
This approach permits to achieve two important goals:
 
This approach permits to achieve two important goals:
 
*reducing the initial set up effort significantly
 
*reducing the initial set up effort significantly
*customer's host machine is constantly synchronized with the one used by DAVE Embedded Systems to build and validate the software released for the targets, resulting in increased efficiency and effectiveness of software-related support activities.
+
*customer's host machine is constantly synchronized with the one used by DAVE Embedded Systems to build and validate the software releases for the targets, resulting in increased efficiency and effectiveness of software-related support activities.
  
 
The MVM is created and managed using Vagrant (https://www.vagrantup.com/), which is a powerful tool that creates, configures and manages virtual development environments. Vagrant uses '''Providers''' to integrate with the hypervisor that provides the virtual machines, that for the MVM is Oracle VirtualBox (https://www.virtualbox.org/). The entire virtual environment configuration is stored in simple plain text files, including the instructions for the '''provisioning tool''' (Puppet, https://puppetlabs.com/), so that installation, management and update of the MVM is straightforward.
 
The MVM is created and managed using Vagrant (https://www.vagrantup.com/), which is a powerful tool that creates, configures and manages virtual development environments. Vagrant uses '''Providers''' to integrate with the hypervisor that provides the virtual machines, that for the MVM is Oracle VirtualBox (https://www.virtualbox.org/). The entire virtual environment configuration is stored in simple plain text files, including the instructions for the '''provisioning tool''' (Puppet, https://puppetlabs.com/), so that installation, management and update of the MVM is straightforward.
  
[[File:Mvm-vagrant-bd.png|700px]]
+
[[File:Mvm-vagrant-bd.png|thumb|center|600px|MVM creation process]]
  
 
The MVM comes with all the development tools and source code, pre-configured, and requires only a minimal setup by the end user.
 
The MVM comes with all the development tools and source code, pre-configured, and requires only a minimal setup by the end user.

Revision as of 16:06, 17 March 2016

Introduction[edit | edit source]

Development environments of modern embedded systems are getting more complex as technology of systems-on-chips (SoC) evolves. A lot of things have to be set up on host side - cross-tool chains, libraries, debuggers etc. - before developer can put his/her hands on the target. This process is unavoidable but really boring and often even frustrating. Also, even if instructions provided by board vendor are clear and exhaustive, it is likely that the resulting host configuration is either incorrect or incomplete.

DAVE Embedded Systems has developed a new powerful tool to tackle this issue, called Managed Virtual Machine (MVM for short).

MVM is a virtual machine that allows developers

  • to start working on DAVE Embedded Systems's platforms very quickly, because it avoids manual installing and configuring of the development environment
  • to keep development host configuration synced with the updates released by DAVE Embedded Systems.

This approach permits to achieve two important goals:

  • reducing the initial set up effort significantly
  • customer's host machine is constantly synchronized with the one used by DAVE Embedded Systems to build and validate the software releases for the targets, resulting in increased efficiency and effectiveness of software-related support activities.

The MVM is created and managed using Vagrant (https://www.vagrantup.com/), which is a powerful tool that creates, configures and manages virtual development environments. Vagrant uses Providers to integrate with the hypervisor that provides the virtual machines, that for the MVM is Oracle VirtualBox (https://www.virtualbox.org/). The entire virtual environment configuration is stored in simple plain text files, including the instructions for the provisioning tool (Puppet, https://puppetlabs.com/), so that installation, management and update of the MVM is straightforward.

MVM creation process

The MVM comes with all the development tools and source code, pre-configured, and requires only a minimal setup by the end user.

Installation and configuration[edit | edit source]

To generate the image:

  • download and install git
  • configure ssh (for example by following this guide)
  • send us the ssh public key as described here
  • download VirtualBox and install it
    • tested with 5.0.14 (does NOT work with 5.0.0)
  • download Vagrant
    • install Vagrant
  • clone the project/development kit repository (eg: git clone git@git.dave.eu:project-name/mvm.git)
  • enter repository cloned directory
    • create data directory into parent directory
    • copy vagrant.yml.sample to vagrant.yml
    • customize VM settings (vagrant.yml): number of CPUs and RAM size
    • uncomment and set ip_adress to VM's ip address (vagrant.yml)
    • overwrite provision/modules/user/file/id_rsa with your private key (~/.ssh/username@myhost.com)
  • create the VM with the following command:
vagrant --color up

After the first boot, MVM may need to restart to complete installation. To reboot the VM just run:

vagrant reload

MVM Lifecycle Management[edit | edit source]

You may start/stop/destroy MVM from classic VirtualBox interface or using Vagrant.

In the latter case:

  • to stop MVM run
vagrant halt
  • to destroy MVM (WARNING: this remove all MVM VirtualBox files, including your customization!)
vagrant destroy
  • to start a previously stopped MVM:
vagrant up
  • to save MVM state to file (hibernate)
vagrant suspend


Update MVM[edit | edit source]

To update your MVM enter MVM git repository and just:

  • stop MVM
vagrant halt
  • update git repository
git pull
  • force Vagrant provision
vagrant up --provision --color