From ea6d9f7081b69db088bf2a1acceea75d2a3904b3 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 30 Jan 2013 16:09:18 +0000 Subject: [PATCH] Have KVM storage support default to cache=none for now Fix lvm to use raw rather than qcow2, since qcow2 makes no sense for LVM git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15019 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 84e4b1faf..cc40295b1 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -269,6 +269,9 @@ sub get_filepath_by_url { #at the end of the day, the libvirt storage api gives my $create = $args{create}; my $force = $args{force}; my $format = $args{format}; + if ($url =~ /^lvm:/) { + $format = 'raw'; + } unless ($format) { $format = 'qcow2'; } @@ -1610,7 +1613,7 @@ sub chvm { } elsif ($suffix =~ /vd/) { $bus='virtio'; } - my $xml = ""; + my $xml = ""; if ($currstate eq 'on') { #attempt live attach eval { $dom->attach_device($xml);