To recover VMs & Containers

Discussion in 'Proxmox VE: Installation and configuration' started by Iuri Sampaio, Apr 10, 2019.

  1. Iuri Sampaio

    Iuri Sampaio New Member

    Joined:
    Apr 10, 2019
    Messages:
    2
    Likes Received:
    0
    Hi there,

    We had a Proxmox server (v. 5.3.8), which hosts a few VMs and containers. Unfortunately, the server started to present some problems and it didn't reboot anymore. Then, we replaced the HDs, and reinstall a new Proxmox environment (v.5.3.8), from scratch.

    Now, we would like to move all the VMs and containers back to their places. We've plugged the old HD, which contains the previous local-lvm (pve), where the old VMs and containers were installed.

    Is it possible to recover those old VMs and containers and reuse them in the new Proxmox installation?

    How would I import them into this new Proxmox installation?



    Best wishes,
    I
     
  2. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    315
    Likes Received:
    26
    Hi,

    firstly, make a backup of the old disk just in case.
    You can try to add the disk as a new storage (LVM-Thin I think, the default for local-lvm) after plugging it in. That way you could directly access the old VMs and CTs. You might need to copy your configs too.

    There are other ways, for example copying the LVs.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Iuri Sampaio

    Iuri Sampaio New Member

    Joined:
    Apr 10, 2019
    Messages:
    2
    Likes Received:
    0
    I've plugged both HD in, and they show as sdb ad sdc. However, when I try to mount them, ut returns a prompt error message
    The plan is: once I mount them I will copy the config file, which is within SDC and the LVs, within SDB.

    Furhtermore, I'd created a template, which must be saved within SDC. I'll try to recover that too.

    Best wishes,
    I

    Disk /dev/sdb: 232.9 GiB, 250000000000 bytes, 488281250 sectors
    Disk /dev/sdc: 149 GiB, 160000000000 bytes, 312500000 sectors


    root@pve:~# mount -t ext4 /dev/sdc /media

    mount: wrong fs type, bad option, bad superblock on /dev/sdc,

    missing codepage or helper program, or other error


    In some cases useful info is found in syslog - try

    dmesg | tail or so.


     
  4. oguz

    oguz Proxmox Staff Member
    Staff Member

    Joined:
    Nov 19, 2018
    Messages:
    315
    Likes Received:
    26
    Hi,

    did you check if this is the right filesystem? Maybe it's not ext4.

    You can also try adding them as new storage directly from the GUI, under Datacenter -> Storage -> Add.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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