]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/qemu/OSDefaults.js
bump version to 4.3-3
[pve-manager.git] / www / manager6 / qemu / OSDefaults.js
CommitLineData
b70e9ef5
EK
1/*
2 * This class holds performance *recommended* settings for the PVE Qemu wizards
3 * the *mandatory* settings are set in the PVE::QemuServer
4 * config_to_command sub
5 * We store this here until we get the data from the API server
6*/
7
8// this is how you would add an hypothetic FreeBSD > 10 entry
9//
10//virtio-blk is stable but virtIO net still
11// problematic as of 10.3
12// see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165059
13// addOS({
14// parent: 'generic', // inherits defaults
15// pveOS: 'freebsd10', // must match a radiofield in OSTypeEdit.js
16// busType: 'virtio' // must match a pveBusController value
17// // networkCard muss match a pveNetworkCardSelector
18
19
20Ext.define('PVE.qemu.OSDefaults', {
21 singleton: true, // will also force creation when loaded
22
23 constructor: function() {
24 var me = this;
25
26 var addOS = function(settings) {
27 if (me.hasOwnProperty(settings.parent)) {
28 var child = Ext.clone(me[settings.parent]);
29 me[settings.pveOS] = Ext.apply(child, settings);
30
31 } else {
32 throw("Could not find your genitor");
33 }
34 };
35
36 // default values
37 me.generic = {
38 busType: 'ide',
eca87c69
EK
39 networkCard: 'e1000',
40 scsihw: 'virtio-scsi-pci'
b70e9ef5
EK
41 };
42
9daa22a6
EK
43 // virtio-net is in kernel since 2.6.25
44 // virtio-scsi since 3.2 but backported in RHEL with 2.6 kernel
b70e9ef5
EK
45 addOS({
46 pveOS: 'l26',
47 parent : 'generic',
9daa22a6 48 busType: 'scsi',
b70e9ef5
EK
49 networkCard: 'virtio'
50 });
51
52 // recommandation from http://wiki.qemu.org/Windows2000
53 addOS({
54 pveOS: 'w2k',
55 parent : 'generic',
2c0e2890
EK
56 networkCard: 'rtl8139',
57 scsihw: 'lsi'
58 });
59
60 addOS({
61 pveOS: 'wxp',
62 parent : 'generic',
63 scsihw: 'lsi'
b70e9ef5
EK
64 });
65
66 }
67});