2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #2421 from gurevichmark/vmstoragemodel

Use correct prefix for disks when vmstoragemodel=virtio
This commit is contained in:
Mark Gurevich 2017-01-19 17:18:20 -05:00 committed by GitHub
commit a8a382857d

View File

@ -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}) {