# Microsoft Azure

First, log in to the Microsoft Azure portal <https://portal.azure.com/>

Let's proceed with the setup.

{% hint style="info" %}
For quick and convenient searching on the Azure portal, use the search bar.
{% endhint %}

### Creating a resource group

1. Open Menu / All services / General / **Resource groups**
2. In the Resource groups tab, select **Create**
3. Enter the group name, for example *MikoPBX\_group*
4. Use default values for other fields
5. After entering the values, click the **Review + create** button, then the **Create** button

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FFXfeiM794rwDmxRuGYmX%2FMikoPBXAzureInstallation_eng_1.png?alt=media&#x26;token=b08d98e7-ee43-40d5-9fab-e7d25933b1f0" alt=""><figcaption></figcaption></figure>

### Creating a storage account

1. Open Menu / All services / Analyze and transform data / **Storage accounts**
2. In the Storage accounts tab, select **Create**
3. Specify the created resource group *MikoPBX\_group*
4. Enter the storage account name, for example *pbximgs*
5. Use default values for other fields
6. After entering the values, click the **Review + create** button, then the **Create** button

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F6LmZkiHwuY7MKIfmAH6u%2FMikoPBXAzureInstallation_eng_2.png?alt=media&#x26;token=04fa4e96-a7cc-49ab-bf0c-07cbb96d9718" alt=""><figcaption></figcaption></figure>

### Configuring the created storage account

1. Go to the card of the created storage account *pbximgs*
2. In the opened tab, go to the Data storage / Containers
3. Add a new container
4. Enter the container name, for example *imgs*
5. Click the **Create** button

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FJgySGw9hbTrv1z3bx7Uc%2FMikoPBXAzureInstallation_eng_3.png?alt=media&#x26;token=6c088479-930b-4e14-af06-54a88f09ead6" alt=""><figcaption></figcaption></figure>

6. Open the created container *imgs*
7. In the opened tab, select **Upload**
8. Select a file from the MikoPBX distribution with the **.vhd** extension
9. Click the **Upload** button

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Flx78iMtUrGOERgTRjdl7%2FMikoPBXAzureInstallation_eng_4.png?alt=media&#x26;token=51cce1f5-8c91-4bc0-a248-5b637bbfe5a8" alt=""><figcaption></figcaption></figure>

### Creating an image

1. Open Menu / All services / Compute / **Images**
2. In the Images tab, select **Create**, let's create a new image based on the uploaded \*.**vhd** file
3. Specify the resource group *MikoPBX\_group*
4. Enter a unique name for the image, for example *MikoPBX\_Azure*

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FinDaqVY4ISKGcDLly3X5%2FMikoPBXAzureInstallation_eng_5.png?alt=media&#x26;token=9fb64f60-b23b-48d3-926d-3007be9c9a20" alt=""><figcaption></figcaption></figure>

5. Specify the OS type - **Linux**
6. Specify the generation of virtual machines - **Gen 1**
7. Select the blob storage object by clicking **Browse**, *Browse / pbximgs / imgs / \*.vhd*
8. Specify the account type - **Standard HDD**
9. Use default values for other fields
10. After entering the values, click the **Review + create** button, then the **Create** button

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FaDGzou33d1sAc5zn83yk%2FMikoPBXAzureInstallation_eng_23.png?alt=media&#x26;token=483ca560-ee64-402c-8661-ef0fee3599a6" alt=""><figcaption></figcaption></figure>

### Creating a virtual machine

1. Open Menu / All services / Compute / **Virtual machines**
2. In the Virtual machines tab, select **Create / Azure virtual machine**
3. Specify the resource group *MikoPBX\_group*
4. Enter the virtual machine name, for example *MikoPBX-vm*

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fd6hvlxwSXjmf69Vyz2Xi%2FMikoPBXAzureInstallation_eng_7.png?alt=media&#x26;token=504baea3-f9ca-4e4f-999d-4ac2746f061f" alt=""><figcaption></figcaption></figure>

5. Choose the previously created image, *See all images / Other items / My images / MikoPBX\_Azure*
6. Specify the machine size (combination of CPU / RAM to be at least 1GB / HDD parameters)

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F7GS6XiH9Rop2SxJE8RAE%2FMikoPBXAzureInstallation_eng_22.png?alt=media&#x26;token=7087e43c-a6b5-43dd-89ac-7da7b3218629" alt=""><figcaption></figcaption></figure>

7. Specify the username for the administrator account

If you have an SSH key, do the following

8. Select the source of the SSH public key - **Use existing public key**
9. Specify it in the SSH public key field

If you do not have an SSH key, do the following

8. Select the source of the SSH public key - **Generate new key pair**
9. Specify the key pair name, for example *mikopbx\_key*

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FrPuJ8rFg9pOJQLESA5m5%2FMikoPBXAzureInstallation_eng_9.png?alt=media&#x26;token=4456a8ae-37f2-4f56-ab85-dc7d58c5643d" alt=""><figcaption></figcaption></figure>

Continue with the following instructions:

10. In the license type field, specify **Other**
11. Use default values for the other fields

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FxpwR3MwLoAFdsv4O2Nrd%2FMikoPBXAzureInstallation_eng_10.png?alt=media&#x26;token=c5eac83c-24a9-4004-bf50-fdc266a9b624" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
To deploy the PBX use **two** disks:

* A **1 Gb** disk for the main system
* A **50+ Gb** disk for storing call recordings
  {% endhint %}

12. Go to the **Disks** tab
13. Specify the OS disk type
14. Check the **Delete with VM** checkbox

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F5jjcHvj2w4pH4pNpoODB%2FMikoPBXAzureInstallation_eng_24.png?alt=media&#x26;token=79a4808c-5f3f-4a22-9d92-3d40265b085a" alt=""><figcaption></figcaption></figure>

15. Create a new data disk
16. Specify the disk size to be at least 50GB
17. Use default values for the other fields, click **OK**

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FC1ujejYhSMdotXJ7VXA2%2FMikoPBXAzureInstallation_eng_12.png?alt=media&#x26;token=d87f0323-c342-4775-a111-02e3e0a959c5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FDILx0BPWqbmuvXgVz7Yp%2FMikoPBXAzureInstallation_eng_25.png?alt=media&#x26;token=1409010f-bb04-4bf8-82a6-2f7d827ef31f" alt=""><figcaption></figcaption></figure>

18. After entering the values, click the **Review + create** button, then click **Create**

### Configuring ports for incoming connections

1. Open the virtual machine you created and go to Networking / Network settings / Rules
2. In the tab, choose **Create inbound port rule**
3. Specify the destination port ranges - **0 - 65535**
4. Choose the protocol **TCP**

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FT9fXnAzFGMUVAy0brSZi%2FMikoPBXAzureInstallation_eng_26.png?alt=media&#x26;token=5baee18c-a411-48f4-8a74-a01b2b84b2f7" alt=""><figcaption></figcaption></figure>

5. Specify a name, for example *TCP*
6. Use default values for the other fields
7. After entering the values, click the **Add** button

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fha65C0ehnqJXkt6qr8pW%2FMikoPBXAzureInstallation_eng_27.png?alt=media&#x26;token=05d51260-3a97-444e-9966-22f8c38af424" alt=""><figcaption></figcaption></figure>

8. Similarly, create a rule for UDP. Specify the destination port ranges - **0 - 65535**, protocol **UDP**, and name

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FgiIzlFTlJVi2sIIFoUfT%2FMikoPBXAzureInstallation_eng_28.png?alt=media&#x26;token=a044f766-faba-472e-8b2e-31a05c401039" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Make sure to configure the Firewall on the MikoPBX
{% endhint %}

### Starting MikoPBX

1. Open the virtual machine you created and go to the **Connect** section
2. In the drop-down menu under More ways to connect, select **Serial console**

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FLJgzHh0mDhMoPfMYaiUm%2FMikoPBXAzureInstallation_eng_29.png?alt=media&#x26;token=76f7ac3f-6c30-4cb5-bed1-26a315e7c0f7" alt=""><figcaption></figcaption></figure>

3. Copy the external address of the created virtual machine and enter it in the browser's address bar
4. For login use the login and password provided in Serial console


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mikopbx.com/mikopbx/english/setup/cloud/microsoft-azure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
