X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=v2v%2Fvirt-v2v.pl;h=d3fa647dcec287e206ea7fb0b84d83adcf7b46d4;hp=87da66bec9e9460cbff0442eafadc0b58bf69310;hb=c7845fb23e1353ae0331d8300271f813b637628c;hpb=4e444d5c09d78b0d292d95d1f97de12f26cc139d diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl index 87da66b..d3fa647 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -201,18 +201,22 @@ my $oses = inspect_operating_systems ($g, \%fses); #print "oses -----------\n"; #print Dumper($oses); -# We should probably refuse to do anything with those rare -# multiboot VMs at this point ... (XXX) +# Only work on single-root operating systems. +my $root_dev; +my @roots = keys %$oses; +die "no root device found in this operating system image" if @roots == 0; +die "multiboot operating systems are not supported by v2v" if @roots > 1; +$root_dev = $roots[0]; # Mount up the disks and check for applications. -my $root_dev; -foreach $root_dev (sort keys %$oses) { - my $os = $oses->{$root_dev}; - mount_operating_system ($g, $os); - inspect_in_detail ($g, $os); - $g->umount_all (); -} +my $os = $oses->{$root_dev}; +mount_operating_system ($g, $os); +inspect_in_detail ($g, $os); +$g->umount_all (); + + +