lib/Sys/Virt/TCK/DomainBuilder.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
QEMU will refuse to live migrate with the default caching mode, so we
must explicitly set cache=none for the migration tests to pass.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
lib/Sys/Virt/TCK/DomainBuilder.pm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/Sys/Virt/TCK/DomainBuilder.pm b/lib/Sys/Virt/TCK/DomainBuilder.pm
index 7a25d42..399534c 100644
--- a/lib/Sys/Virt/TCK/DomainBuilder.pm
+++ b/lib/Sys/Virt/TCK/DomainBuilder.pm
@@ -396,11 +396,16 @@ sub as_xml {
type => $disk->{type},
$disk->{device} ? (device => $disk->{device}) : ());
+ my @driver = ();
+ if ($self->{type} eq "qemu" ||
+ $self->{type} eq "kvm") {
+ push @driver, "cache", "none";
+ }
if ($disk->{format}) {
- $w->emptyTag("driver",
- name => $disk->{format}->{name},
- type => $disk->{format}->{type});
+ push @driver, "name", $disk->{format}->{name},
+ "type", $disk->{format}->{type};
}
+ $w->emptyTag("driver", @driver);
if ($disk->{type} eq "block") {
$w->emptyTag("source",
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On 2/11/19 9:43 AM, Daniel P. Berrangé wrote: > QEMU will refuse to live migrate with the default caching mode, so we > must explicitly set cache=none for the migration tests to pass. > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > --- > lib/Sys/Virt/TCK/DomainBuilder.pm | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/lib/Sys/Virt/TCK/DomainBuilder.pm b/lib/Sys/Virt/TCK/DomainBuilder.pm > index 7a25d42..399534c 100644 > --- a/lib/Sys/Virt/TCK/DomainBuilder.pm > +++ b/lib/Sys/Virt/TCK/DomainBuilder.pm > @@ -396,11 +396,16 @@ sub as_xml { > type => $disk->{type}, > $disk->{device} ? (device => $disk->{device}) : ()); > > + my @driver = (); > + if ($self->{type} eq "qemu" || > + $self->{type} eq "kvm") { > + push @driver, "cache", "none"; > + } > if ($disk->{format}) { > - $w->emptyTag("driver", > - name => $disk->{format}->{name}, > - type => $disk->{format}->{type}); > + push @driver, "name", $disk->{format}->{name}, > + "type", $disk->{format}->{type}; > } > + $w->emptyTag("driver", @driver); > > if ($disk->{type} eq "block") { > $w->emptyTag("source", Reviewed-by: Yash Mankad <ymankad@redhat.com> -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2024 Red Hat, Inc.