Comment 25 for bug 905095

Revision history for this message
In , Daniel (daniel-redhat-bugs) wrote :

> qemu-img: Could not open 'TestLinux-disk1.vmdk': Operation not permitted

This is probably because qemu-img.c code expects brdv_open() to return an errno value

    ret = bdrv_open(bs, filename, flags, drv);
    if (ret < 0) {
        error_report("Could not open '%s': %s", filename, strerror(-ret));
        goto fail;
    }

while the vmdk_open function just returns -1 for everything:

   ...
    return 0;
 fail:
    qemu_free(s->l1_backup_table);
    qemu_free(s->l1_table);
    qemu_free(s->l2_cache);
    return -1;
}

and by coincidence, '1 == EPERM'. There are ~4 codepaths in vmdk_open that could fail, the VMDK magic check and then a couple of reads of metadata