mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 00:24:03 +00:00
Move bus priority list to OSDefaults
So a field container does not need to know if Linux likes SCSI.
This commit is contained in:
parent
78a5e21e4c
commit
e2d725633e
@ -39,10 +39,10 @@ Ext.define('PVE.form.ControllerSelector', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add to OSDefaults.js?
|
var vmDefaults = PVE.qemu.OSDefaults[vmconfig.ostype];
|
||||||
var sortPriority = (vmconfig.ostype && vmconfig.ostype == "l26") ?
|
|
||||||
{ scsi: 4 , virtio: 3, sata: 2, ide: 1 } :
|
var sortPriority = vmDefaults && vmDefaults.busPriority
|
||||||
{ ide: 4, sata: 3, scsi: 2, virtio: 1 };
|
? vmDefaults.busPriority : PVE.qemu.OSDefaults.generic;
|
||||||
|
|
||||||
var sortedList = Ext.clone(controllerList);
|
var sortedList = Ext.clone(controllerList);
|
||||||
sortedList.sort(function(a,b) {
|
sortedList.sort(function(a,b) {
|
||||||
|
@ -37,6 +37,12 @@ Ext.define('PVE.qemu.OSDefaults', {
|
|||||||
me.generic = {
|
me.generic = {
|
||||||
busType: 'ide',
|
busType: 'ide',
|
||||||
networkCard: 'e1000',
|
networkCard: 'e1000',
|
||||||
|
busPriority: {
|
||||||
|
ide: 4,
|
||||||
|
sata: 3,
|
||||||
|
scsi: 2,
|
||||||
|
virtio: 1
|
||||||
|
},
|
||||||
scsihw: 'virtio-scsi-pci'
|
scsihw: 'virtio-scsi-pci'
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -46,6 +52,12 @@ Ext.define('PVE.qemu.OSDefaults', {
|
|||||||
pveOS: 'l26',
|
pveOS: 'l26',
|
||||||
parent : 'generic',
|
parent : 'generic',
|
||||||
busType: 'scsi',
|
busType: 'scsi',
|
||||||
|
busPriority: {
|
||||||
|
scsi: 4,
|
||||||
|
virtio: 3,
|
||||||
|
sata: 2,
|
||||||
|
ide: 1
|
||||||
|
},
|
||||||
networkCard: 'virtio'
|
networkCard: 'virtio'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user