Open main menu

DAVE Developer's Wiki β

Changes

Managed Virtual Machine (MVM)

1,638 bytes added, 17:28, 31 October 2023
FAQs
The MVM comes with all the development tools and source code, pre-configured, and requires only a minimal setup by the end user. Two versions are available:
*''<span id="basic_mvm"><b><i>basic'': this version</i></b></span>
** is distributed as a [https://en.wikipedia.org/wiki/Open_Virtualization_Format OFV Package] for Virtual Box
** requires minimal configurations
** requires several GB of data to be downloaded from DAVE Embedded Systems' servers
** is intended for developers who don't need the full control of the virtual machine creation process
* ''<span id="advanced_mvm"><b><i>advanced''</i></b></span>** this version is distributed as git repository
** requires the execution of the provisioning process to be created
** requires few tens of kB of data to be downloaded from DAVE Embedded Systems' servers
** is intended for developers who need the full control of the provisioning process.
MVM can be viewed as an evolution of the [[:Category:DVDK|DVDK virtual machine]].
===Contents and provided services===
This chapter briefly describes the contents and the services related to the software developing, provided by MVM. Depending on the target operating system (Yocto Linux distribution, Android etc.), contents organization may differ slightly from one MVM to another. Following sections describe these differences for all of the supported target operating systems. In general, MVMs are built upon Debian-based Linux distributions such as Ubuntu.
To log in on MVM, please use the following credentials:
<code>dvdk</code> can run commands with root privileges via <code>sudo</code>.
 
The following sections detail the organization of the most common types of MVMs available. These types are determined by the target operating system.
====Yocto-based Linux distribution====
 The typical development/deployment process basically consists of two stages: * editing/building/debugging code: during this stage the target is connected via Ethernet LAN to host machine and is configured Please refer to ** retrieve binary images (i.e. Linux kernel) via TFTP protocol** mount the development root file system via NFS protocol. This root file system is physically in the file system of the host machine as depicted [[Deploying_Embedded_Linux_Systems#The_development_environmentWorking_with_the_Yocto_build_system|herethis page]].* deployment: the goal of this stage is to configure the target for normal operation, that is out of the development environment. A target root file system ====Android- optimized based Linux distribution====This section will be completed in terms a future version of memory footprint - is used. This root file system is stored on target's non-volatile memory. To implement this workflow, MVM provides* TFTP server TBD* NFS server TBD* cross-tool chain** by default, cross-tool chain is installed in <code>/home/dvdk/<targetname>/sdk/latest</code>. <targetname> is the name of the actual hardware platform (i.e. <code>lynx</code>, <code>axelulite</code> etc.).* target-specific sources** U-Boot bootloader** Linux kernel** Yocto recipes* target's development root file system* Yocto build system including <code>bitbake</code> and SDK* [[Debugging_with_Eclipse_(MVM)|Eclipse/ADT integrated development environment]]article.
== Installation and configuration ==
===Basic version===
TBDIf you use a [[#basic_mvm|''basic'']] version of MVM, please go to [[VirtualBox_Starting_DVDK_Virtual_Machine#Using_a_.ova_file|this page]] which details how to import the OVF archive.
===Advanced version===
If you use [[#advanced_mvm|''advanced'']] version of MVM, please read the following instructions.
 
{{ImportantMessage|text=<center>Each release of MVM has been tested with specific releases of Virtual Box and Vagrant, as detailed into Development Kit release note.<br/>
MVM may also work with different (especially newer) releases of those tools but this cannot be guaranteed.<br/> In case of dubt, ask the [[HowTo Contact Technical Support|support team]]</center>}}
 
To generate the image:
** for Linux: please refer to your distribution package manager
* configure ssh (for example as described [[Axel_Embedded_Linux_Kit_%28XELK%29#RSA_key_generation|here]] or by following [https://git-scm.com/book/it/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key this guide])
* get access to DAVE Embedded Systems restricted git repositories as described [[Accessing_DAVE_Embedded_Systems_restricted_git_repositories|here]])
* [http://www.virtualbox.org download VirtualBox] and install it
** tested with 5.0.14 (does NOT work with 5.0.0)** don't mind if you have a previous VirtualBox version (i.e. 4.x): the installer will update to the new version keeping your old VM images and files
* [https://www.vagrantup.com/ download Vagrant] and install it
* clone the project/development kit repository (eg: <code>git clone git@git.dave.eu:<i>project-name</i>/mvm.git</code>)
*** change, depending on PC configuration, number of CPUs and/or RAM size
*** uncomment and set ip_adress to VM's ip address
** overwrite <code>provision/modules/user/filefiles/id_rsa</code> with your private key (eg: <code>cp ~/.ssh/<i>username@myhost.com</i> provision/modules/user/filefiles/id_rsa</code>): target name should be kept to <code>id_rsa</code>
* create the VM with the following command:
== Updating MVM ==
 
===Basic version===
TBD{{ImportantMessage|text=MVM is, at the end, a virtual machine managed with Virtual Box. Thus, before running any update, we suggest to [https://www.virtualbox.org/manual/ch01.html#snapshots take a VM snapshot] to revert any change in case something goes wrong during the update phase}} * turn on the MVM and open a terminal (e.g by hitting CTRL-ALT-T).* change into the <code><targetname></code> directory (<code>cd /home/dvdk/<targetname></code>)* if not previously done:** configure ssh (for example as described [[Axel_Embedded_Linux_Kit_%28XELK%29#RSA_key_generation|here]] or by following [https://git-scm.com/book/it/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key this guide])** get access to DAVE Embedded Systems restricted git repositories as described [[Accessing_DAVE_Embedded_Systems_restricted_git_repositories|here]]** overwrite <code>mvm/provision/modules/user/files/id_rsa</code> with your private key (eg: <code>cp ~/.ssh/<i>username@myhost.com</i> mvm/provision/modules/user/files/id_rsa</code>): target name should be kept to <code>id_rsa</code>* run the <code>./mvm-sync</code> command This will run Puppet provision which will align the development environment with the latest release. <code>mvm-sync</code>, by default, enable verbose debugging output, to see provisioning progress (which may take a while, depending on our PC power and connection speed): error will be colored in red, so take special care to catch them. For example the next screenshot display an authorization error while connecting to DAVE git server:  [[File:Mvm-sync git error unauthorized.png|thumb|center|600px]]  {{ImportantMessage|text=Please note that usually <code>mvm-sync</code> needs to be run '''twice''': the first time to update the MVM repository, the second time to run the updated provision}} 
===Advanced version===
To update your MVM enter MVM git repository and just:
vagrant up --provision --color
</pre>
== FAQs ==
Please go to [[MVM_FAQs|this page]].
 
== Known issues ==
Please go to [[MVM_known_issues|this page]].
4,650
edits