7 # Look for LVM LVs, VGs and PVs in a guest image.
9 die "Usage: lvs.pl guest.img\n" if @ARGV != 1 || ! -f $ARGV[0];
11 print "Creating the libguestfs handle\n";
12 my $h = Sys::Guestfs->new ();
13 $h->add_drive ($ARGV[0]);
15 print "Launching, this can take a few seconds\n";
19 print "Looking for PVs on the disk image\n";
21 print "PVs found: (", join (", ", @pvs), ")\n";
23 print "Looking for VGs on the disk image\n";
25 print "VGs found: (", join (", ", @vgs), ")\n";
27 print "Looking for LVs on the disk image\n";
29 print "LVs found: (", join (", ", @lvs), ")\n";