From ff4470e753f83ae4ec8b8704461859e23609cbf2 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 18 Jan 2017 15:30:32 -0500 Subject: [PATCH] Use correct prefix for disks when vmstoragemodel=virtio --- xCAT-server/lib/xcat/plugins/kvm.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index ec87a53eb..a5b19a174 100755 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -588,11 +588,11 @@ sub build_diskstruct { } my $cdprefix = 'hd'; - # device name vd* doesn't work for CDROM, so delete it. - #if ($storagemodel eq 'virtio') { - # $cdprefix='vd'; - #} els - if ($storagemodel eq 'scsi') { + # Normally for vmstoragemodel=virtio, we would set prefix of "vd", but device name vd* + # doesn't work for CDROM, so for now use the same prefix "sd" as for vmstoragemodel=scsi. + if ($storagemodel eq 'virtio') { + $cdprefix='sd'; + } elsif ($storagemodel eq 'scsi') { $cdprefix = 'sd'; } $suffidx += 1; @@ -4045,7 +4045,8 @@ sub dohyp { my %newnodestatus; foreach $node (sort (keys %{ $hyphash{$hyp}->{nodes} })) { - if ($confdata->{$hyp}->{cpumodel} and $confdata->{$hyp}->{cpumodel} =~ /ppc64/i) { + unless ($confdata->{vm}->{$node}->[0]->{storagemodel}) { + # Storage model is not set, default to scsi for all architectures $confdata->{vm}->{$node}->[0]->{storagemodel} = "scsi"; } if ($confdata->{$hyp}->{cpu_thread}) {