Commit 06067a24 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

Set cache=none for KVM guests

QEMU will refuse to live migrate with the default caching mode, so we
must explicitly set cache=none for the migration tests to pass.
Reviewed-by: 's avatarYash Mankad <ymankad@redhat.com>
Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent 88becc98
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment