Unable to convert cloudlinux VMWare .vmdk files to .raw

Discussion in 'Proxmox VE: Installation and configuration' started by TeknikL, Mar 13, 2019.

  1. TeknikL

    TeknikL New Member

    Joined:
    Mar 13, 2019
    Messages:
    7
    Likes Received:
    0
    I'm trying to import a cloudlinux 6 and 7 VM from vmware into proxmox, I have successfully imported linux and windows vms but for these two I get this error, any ideas? seems like those would be journal inodes maybe?

    It throws these errors then fails. I tried with the included version and also compiled qemu-img 3.1.0 with same result.

    Command used:
    qemu-img convert -p -f vmdk -O raw "/VMWARE/disk1.vmdk" /scratch/disk1.raw

    Errors:
    qemu-img: error while reading sector 0: Input/output error
    qemu-img: error while reading sector 4096: Input/output error
    qemu-img: error while reading sector 8192: Input/output error
    qemu-img: error while reading sector 12288: Input/output error
    qemu-img: error while reading sector 16384: Input/output error
    qemu-img: error while reading sector 20480: Input/output error
    qemu-img: error while reading sector 24576: Input/output error
    qemu-img: error while reading sector 28672: Input/output error
     
  2. Chris

    Chris Proxmox Staff Member
    Staff Member

    Joined:
    Jan 2, 2019
    Messages:
    210
    Likes Received:
    22
    HI,
    have you tried to check if the image is ok `qemu-img check -f vmdk filename`? See the manpage for more details.
    Also, you can use`qm importdisk <vmid> <source> <storage> [OPTIONS]` to import a disk to a VM directly.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. TeknikL

    TeknikL New Member

    Joined:
    Mar 13, 2019
    Messages:
    7
    Likes Received:
    0
    qemu-img check disk1.cmdk returns
    No errors were found on the image.

    will try import, it can go directly to shared lvm?
     
  4. TeknikL

    TeknikL New Member

    Joined:
    Mar 13, 2019
    Messages:
    7
    Likes Received:
    0
    its not a ova, I'm just converting the disks to raw, then dd to the pre-created empty lvm disks, if there's a faster/better way I'd love to know it!
     
  5. virtRoo

    virtRoo New Member

    Joined:
    Jan 27, 2019
    Messages:
    23
    Likes Received:
    4
    Hi,

    Not sure if it's related. If 'disk1.vmdk' is a vmdk descriptor file, can you open up the file and see if vmdk version is set to either 1 or 2 instead of 3? If it's version 3, then it doesn't seem to be supported by the qemu 2.12 (not sure about 3.1) yet, so you may have to change the version number to either 1 or 2 and get rid of any entries that are related to CBT.

    Take a look at this doc from VMware.
     
  6. TeknikL

    TeknikL New Member

    Joined:
    Mar 13, 2019
    Messages:
    7
    Likes Received:
    0
    Hi, here' the info from the descriptor file.

    # Disk DescriptorFile
    version=1
    encoding="UTF-8"
    CID=5ebeebcf
    parentCID=ffffffff
    isNativeSnapshot="no"
    createType="vmfs"

    # Extent description
    RW 1048576000 VMFS "disk1-flat.vmdk"

    # The Disk Data Base
    #DDB

    ddb.adapterType = "lsilogic"
    ddb.deletable = "true"
    ddb.geometry.cylinders = "65270"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"
    ddb.longContentID = "97ca3bd6cea9d32e24945f585ebeebcf"
    ddb.thinProvisioned = "1"
    ddb.uuid = "60 00 C2 98 99 a1 4a cf-11 c3 86 6f fe 8f e3 30"
    ddb.virtualHWVersion = "8"
     
  7. TeknikL

    TeknikL New Member

    Joined:
    Mar 13, 2019
    Messages:
    7
    Likes Received:
    0
    I just had the same issue with some Windows vmdk disks.
     
  8. virtRoo

    virtRoo New Member

    Joined:
    Jan 27, 2019
    Messages:
    23
    Likes Received:
    4
    What if you try the conversion on other distros with generic KVM/qemu? If you wish to try it on CentOS 7, I recommend installing qemu-kvm-ev, which comes up a much more up-to-date version of qemu.
     
  9. TeknikL

    TeknikL New Member

    Joined:
    Mar 13, 2019
    Messages:
    7
    Likes Received:
    0
    The solution was to download and compile the latest version of vmfs-tools and then use THAT version of vmfs-fuse which supports files over 256GB.
     
  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