[PATCH] Converter: Blacklist ACPI for RHEL 3 x86_64
by Matthew Booth
---
lib/Sys/VirtV2V/Converter.pm | 13 +++++++++++--
lib/Sys/VirtV2V/Converter/Linux.pm | 16 ++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/VirtV2V/Converter.pm b/lib/Sys/VirtV2V/Converter.pm
index 3b0500b..a6eba45 100644
--- a/lib/Sys/VirtV2V/Converter.pm
+++ b/lib/Sys/VirtV2V/Converter.pm
@@ -319,10 +319,19 @@ sub _configure_capabilities
}
foreach my $feature ($dom->findnodes('/domain/features/*')) {
- if (!exists($features{$feature->getNodeName()})) {
+ my $name = $feature->getNodeName();
+
+ if (!exists($features{$name})) {
print STDERR user_message
(__x("The connected hypervisor does not support ".
- "feature {feature}", feature => $feature->getNodeName()));
+ "feature {feature}", feature => $name));
+ $feature->getParentNode()->removeChild($feature);
+ }
+
+ if ($name eq 'acpi' && !$guestcaps->{acpi}) {
+ print STDERR user_message
+ (__"The target guest does not support acpi under KVM. ACPI ".
+ "will be disabled.");
$feature->getParentNode()->removeChild($feature);
}
}
diff --git a/lib/Sys/VirtV2V/Converter/Linux.pm b/lib/Sys/VirtV2V/Converter/Linux.pm
index db7a1ed..057ef45 100644
--- a/lib/Sys/VirtV2V/Converter/Linux.pm
+++ b/lib/Sys/VirtV2V/Converter/Linux.pm
@@ -105,6 +105,7 @@ sub convert
$guestcaps{virtio} = $virtio;
$guestcaps{arch} = _get_os_arch($desc);
+ $guestcaps{acpi} = _supports_acpi($desc, $guestcaps{arch});
return \%guestcaps;
}
@@ -495,6 +496,21 @@ sub _find_xen_kernel_modules
return @modules;
}
+# Return 1 if the guest supports ACPI, 0 otherwise
+sub _supports_acpi
+{
+ my ($desc, $arch) = @_;
+
+ # Blacklist configurations which are known to fail
+ # RHEL 3, x86_64
+ if ($desc->{distro} eq 'rhel' && $desc->{major_version} == 3 &&
+ $arch eq 'x86_64') {
+ return 0;
+ }
+
+ return 1;
+}
+
=back
=head1 COPYRIGHT
--
1.6.5.2
14 years, 10 months
Refactor virt-v2v to be more like a 'big script'
by Matthew Booth
These patches combine HVSource and HVTarget into a single Converter. This should
make it more obvious where to hack without losing any practical flexibility.
GuestOS remains separate. GuestOS is now a misnomer, because it's really only a
Linux distro abstraction. It will be useless for Windows, for example. Functions
which you'd expect to be different on a non-RH distro should live in GuestOS.
By this measure it's currently too fat. I'll gradually move non-distro specific
things out of it as I touch them.
Matt
14 years, 10 months
[PATCH] po: Include fr.po in MANIFEST
by Matthew Booth
---
MANIFEST | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/MANIFEST b/MANIFEST
index 13897af..3489ff1 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -18,6 +18,7 @@ MANIFEST This list of files
MANIFEST.SKIP
META.yml
po/es.po
+po/fr.po
po/it.po
po/Makefile
po/PACKAGE
--
1.6.5.2
14 years, 10 months
[PATCH] snapshot: Explicitly remove unused disk source attribute
by Matthew Booth
This fixes a regression introduced by 9e3d1160. Snapshot was leaving both dev
and file attributes specified. The result was that the v2v would actually
operate on the underlying storage rather than the snapshot.
---
snapshot/v2v-snapshot.pl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/snapshot/v2v-snapshot.pl b/snapshot/v2v-snapshot.pl
index f089a77..e2cc33c 100755
--- a/snapshot/v2v-snapshot.pl
+++ b/snapshot/v2v-snapshot.pl
@@ -529,8 +529,10 @@ sub _commit_guest
# Update the domain XML with the location of the backing store
if($backing_type == Sys::Virt::StorageVol::TYPE_BLOCK) {
$source->setAttribute('dev', $backing_path);
+ $source->removeAttribute('file');
} else {
$source->setAttribute('file', $backing_path);
+ $source->removeAttribute('dev');
}
# Update the domain XML with with a driver appropriate to the backing
@@ -647,6 +649,9 @@ sub _snapshot_guest
# Update the source to be a "file" with the new path
$source->setAttribute("file", $vol->get_path());
+ # Remove the dev attribute in case it was set
+ $source->removeAttribute("dev");
+
# Also update the disk element to be a "file"
$source->getParentNode()->setAttribute('type', 'file');
--
1.6.5.2
14 years, 10 months