How Can I move ProxMox Virtual Machines from a server to another without cluster?

Discussion in 'Proxmox VE 1.x: Installation and configuration' started by BiagioParuolo, Sep 15, 2009.

  1. BiagioParuolo

    BiagioParuolo Member

    Joined:
    Apr 29, 2009
    Messages:
    255
    Likes Received:
    0
    Hi,

    How Can I move ProxMox Virtual Machines from a server to another without cluster?
    That is: the two servers are into different ISP...:confused:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,084
    Likes Received:
    342
    make a backup and do a restore (with vzdump).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. BiagioParuolo

    BiagioParuolo Member

    Joined:
    Apr 29, 2009
    Messages:
    255
    Likes Received:
    0
    Hi,

    fast reply -:)

    Do I need to copy config files, also? Which files?

    Could you write a small example for backup/restore?

    Thanks a lot...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,084
    Likes Received:
    342
    vzdump includes the data and the config files.

    see http://pve.proxmox.com/wiki/Backup_-_Restore_-_Live_Migration

    and just type 'man vzdump'

    beginning with 1.4beta vzdump changed a bit for KVM, more function and little different syntax (for restore, use 'qmrestore')
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. coffe

    coffe Member

    Joined:
    Apr 16, 2009
    Messages:
    153
    Likes Received:
    0
    Hi,
    Have a server crash here , only have harddrive left, so how do i find vz machines ? them in /etc/qemu-server/* i found but thats only KVM , need to move VZ before doing a reinstall.
    //Coffe
     
  6. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,257
    Likes Received:
    276
    OpenVZ config files are in /etc/vz/conf/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. greenvomit8

    greenvomit8 Member

    Joined:
    Jul 31, 2012
    Messages:
    34
    Likes Received:
    0
    Yes, Here is what i did using a USB Drive and I have written it up for dummies like me ; ):

    Connect the USB drive to the Source Proxmox server.

    Go to source proxmox console
    Determine which drive is the USB drive (in my case it was /dev/sdc):
    fdisk -l

    prepare disk for mounting:
    cfdisk /dev/sdc
    create primary partition and write and quit

    Format new partition:
    mkfs.ext4 /dev/sdc1

    Manually mount disk (in my case I called it backuplocal1TB):
    create folder /mnt/backuplocal1TB
    mount -t ext4 /dev/sdc1 /mnt/backuplocal1TB

    Go to source proxmox web interface to setup local proxmox backup directory:
    Select Datacenter folder
    Select Storage tab
    Click Add | Directory
    ID: backup1TB
    Directory: /mnt/backuplocal1TB
    Content: Backups
    OK

    Backup vms to USB drive:
    Select vm
    Goto Backup tab
    Ensure the USB Storage location is selected
    Click the Backup now button
    Do this for every vm you want to migrate

    Remove USB directory from source:
    Datacentre
    Storage
    Select backuplocal1TB and click the remove button

    Restore backups to Destination Proxmox server:
    Connect USB backup drive to destination proxmox server

    Go to destination proxmox console
    Determine which drive is the USB drive (in my case it was /dev/sdc):
    fdisk -l

    Manually mount disk (in my case I again called it backuplocal1TB):
    create folder /mnt/backuplocal1TB
    mount -t ext4 /dev/sdc1 /mnt/backuplocal1TB

    Go to destination proxmox web interface to setup local proxmox backup directory:
    Select Datacenter folder
    Select Storage tab
    Click Add | Directory
    ID: backup1TB
    Directory: /mnt/backuplocal1TB
    Content: Backups
    OK

    Expand destination proxmox server folder and select backuplocal1TB
    Select Content tab
    Select backup and click the Restore button
    Confirm Storage location and VM ID and click Restore again.
    Do this for each vm

    All VM config settings are preserved.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice