summaryrefslogtreecommitdiff
path: root/docs/installation/cloud/azure.md
blob: efbc7ae4e7a206db31171ca7c0ccf413a4dd7ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
lastproofread: '2026-02-09'
---

# Azure

## Deploy VM

Deploy VyOS on Azure.

1. Go to Azure services and click **Add new Virtual machine**.
2. Choose a VM name, resource group, and region, then click **Browse all public
   and private images**.

```{eval-rst}
.. figure:: /_static/images/cloud-azure-01.webp
```

3. Search for "VyOS" in the marketplace and choose the appropriate
   subscription.

```{eval-rst}
.. figure:: /_static/images/cloud-azure-02.webp
```

4. Generate new SSH key pair or use existing.

```{eval-rst}
.. figure:: /_static/images/cloud-azure-03.webp
```

5. Configure the network, subnet, and public IP. Or use the defaults.

```{eval-rst}
.. figure:: /_static/images/cloud-azure-04.webp
```

6. Click **Review + create**. Your deployment completes in a few seconds.

```{eval-rst}
.. figure:: /_static/images/cloud-azure-05.webp
```

7. Select your new VM and note your public IP address.

```{eval-rst}
.. figure:: /_static/images/cloud-azure-06.webp
```

8. Connect to the instance with your SSH key.

```{eval-rst}

  .. code-block:: none

    ssh -i ~/.ssh/vyos_azure vyos@203.0.113.3
    vyos@vyos-doc-r1:~$
```


## Add interface

If your instance was deployed with one **eth0** (`WAN`) interface and you
want to add another, you must shut down the instance. To add a new interface,
such as **eth1** (`LAN`), attach it in the Azure portal and then restart the
instance.

:::{note}
Azure doesn't allow you to attach an interface while the instance is
running.
:::

## Absorbing Routes

If you're using the VM as a router, you can use a route table to send some or
all traffic from your virtual network (VNET) through your LAN interface.

1. Enable IP forwarding on every Azure network interface that will forward
   traffic. In the Azure portal, open the network interface, select
   **IP configurations**, and enable **IP forwarding**. Alternatively, use the
   Azure CLI:

   ```none
   az network nic update \
     --resource-group <resource-group> \
     --name <network-interface> \
     --ip-forwarding true
   ```

2. Create a route table and navigate to **Configuration**.
3. Add one or more routes for the networks you want to route through the VyOS
   VM. For **Next hop type**, select **Virtual Appliance** and set the **Next
   Hop Address** to the private IP address of the VyOS `LAN` interface.
4. Associate the route table with each workload subnet whose traffic should
   pass through VyOS.

:::{note}
To create a default route for VMs on the subnet, use
**Address Prefix** `0.0.0.0/0`. For a typical edge device configuration,
configure masquerade NAT on the `WAN` interface.
:::

## Serial Console

VyOS includes serial console support by default. However, if you replace the
`config.boot` file and reboot, ensure this configuration is present:

`set system console device ttyS0 speed '9600'`

## References

% stop_vyoslinter

- <https://azure.microsoft.com>
- <https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface#enable-or-disable-ip-forwarding>
- <https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-create-route-table-portal>

% start_vyoslinter