How to work in lvm storage.

Discussion in 'Proxmox VE: Installation and configuration' started by Kephin, Apr 16, 2018.

  1. Kephin

    Kephin New Member

    Joined:
    Apr 21, 2015
    Messages:
    8
    Likes Received:
    0
    Little point to note up front: I come from Proxmox 3 and I'm used to all VM files just sitting some vz directory somewhere in var. These directories on PX5 are empty. (this is a default install)

    So now i'm trying to move/migrate a VMWare machine to Proxmox, the part that involves converting the vwmare disk into something Promox can use is obvious enough, but I can't for the life of me figure out how to put the disk into the large storage cluster in Proxmox as that's an LVM storage group and can't just casually browse to it using a tool like WinSCP.
    I must somehow directly upload it to te big storage because the disk image is bigger then the local directory storage of proxmox.

    How do I best go about doing this?
     
  2. udo

    udo Well-Known Member
    Proxmox Subscriber

    Joined:
    Apr 22, 2009
    Messages:
    5,835
    Likes Received:
    159
    Hi,
    depends how big your vmware disks and your local storage is.

    with more than twice free space in the lv data (thin provisioning - looks with "lvs") you can do somthing like this:

    create transfer-LV (in this case 150GB and mount it on /mnt
    Code:
    lvcreate -V 150G --thin -n restore pve/data
    mkfs.ext4 /dev/pve/restore
    mount /dev/pve/restore /mnt
    scp "vmdisk.thick" /mnt/
    
    After that you can create an VM with an disk bigger or equal the size like the vmware-disk.

    Then convert the vmware.disk with qemu-img (output directly to your vm-disk, like /dev/pve/vm-100-disk-1 ).

    If your VM start after that, umount /mnt and remove /dev/pve/restore

    Udo
     
  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