#884110 libguestfs-perl: libguestfs perl bindings fails to report virtualdisk after upgrade from 1.34 to 1.36 #884110
- Package:
- libguestfs-perl
- Source:
- libguestfs
- Description:
- guest disk image management system - Perl bindings
- Submitter:
- Emmanuel Kasper
- Date:
- 2017-12-13 16:21:06 UTC
- Severity:
- normal
Dear Package maintainer
After upgrading libguestfs0 to 1.36, the sub routine disk_virtual_size fails with a qemu-img error.
Here is a small perl script which reproduces the issue:
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Guestfs;
system("qemu-img create -f vmdk test1.vmdk 1M");
my @disks = ("test1.vmdk");
my $g = Sys::Guestfs->new();
# turning readonly to 1, allow $g->disk_virtual_size to report properly
$g->add_drive_opts($_ , readonly => 0) foreach @disks;
$g->launch();
eval {
print $_ . ": " . $g->disk_virtual_size($_) . "\n" foreach @disks;
$g->close ();
};
unlink $_ foreach @disks;
die $@ if $@;
I attached to this bug report the output generated by setting export LIBGUESTFS_DEBUG=1.
* Emmanuel Kasper: I assume that you mean the error below, am I correct? ,---- | qemu-img: Could not open '/dev/fd/3': Failed to get shared "write" lock | Is another process using the image? | qemu-img info: test1.vmdk: qemu-img info exited with error status 1, see debug messages above at bug.pl line 19. `---- Is the .vmdk file writable by the user running the script? Cheers, -Hilko
Yes. Yes. Using the reproducer in the bug report, the vmdk is created as the same user trying to read the virtual disk size.
I am also on the libguestfs mailing list, should I mention the issue there, or do you prefer to report this upstream yourself ?
* Emmanuel Kasper: Please do mention it there, too. Cheers, -Hilko
Discussed upstream starting at https://www.redhat.com/archives/libguestfs/2017-December/thread.html