From 4ea6bae9a03e77a5f1c5b935d3d979835f46ac93 Mon Sep 17 00:00:00 2001 From: linggao Date: Fri, 21 Sep 2012 16:52:13 +0000 Subject: [PATCH] fixed a defect for chvm -a git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13874 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 8a77d0536..34044ebc0 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -1520,7 +1520,7 @@ sub chvm { foreach $store (split /\|/, $confdata->{vm}->{$node}->[0]->{storage}) { $store =~ s/,.*//; $store =~ s/=.*//; - if ($store =~ /^nfs:\/\//) { + if (($store =~ /^nfs:\/\//) || ($store =~ /^dir:\/\//)) { my %disks = %{get_multiple_paths_by_url(url=>$store,node=>$node)}; foreach (keys %disks) { $useddisks{$disks{$_}->{device}}=1; @@ -1606,7 +1606,7 @@ sub chvm { } $vmxml=$dom->get_xml_description(); } elsif ($confdata->{kvmnodedata}->{$node}->[0]->{xml}) { - my $vmxml=$confdata->{kvmnodedata}->{$node}->[0]->{xml}; + $vmxml=$confdata->{kvmnodedata}->{$node}->[0]->{xml}; my $disknode = $parser->parse_balanced_chunk($xml); my $vmdoc = $parser->parse_string($vmxml); my $devicesnode = $vmdoc->findnodes("/domain/devices")->[0];