
Azure Virtual Machines run on Microsoft's cloud infrastructure and support a wide range of Linux and Windows workloads. While Azure offers extensive services, organizations often seek alternatives due to complex billing structures, regional pricing variations, or the desire for a simpler cloud experience. Vultr Cloud Compute delivers high-performance virtual machines with straightforward pricing across 32+ global locations.
This guide explains how to migrate a Linux-based Azure VM to Vultr Cloud Compute at the application level, ensuring your workloads transition smoothly without carrying over Azure-specific dependencies.
Before you begin, you need to:
sudo privileges.Before starting the migration, assess what needs to move and how the new environment will differ. Proper planning reduces downtime and prevents missed components.
waagent), Azure Monitor extensions, or managed identity integrations won't function outside Azure. Plan alternatives or remove these dependencies.Before making any changes, create a recovery point on Azure to protect against data loss or mistakes during the migration process. You can create snapshots using either the Azure CLI or the Azure Portal.
Create a snapshot of the OS disk. Replace RESOURCE-GROUP, SNAPSHOT-NAME, and OS-DISK-NAME with your values.
List your snapshots to confirm creation.
Connect to your Azure VM and gather information about its current state. This inventory serves as a checklist during migration and helps verify that all components work correctly afterward.
List all active services and export to a file for reference.
Note application services you need to migrate. Ignore Azure-specific services like walinuxagent.service since these won't be needed on Vultr.
View which ports have active listeners.
Document any ports your applications require so you can open them on Vultr.
Export the package list for reference.
Debian/Ubuntu:
RHEL/CentOS:
Linux systems store user information in /etc/passwd and group information in /etc/group. Regular user accounts typically have UIDs of 1000 or higher.
List non-system user accounts.
This displays username, UID, and home directory. Plan to recreate these accounts on Vultr.
List non-system groups.
View cron jobs for the current user and check system-wide cron directories.
Document paths containing application data and configurations:
/home: User home directories/var/www: Web server document roots/opt: Third-party applications/etc/nginx or /etc/apache2: Web server configsSet up the destination environment before transferring data. This includes installing software, creating user accounts, and configuring firewall rules to match your Azure setup.
Update the package manager and install applications matching your Azure VM.
Debian/Ubuntu:
RHEL/CentOS:
Recreate the user accounts identified during your audit. Add each user with matching UID to ensure file ownership transfers correctly. Replace USER-ID, USERNAME, and GROUP with your values.
Replicate the Azure NSG rules using the local firewall.
UFW (Ubuntu/Debian):
firewalld (RHEL/CentOS):
Use rsync to copy files from the Azure VM to Vultr. Transfer data to /tmp/ first, then move it to the final destination with elevated privileges. This tool efficiently handles large transfers, preserves file permissions and ownership, and can resume interrupted sessions.
On the Azure VM, ensure rsync is installed.
Debian/Ubuntu:
RHEL/CentOS:
Run a dry-run to preview what will be copied. Replace SOURCE-PATH with the directory on the Azure VM you want to transfer, DESTINATION-NAME with a descriptive name for the destination directory, and VULTR-IP with your Vultr instance IP address.
The -n flag simulates the transfer without making changes.
Transfer the data to /tmp/ on the Vultr instance.
-a preserves permissions, ownership, timestamps, and symbolic links-v provides verbose output-z compresses data during transfer--progress displays transfer progressOn the Vultr instance, move the transferred files to their final location. Replace DESTINATION-NAME with the name used in the rsync command and FINAL-PATH with the target directory.
Repeat these steps for each directory you need to transfer. Common directories to consider include:
/var/www/, /var/www/html//home//opt/, /usr/local/, /srv/ (adjust based on your application structure)/etc/nginx/, /etc/apache2/, /etc/mysql/ (avoid copying /etc/ entirely, as it contains system-specific settings)If your Azure VM runs a database server, export the data and import it on Vultr.
This section demonstrates MySQL/MariaDB migration. For PostgreSQL migrations, refer to the PostgreSQL documentation using pg_dump and pg_restore. For MongoDB migrations, refer to the MongoDB documentation using mongodump and mongorestore.
Verify MySQL versions are compatible on both servers.
Create a database dump on the Azure VM.
Transfer the dump file.
On the Vultr instance, import the databases.
Verify the import.
After transferring files, adjust configurations for the new environment and verify that applications function correctly before directing production traffic.
Update any hardcoded IP addresses or hostnames in application configs.
Verify database connection strings point to the correct host.
Test web server configuration and restart services.
Recreate cron jobs documented during the audit.
Check that all services are running.
Review logs for errors.
Ubuntu/Debian:
RHEL/CentOS:
Also check application-specific logs in /var/log/ as needed.
Test the application using the Vultr IP address.
Compare running services with your original audit to confirm nothing was missed.
After testing confirms the Vultr instance is ready for production, follow these steps to switch traffic to Vultr.
Lower DNS TTL in advance to speed propagation when you switch records.
Final sync: Capture any data changes since the initial transfer. Replace SOURCE-PATH and DESTINATION-NAME with the paths used in your initial transfer.
After the sync completes, move the files to their final location on the Vultr instance as done during the initial transfer.
Update DNS: Change your domain's A record to point to the Vultr instance IP.
Monitor closely: Watch application and system logs for the first several hours after cutover. Replace the log paths with those specific to your application and web server.
For web server logs, adjust the paths based on your web server:
/var/log/nginx/access.log, /var/log/nginx/error.log/var/log/apache2/access.log, /var/log/apache2/error.logMaintain rollback option: Keep the Azure VM for a few days in case you need to revert.
You have successfully migrated your Azure Virtual Machine to Vultr Cloud Compute. This guide covered backing up your source VM, auditing services and configurations, preparing the Vultr instance, transferring data with rsync, migrating databases, and validating functionality before cutover. Your applications now run on Vultr's infrastructure with predictable pricing and global availability. For more information on managing your Vultr Cloud Compute instances, visit the Vultr Cloud Compute documentation.
0 Comments
Be the first to comment and share your perspective with the community.