[libvirt] [tck PATCH] Set cache=none for KVM guests
Yash Mankad
ymankad at redhat.com
Mon Feb 11 17:01:22 UTC 2019
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 at 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 at redhat.com>
More information about the libvir-list
mailing list