Back to Cloud VPS Documentation

    Migrate from Linode to RamNode

    A complete step-by-step guide to exporting your Linode disk images and deploying them on RamNode's Cloud VPS platform.

    Introduction

    Migrating your infrastructure from Linode to RamNode offers several advantages, including competitive pricing, modern cloud infrastructure, and excellent performance. This comprehensive guide walks you through the entire migration process, from exporting your Linode disk images to deploying them on RamNode's Cloud VPS platform.

    RamNode supports multiple image formats including RAW, QCOW2, VMDK, VDI, and VHD/VHDX, making it easy to import your existing virtual machines. Whether you're migrating a single server or multiple instances, this guide provides the tools and techniques you need for a successful migration.

    Prerequisites

    • A RamNode Cloud account (sign up at cloud.ramnode.com)
    • Root access to your Linode instance
    • A local machine or intermediate server with sufficient storage space for disk images
    • SSH client installed on your local machine
    • qemu-img utility for image conversion (optional but recommended)
    • Sufficient bandwidth for large file transfers

    Important: Schedule your migration during off-peak hours to minimize impact on your services. Create backups of all critical data before proceeding.

    Migration Strategy Overview

    There are two primary approaches to migrating from Linode to RamNode:

    Method 1: Block-Level Migration

    Creates an exact byte-for-byte copy of your Linode disk using dd. Preserves everything including the operating system, applications, and configurations.

    Recommended for most migrations

    Method 2: File-Level Migration

    Deploy a fresh OS on RamNode and transfer application data and configurations using rsync. Results in a cleaner setup but requires more manual configuration.

    Good for simpler setups

    This guide focuses primarily on Method 1 (block-level migration) as it provides the most complete migration path while preserving your existing setup.

    1Preparing Your Linode for Export

    Step 1: Audit Your Current Environment

    Before exporting, document your current setup. SSH into your Linode and gather the following information:

    # Check disk usage
    df -h
    
    # List installed packages (Debian/Ubuntu)
    dpkg --get-selections > ~/installed-packages.txt
    
    # List installed packages (CentOS/Rocky/Alma)
    rpm -qa > ~/installed-packages.txt
    
    # Document running services
    systemctl list-units --type=service --state=running
    
    # Note network configuration
    ip addr show

    Step 2: Clean Up Before Export

    Reduce the image size by removing unnecessary data:

    # Clear package cache (Debian/Ubuntu)
    sudo apt clean
    
    # Clear package cache (CentOS/Rocky/Alma)
    sudo yum clean all
    
    # Remove old logs
    sudo journalctl --vacuum-time=7d
    sudo find /var/log -type f -name "*.gz" -delete
    
    # Clear temporary files
    sudo rm -rf /tmp/*

    Step 3: Prepare for Cloud-Init (Recommended)

    RamNode uses cloud-init for instance configuration. Install it if not already present:

    Ubuntu/Debian:

    sudo apt update && sudo apt install cloud-init -y

    CentOS/Rocky/Alma:

    sudo yum install cloud-init -y

    Step 4: Install VirtIO Drivers

    VirtIO drivers provide optimal performance on RamNode's cloud platform. Verify they're available:

    lsmod | grep virtio

    You should see modules like virtio_blk, virtio_net, and virtio_pci. If not present:

    sudo modprobe virtio_blk virtio_net virtio_pci

    2Exporting Your Linode Disk Image

    Step 1: Boot into Rescue Mode

    To create a consistent disk image, boot your Linode into Rescue Mode:

    1. Log into the Linode Cloud Manager at cloud.linode.com
    2. Select your Linode from the list
    3. Click on the "Rescue" tab in the sidebar
    4. Ensure your main disk is assigned to /dev/sda
    5. Click "Reboot into Rescue Mode"

    Step 2: Configure SSH in Rescue Mode

    Access your Linode via the LISH console (Linode Shell) from the Cloud Manager, then configure SSH:

    # Set a root password
    passwd
    
    # Start the SSH service
    service ssh start

    Step 3: Export the Disk Image

    From your local machine or an intermediate server, download the disk image using dd over SSH:

    Basic export (RAW format):

    ssh root@YOUR_LINODE_IP "dd if=/dev/sda status=progress" > linode.img

    Export with compression (recommended for large disks):

    ssh root@YOUR_LINODE_IP "dd if=/dev/sda | gzip -c --fast" > linode.img.gz

    Tip: For very large disks, consider using pigz (parallel gzip) for faster compression. The transfer time depends on your disk size and network bandwidth. A 25GB disk typically takes 30-60 minutes over a stable connection.

    Step 4: Verify the Downloaded Image

    After the download completes, verify the image integrity:

    # Check file size
    ls -lh linode.img
    
    # Verify the image can be read
    file linode.img
    
    # If compressed, decompress first
    gunzip linode.img.gz

    3Converting the Image for RamNode

    RamNode supports multiple image formats. While RAW images work, converting to QCOW2 format offers better space efficiency and faster uploads.

    Installing qemu-img

    Ubuntu/Debian:

    sudo apt update && sudo apt install qemu-utils -y

    CentOS/Rocky/Alma:

    sudo yum install qemu-img -y

    macOS (with Homebrew):

    brew install qemu

    Converting RAW to QCOW2

    Convert your RAW image to compressed QCOW2 format:

    qemu-img convert -f raw -O qcow2 -c linode.img linode.qcow2

    The -c flag enables compression, significantly reducing file size. A 25GB RAW image might compress to 5-10GB depending on actual data usage.

    Verify the Converted Image

    qemu-img info linode.qcow2

    This displays image format, virtual size, and actual disk size.

    RamNode Supported Image Formats

    FormatDescriptionRecommended
    QCOW2QEMU Copy-On-Write format, supports compressionYes
    RAWUncompressed disk imageSupported
    VMDKVMware virtual disk formatSupported
    VDIVirtualBox disk image formatSupported
    VHD/VHDXMicrosoft Hyper-V formatSupported

    4Uploading Your Image to RamNode

    Method A: Cloud Control Panel Upload

    For images under 2GB, use the web-based upload:

    1. Log into the RamNode Cloud Control Panel at cloud.ramnode.com
    2. Navigate to Compute → Images in the sidebar
    3. Click "Create Image"
    4. Select "File" as the source
    5. Choose your converted image file (linode.qcow2)
    6. Configure the image details:
      • Name: A descriptive name (e.g., "Linode-WebServer-Migration")
      • Format: QCOW2 (or your image format)
      • Minimum disk: The original Linode disk size
      • Minimum RAM: Based on your application requirements
    7. Click "Create Image" and wait for the upload to complete

    Method B: Large Image Upload via OpenStack CLI

    For images larger than 2GB, use the OpenStack CLI for reliable uploads:

    Step 1: Download Your Region's Authentication File

    Download the authentication file from the Cloud control panel for your target region. Go to cloud.ramnode.com, navigate to API Access, and download the OpenRC file for your region.

    Click the + symbol to create a new one if you don't already have one.

    Step 2: Install OpenStack CLI (if not already installed)

    pip install python-openstackclient

    Step 3: Source the Authentication File

    source openrc

    You'll be prompted for your password.

    Step 4: Upload the Image

    openstack image create --disk-format qcow2 --container-format bare --file <file.qcow2> <image-name>

    Replace <file.qcow2> with your image filename, and <image-name> with the name you want for the image.

    Example:

    openstack image create --disk-format qcow2 --container-format bare --file linode.qcow2 Linode-WebServer-Migration

    Note: There is no progress bar. When it completes, it will return to the command prompt.

    Tip: For detailed instructions on OpenStack CLI setup and usage, see our Region Migration Guide.

    5Deploying Your Migrated Instance

    Step 1: Create a New Instance from Your Image

    Once your image is uploaded and shows "Active" status:

    1. Navigate to Compute → Instances
    2. Click "Launch Instance"
    3. In the Instance Source section, select "Image"
    4. Find and select your uploaded image
    5. Choose your instance specifications:
      • Flavor: Match or exceed your original Linode plan
      • Network: Select appropriate network configuration
      • Security Groups: Configure firewall rules
      • SSH Key: Add your SSH public key
    6. Click "Launch Instance"

    Step 2: Initial Connection and Verification

    After the instance reaches "Active" status:

    # Connect via SSH
    ssh root@YOUR_NEW_RAMNODE_IP
    
    # Verify system is running correctly
    uname -a
    df -h
    systemctl status

    Step 3: Update Network Configuration

    If cloud-init was installed, network configuration should be automatic. Otherwise, manually configure networking:

    # Check current IP configuration
    ip addr show
    
    # If using static IPs, update:
    # /etc/netplan/*.yaml (Ubuntu 18.04+)
    # /etc/sysconfig/network-scripts/ifcfg-* (CentOS/Rocky)

    6Post-Migration Tasks

    Update DNS Records

    • Lower TTL values before migration to speed up propagation
    • Update A/AAAA records to the new IP addresses
    • Verify PTR (reverse DNS) records if needed
    • Test DNS resolution from multiple locations

    Verify Services

    Systematically verify all services are functioning:

    # Check listening ports
    ss -tulpn
    
    # Verify web services
    curl -I http://localhost
    curl -I https://localhost
    
    # Check database connectivity
    mysql -u root -p -e "SHOW DATABASES;"
    # or
    psql -U postgres -c "\l"

    Update Firewall Rules

    Review and update firewall configurations:

    # UFW (Ubuntu)
    sudo ufw status
    sudo ufw allow 22/tcp
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    
    # firewalld (CentOS/Rocky)
    sudo firewall-cmd --list-all
    sudo firewall-cmd --permanent --add-service=http
    sudo firewall-cmd --permanent --add-service=https
    sudo firewall-cmd --reload

    Update SSL Certificates

    If using Let's Encrypt, renew certificates after DNS propagation:

    # Certbot certificate renewal
    sudo certbot renew --dry-run
    sudo certbot renew

    Troubleshooting Common Issues

    Instance Won't Boot

    • Verify VirtIO drivers are installed and loaded
    • Check that the bootloader (GRUB) is properly configured
    • Use the VNC console in RamNode Cloud Panel to view boot messages
    • Ensure the image wasn't corrupted during transfer

    Network Not Working

    • Confirm cloud-init is installed and enabled
    • Check that DHCP is configured on the primary network interface
    • Verify network security groups allow required traffic
    • Review /var/log/cloud-init.log for configuration errors

    SSH Connection Refused

    • Verify SSH service is running: systemctl status sshd
    • Check security groups allow port 22
    • Verify SSH keys were properly injected via cloud-init
    • Use VNC console to troubleshoot if SSH is inaccessible

    Disk Space Issues

    If your new instance has a larger disk than the source:

    # Resize the filesystem to use full disk
    sudo resize2fs /dev/vda1
    
    # Or for XFS
    sudo xfs_growfs /

    Need Help? RamNode's support team can assist with image uploads and troubleshooting boot issues. Submit a ticket at clientarea.ramnode.com or use the live chat for immediate assistance.

    Alternative: File-Level Migration

    If block-level migration isn't suitable for your needs, consider a file-level approach using rsync. This method works well for simpler setups or when you want a clean slate.

    Basic Steps

    1. Deploy a fresh OS instance on RamNode
    2. Install the same packages and services as your Linode
    3. Transfer configuration files and data using rsync
    4. Export and import databases
    5. Update configurations for the new environment
    6. Test thoroughly before switching DNS
    # Sync home directories
    rsync -avz --progress /home/ newserver:/home/
    
    # Sync web files
    rsync -avz --progress /var/www/ newserver:/var/www/
    
    # Sync configuration
    rsync -avz --progress /etc/nginx/ newserver:/etc/nginx/

    Conclusion

    Migrating from Linode to RamNode is a straightforward process when following the proper steps. By using block-level disk imaging and RamNode's custom image upload feature, you can preserve your entire environment and minimize reconfiguration.

    Key Takeaways

    • Always create backups before migration
    • Use QCOW2 format for efficient storage and faster uploads
    • Install cloud-init and VirtIO drivers for optimal cloud integration
    • Test thoroughly before updating DNS records
    • Contact RamNode support for assistance with large images