7 my $g = Sys::Guestfs->new ();
8 $g->add_drive_ro ("disk.img");
11 my @logvols = $g->lvs ();
12 print "logical volumes: ", join (", ", @logvols), "\n\n";
14 $g->mount_ro ("/dev/vg_f12x32/lv_root", "/");
15 print "----- ISSUE file: -----\n";
16 print ($g->cat ("/etc/issue"));
17 print "----- end of ISSUE file -----\n\n";
19 # Use Augeas to list the NTP servers.
20 $g->aug_init ("/", 16);
21 my @nodes = $g->aug_match ("/files/etc/ntp.conf/server");
22 my @ntp_servers = map { $g->aug_get ($_) } @nodes;
23 print "NTP servers: ", join (", ", @ntp_servers), "\n\n";