For advanced options, please refer to the [Eclipse fog05 setup guide](13-fog05-configuration.md#add-eclipse-fog05-to-osm).
#### Microsoft Azure
- Execute the following command, using the appropiate parameters (e.g AZURE_CLIENT_ID: 'XXX', AZURE_SECRET: 'YYY', AZURE_TENANT: 'tenantid', AZURE_SUBSCRIPTION_ID: 'ZZZ', regular expression of the flavors that will be used: flavors_pattern:'^Basic')
```bash
osm vim-create --name azure --account_type azure --auth_url http://www.azure.com --tenant"tenantid"
#### 1. Obtain Azure credentials and tenant from Microsoft Azure
Azure Subscription_Id is required to create the VIM target. Besides, it must obtained Azure Application_Id that will be used as Client_Id and Authentication Key that will be used as Client Secret.
It is also needed to create or obtain in the Microsoft portal the Tenant Id.
#### 2. Create Microsoft Azure Resource Group
All Azure Resources for a vim target will created in the same resource group. This resource group should be created before adding the vim target and will be provided as a configuration parameter. In case it has not been previously created this resource group will be created implicitly.
#### 3. Create Microsoft Azure Virtual Network
The virtual networks created for the Azure VIM will all be created as subnets from a base virtual net. This base virtual net should be created before adding the vim target and will be provided as a configuration parameter. In case it has not been previously created this resource group will be created implicitly.
It is also recommended to create a management network for the vim network services.
#### 4. Image selection
Microsoft Azure has a repository with many images available to be used for instances. The images to be used must be selected from this repository. The creation of custom images it is not allowed.
Image names to be used in Microsoft Azure have the following format: publisher:offer:sku:version. For example: Canonical:UbuntuServer:18.04-LTS:18.04.201809110
#### 5. Flavor selection
Microsoft Azure has many flavors available already precreated. The flavor to be used will be obtained based of the required characteristics for the virtual maquine: number of cpus, ram, disk. In the Azure portal there are defined different virtual machine tiers to be used for different purposes: e.g cheaper machine serie Basic with no guaranteed throughput or more expensive machines with guaranteed throughput.
We have defined a flavors_pattern configuration parameter that allows virtual machine tier selection. This way, for example, a Basic cheaper tier can be selected for a development environment and a more advanced tier can be used for the production environment.
### Adding Microsoft Azure as VIM target in OSM
To create an Azure VIM target the following configuration parameters must be specified:
```bash
osm vim-create --name azure --account_type azure --auth_url http://www.azure.com --tenant"tenantid"
-`region_name`: Region to be used for the deployment
-`resource_group`: Resource group to be used as base for all resources created for this VIM
-`vnet_name`: Virtual name used as a base for this vim subnets
Additional optional configuration:
-`flavors_pattern`: Regular expression that be used during flavor selection to be able to select virtual machine tier.
## What if I do not have a VIM at hand? Use of sandboxes
Sometimes, casual testers of OSM may not have a fully fledged VIM at hand, either on premises or in a public cloud. In those cases, it is also possible using a VIM sandbox which, although limited and hence not appropriate for production services, it can be an option good enough for beginners.