Skip to main content

Creating a Source and Setting Up the Agent

A source represents a vCenter or ESXi environment in the Arvancloud panel. After creating the source, you install the Agent in the same environment, and the Agent connects to Arvancloud with the source's ID (UID). For example, if you're moving your organization's data center vCenter to Arvancloud, you create a source with a name such as vcenter-office and install the Agent on that vCenter.

Before you start, complete the steps in Preparing the VMware Environment. In these steps, you need the Arvancloud API key and the vCenter user's username and password.

Creating a Source​

In the Cloud Server panel, go to Cloud Migration and click New Cloud Migration.

On the page that opens, enter the following information:

  • Source name

    Enter a name for the source so you can find it in the source list. This field is required.

  • Tags

    You can add up to 8 tags to categorize sources. After typing each tag, press Enter or click the + button.

Then click Confirm. The new source appears in the source list of the Cloud Migration section.

In the source list, click the copy icon next to the source's UID and keep it. You need this ID when installing the Agent.

Downloading the Agent​

The Agent is a ready-made virtual machine in OVA format. To download it, click Download Agent in the Cloud Migration section.

The Agent machine's resources are set in the OVA file and can't be changed.

Installing the Agent in vCenter​

Install the Agent through vSphere Client like any other OVA file. During this process, you also enter the Agent's connection settings so it is configured automatically the first time it turns on.

Step 1: Select the OVA File​

In vSphere Client, right-click the Datacenter, Cluster, or Host you want and select Deploy OVF Template. On the Select an OVF template page, select Local file and upload the downloaded OVA file.

Step 2: Choose the Name and Location​

On the Select a name and folder page, enter a name for the Agent machine and choose its folder. Then, on the Select a compute resource page, select the host or cluster the Agent runs on. On the Review details page, review the OVA file's details.

Step 3: Select the Datastore​

On the Select storage page, select the datastore you want for the Agent's disk.

Step 4: Connect the Network Cards​

On the Select networks page, connect the Agent's management network card to the network that vCenter and the ESXi hosts are in, and connect the internet network card to a network with internet access. The Agent network requirements help you choose these two networks.

Step 5: Enter the Agent Settings​

On the Customize template page, enter the following information:

  • Agent password

    Set the password for logging in to the Agent machine's console. If the Agent doesn't come online, you need this password to check the logs or reconfigure it. This field is required.

  • Arvancloud API key

    Enter the API key of the machine user you created for the Agent. This field is required.

  • Source UID

    Enter the ID you copied from the source list. This field is required.

  • vCenter address

    Enter vCenter's IP address or domain name in the management network. This field is required.

  • vCenter username and password

    Enter the information of the user you created for the Agent in vCenter, for example rvdr-agent@vsphere.local. This field is required.

Step 6: Finish the Installation​

On the Ready to complete page, review the settings and click Finish. After the deployment finishes, turn on the Agent machine.

The first time it turns on, the Agent checks the network cards, saves the settings you entered, and starts its service. After that, you can check the Agent's connection.

Installing the Agent on a Standalone ESXi​

If you don't have vCenter and use a standalone ESXi, create the OVA file as a virtual machine through the ESXi Host Client. The steps differ from vCenter, and in this case you enter the Agent's settings manually after it turns on. To do this, turn on the Agent machine and follow the steps in Manual Agent Configuration.

Manual Agent Configuration​

Use this method if you installed the Agent on a standalone ESXi or want to correct its settings, for example, when you entered the API key or the vCenter information incorrectly and the Agent can't connect.

Open the Agent machine's console through vSphere Client or the ESXi Host Client and log in with the password you set during installation. Then run the following command:

sudo rvdr-first-setup

This command asks you for the information the Agent needs, one item at a time:

  • RVDR API URL

    The Arvancloud API address. The default is https://napi.arvancloud.ir; to use it, simply press Enter.

  • RVDR API key

    The machine user's API key.

  • Source UID

    The ID of the source you created in the panel.

  • vCenter or ESXi address, username, and password

    The information of the user you created for the Agent.

The settings are saved in the /etc/rvdr-agent/config.yaml file. After that, restart the Agent service:

sudo systemctl restart rvdr-agent

Checking the Agent Connection​

After the Agent turns on, go back to Cloud Migration in the panel and click the refresh button. When the Agent connects to Arvancloud, the Install Agent step in the source's row is marked with a green check, and the Start Configuration button appears next to it.

If the Agent doesn't come online, log in to the Agent machine's console and check the logs from its first boot with the following command:

sudo journalctl -f -u rvdr-apply-ovf-env.service

In these logs, the line network verified shows that the Agent has detected both the management and internet network cards. Normally, the logs end with the following message:

=== RVDR appliance first-boot automation completed successfully ===

If you don't see this message, check the errors before it. Most of these errors happen because the Agent doesn't have access to the internet and the Arvancloud APIs, or to vCenter and the ESXi hosts. In this case, check the network requirements again.

If the first boot finished successfully but the Agent still isn't online, check the Agent's operational logs:

sudo journalctl -f -u rvdr-agent.service

Normally, the Agent periodically fetches the migration schedule from Arvancloud and logs messages like the following:

level=INFO msg="Polling RVDR API for schedules..." app=rvdr_agent
level=INFO msg="Poll and schedule sync complete" app=rvdr_agent

If you see errors in these logs, check the Arvancloud API key and the vCenter username and password. These two are the most common reasons the Agent doesn't connect, and you can correct them with Manual Agent Configuration.

After the Agent comes online, you can configure virtual machines for migration.