# Virtualization

## Table of Contents

[Windows](#prepare-installation-files-for-the-vm)

[MacOS](#macos)

Linux  (To be Added)

{% hint style="info" %}
Some operators opt not to use virtualization and instead choose dedicated hardware such as the [**Anyone Router**](https://docs.anyone.io/hardware), a **standalone device**, a **Virtual Private Server** (VPS), or an **arm64 microcontroller** like a Raspberry Pi. In such cases, the Anon Relay can be installed directly on the operating system by first installing Debian or Ubuntu and then setting up the `anon` package using bash - no virtualization required.
{% endhint %}

***

## Windows <a href="#prepare-installation-files-for-the-vm" id="prepare-installation-files-for-the-vm"></a>

### Prepare Installation files for the VM <a href="#prepare-installation-files-for-the-vm" id="prepare-installation-files-for-the-vm"></a>

Download Ubuntu Server from the official Ubuntu website by following the link below. On the website, click the "**Download**" button to retrieve the file named "**ubuntu-\<version>-live-server-amd64.iso"**.

{% embed url="<https://ubuntu.com/download/server>" %}

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/HHXT7cCoSggFjHdu4xf5/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

### **1. Download VirtualBox** <a href="#id-1.-download-virtualbox" id="id-1.-download-virtualbox"></a>

Download VirtualBox from the official website: <https://www.virtualbox.org/wiki/Downloads>. Select the package that matches your operating system. VirtualBox is compatible with Windows, macOS (Intel only), and Linux.

{% hint style="warning" %}
The Operating System must have [Microsoft Visual C++ Redistributable 2019](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) installed and Virtualization [enabled in BIOS](https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-11-pcs-c5578302-6e43-4b4b-a449-8ced115f58e1)
{% endhint %}

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/XSzp3hB6wKBpdDDCBuls/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

### **2. Install VirtualBox** <a href="#id-2.-install-virtualbox" id="id-2.-install-virtualbox"></a>

Execute the installer and adhere to the on-screen prompts to install VirtualBox on your computer. The installation steps may differ based on your operating system, but it's typically a straightforward process. Ensure you read and agree to the license agreement as part of the installation procedure.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/kanpG2v6U3XmGMjfVX4E/image.png" alt="" width="371"><figcaption></figcaption></figure></div>

### **3. Launch VirtualBox** <a href="#id-3.-launch-virtualbox" id="id-3.-launch-virtualbox"></a>

Once the installation is finished, open VirtualBox. The VirtualBox Manager window, the primary interface for managing your virtual machines, should appear.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/wR6BmFJtgo2qdzkCO4EP/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

### **4. Create a New Virtual Machine** <a href="#id-3.-create-a-new-virtual-machine" id="id-3.-create-a-new-virtual-machine"></a>

In the VirtualBox Manager window, click on 'New' to initiate the creation of a new virtual machine.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/BPYPupeDLzIavLLxacol/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

### **5. Configure the Virtual Machine:** <a href="#id-4.-configure-the-virtual-machine" id="id-4.-configure-the-virtual-machine"></a>

a. Provide a preferred **name** for your virtual machine\
b. Browse and select the **ISO image** downloaded in preparation \
c. Check the box for '**Skip Unattended Installation'** \
d. Allocate Memory (RAM); a minimum of **2 GB** is sufficient \
e. Allocate processors (CPU); a minimum of **2 CPU** is sufficient \
f. Choose disk size; a minimum of **15GB** is sufficient \
g. Press '**Finish**' when all changes have been made

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/TvuljLaHZmveevVFb8Dr/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

### 6. Edit the Network Adapter for the Virtual Machine: <a href="#id-5.-edit-the-network-adapter-for-the-virtual-machine" id="id-5.-edit-the-network-adapter-for-the-virtual-machine"></a>

a. Right-click the Virtual Machine, select '**Settings**', and go to the '**Network'** tab. \
b. Change '**Attached to:**' to '**Bridged Adapter**.'

Depending if you want your VM to use Wireless or wired Ethernet Connection, change '**Name**' to the adapter of your choice and keep in mind that this name may vary depending on your hardware.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/JtwoTXePGUUrkOeMPOHn/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

### 7. Detachable Start <a href="#id-6.-detachable-start" id="id-6.-detachable-start"></a>

Click the small arrow next to '**Start**' and choose '**Detachable Start**'. This allows you to close the console window later on.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/SS20ejoqkrE9JUlYaizI/image.png" alt="" width="375"><figcaption></figcaption></figure></div>

***

## MacOS

{% hint style="info" %}
Some operators opt **not** to use **virtualization** and instead choose dedicated hardware such as the [Anyone Router Hardware](https://docs.anyone.io/hardware), a **standalone** device, a **Virtual Private Server** (VPS), or an **arm64 microcontroller** like a Raspberry Pi. In such cases, the **Anon Relay** can be installed directly on the operating system without virtualization by installing **Debian** or **Ubuntu** and setting up the **anon** package with bash.
{% endhint %}

### Prepare Installation files for the VM <a href="#prepare-installation-files-for-the-vm" id="prepare-installation-files-for-the-vm"></a>

Start by downloading the **Ubuntu Server** image for **arm64**. Visit the website below and select "**Download Ubuntu Server 22.04 LTS**".

{% embed url="<https://ubuntu.com/download/server/arm>" %}

### 1. Download Virtualization Software <a href="#id-1.-download-virtualization-software" id="id-1.-download-virtualization-software"></a>

Download the UTM package from their website, then open the downloaded UTM.dmg file.

{% embed url="<https://mac.getutm.app/>" %}

### 2. Start Software installation

When prompted, drag the **UTM.app** icon to the **Applications** folder to **install UTM**.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/yW1V5wFznhb2kWCcurHu/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 3. Create a new Virtual Machine to Virtualize <a href="#id-3.-create-a-new-virtual-machine-to-virtualize" id="id-3.-create-a-new-virtual-machine-to-virtualize"></a>

Start the **UTM** application and choose "**Create a New Virtual Machine**", then select "**Virtualize**".

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/fhoBmRwObdc0JF1X830i/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/66gjsN5bJnZ9SuO2AEcm/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 4. Select **Linux**

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/qGRWcXqXn4zM0STBbu7q/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 5. Specify the VM installation file

Select "**Browse...**" and locate the previously downloaded **Ubuntu Server** image.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/LFMX0bbk3B59JvzXOmRb/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 6. Adjust System Resources

Select the amount of **Memory** and **CPU** cores to allocate to your **Virtual Machine**.&#x20;

The recommended minimum requirements are:

* **2048 MB RAM Memory**
* **2 CPU Cores**

These parameters can also be adjusted later on if needed by powering off your VM and editing the settings before turning it on again.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/2Pw6licEhUPi1Qyf4vTl/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 7. Specify the **Storage space**. <a href="#id-7.-specify-the-storage-space" id="id-7.-specify-the-storage-space"></a>

**15 GB** is sufficient for Ubuntu Server 22.04 LTS. This parameter can also be adjusted later on if needed.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/zsEsptIy6S6At8PU7x3d/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 8. Set a Name

Specify the preferred **Name** of your Virtual Machine, then check the box **Open VM Settings** and click **Save**.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/58DXRhkgzM2gTcMby51g/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 9. Network Interface Settings

Go to the **Network** section and change the **Network Mode** to **Bridged (Advanced)**, then press **Save**.

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/dAvv9ZAz8VfxWaLoUWkB/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

### 10. Start the VM

Click on the **Play** icon to start the **Virtual Machine**

<div align="left"><figure><img src="https://content.gitbook.com/content/AA9P3lN6X0LnMGWCOpyt/blobs/DkziqNSuSEdyCO0nN4TK/image.png" alt="" width="563"><figcaption></figcaption></figure></div>

## Next step <a href="#next-step" id="next-step"></a>

To continue the installation of the Operating System **Ubuntu Server 22.04** on your **VM**, visit the following page:

{% content-ref url="ubuntu" %}
[ubuntu](https://docs.anyone.io/relay/start/prep/ubuntu)
{% endcontent-ref %}
