Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <!--
  2. VM System Settings
  3. Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
  4. $Id: settingsSystem.html 597 2015-04-20 11:41:28Z imoore76 $
  5. -->
  6. <ul>
  7. <li><a href="#vboxSettingsTabSystemMotherboard"><span class='translate'>Motherboard</span></a></li>
  8. <li><a href="#vboxSettingsTabSystemProcessor"><span class='translate'>Processor</span></a></li>
  9. <li><a href="#vboxSettingsTabSystemAcceleration"><span class='translate'>Acceleration</span></a></li>
  10. </ul>
  11. <!-- Motherboard Tab -->
  12. <div id='vboxSettingsTabSystemMotherboard' title='Motherboard'>
  13. <table style='width: 100%'>
  14. <tr>
  15. <th style='text-align:right'><span class='translate'>Base Memory:</span></th>
  16. <td style='width: 100%; white-space: nowrap'>
  17. <table style='width: 100%'>
  18. <tr>
  19. <td style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  20. <div style='margin-top: 4px' id='vboxSettingsSystemMemory' class='slider'><div class='sliderScale'></div></div>
  21. </td>
  22. <td><input type='text' class='vboxText sliderValue' name='vboxSettingsSystemMemoryValue' size='5' /> <span class='translate'>MB</span></td>
  23. </tr>
  24. <tr style='vertical-align: top;'>
  25. <td style='border: 0px; margin: 0px; padding: 0px;'>
  26. <table style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  27. <tr style='vertical-align: top'>
  28. <td style='text-align: left;'><span class='vboxSliderMin'>%1 MB</span></td>
  29. <td style='text-align: right;'><span class='vboxSliderMax'>%1 MB</span></td>
  30. </tr>
  31. </table>
  32. </td>
  33. <td></td>
  34. </tr>
  35. </table>
  36. </td>
  37. </tr>
  38. <tr class='vboxSettingsSystemAdvancedOnly'>
  39. <th></th>
  40. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemPageFusion' /> <span class='translate'>Enable Page Fusion</span></label></td>
  41. </tr>
  42. <tr style='vertical-align: top'>
  43. <th style='text-align:right'><span class='translate'>Boot Order:</span></th>
  44. <td>
  45. <table id='vboxVMBootOrder'>
  46. <tr style='vertical-align: top'>
  47. <td style='width: auto'>
  48. <ul class='vboxList vboxHover vboxBordered' id='vboxVMBootOrderList' style='margin: 0px; padding: 2px; white-space: nowrap; width: 200px'>
  49. <li id='HardDisk'><input type='checkbox' class='vboxCheckbox' name='vboxSettingsBootHardDisk' /> <img src="images/vbox/hd_16px.png" /> <span class='vboxBootOrderDevice'>HardDisk</span></li>
  50. <li id='DVD'><input type='checkbox' class='vboxCheckbox' name='vboxSettingsBootDVD' /> <img src="images/vbox/cd_16px.png" /> <span class='vboxBootOrderDevice'>DVD</span></li>
  51. <li id='Floppy'><input type='checkbox' class='vboxCheckbox' name='vboxSettingsBootFloppy' /> <img src="images/vbox/fd_16px.png" /> <span class='vboxBootOrderDevice'>Floppy</span></li>
  52. <li id='Network'><input type='checkbox' class='vboxCheckbox' name='vboxSettingsBootNetwork' /> <img src="images/vbox/nw_16px.png" /> <span class='vboxBootOrderDevice'>Network</span></li>
  53. </ul>
  54. </td>
  55. <td style='text-align: left; width: 100%'>
  56. <input disabled='disabled' class="imgMvUp vboxImgButton" style='background: url(images/vbox/list_moveup_disabled_16px.png) 1px 1px no-repeat; width: 18px; height: 18px; vertical-align:bottom' type="button" value="" />
  57. <br />
  58. <input disabled='disabled' class="imgMvDn vboxImgButton" style='background: url(images/vbox/list_movedown_disabled_16px.png) 1px 1px no-repeat; width: 18px; height: 18px; vertical-align:bottom' type="button" value="" />
  59. </td>
  60. </tr>
  61. </table>
  62. </td>
  63. </tr>
  64. <tr id='vboxSettingsSystemChipsetRow'>
  65. <th style='text-align:right'><span class='translate'>Chipset:</span></th>
  66. <td><select name='vboxSettingsSystemChipset'>
  67. <option value='PIIX3'>PIIX3</option>
  68. <option value='ICH9'>ICH9</option>
  69. </select>
  70. </td>
  71. </tr>
  72. <tr>
  73. <th style='text-align:right'><span class='translate'>Extended Features:</span></th>
  74. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemIOAPIC' /> <span class='translate'>Enable I/O APIC</span></label></td>
  75. </tr>
  76. <tr>
  77. <th></th>
  78. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemEFI' /> <span class='translate'>Enable EFI (special OSes only)</span></label></td>
  79. </tr>
  80. <tr>
  81. <th></th>
  82. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemRTCUseUTC' /> <span class='translate'>Hardware Clock in UTC Time</span></label></td>
  83. </tr>
  84. <tr class='vboxSettingsSystemAdvancedOnly'>
  85. <th></th>
  86. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemDisableHostTimeSync' /> <span class='translate'>Disable host time sync</span></label></td>
  87. </tr>
  88. <tr class='vboxSettingsSystemAdvancedOnly'>
  89. <th></th>
  90. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemHPET' /> <span class='translate'>HPET (high precision event timer)</span></label></td>
  91. </tr>
  92. </table>
  93. </div>
  94. <!-- Processor Tab -->
  95. <div id='vboxSettingsTabSystemProcessor' title='Processors'>
  96. <table style='width: 100%'>
  97. <tr>
  98. <th style='text-align:right'><span class='translate'>Processor(s):</span></th>
  99. <td style='width: 100%; white-space: nowrap'>
  100. <table style='width: 100%'>
  101. <tr>
  102. <td style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  103. <div style='margin-top: 4px' id='vboxSettingsSystemProcessor' class='slider'><div class='sliderScale'></div></div>
  104. </td>
  105. <td><input type='text' class='vboxText' name='vboxSettingsSystemProcessorValue' size='2' class='sliderValue' /></td>
  106. </tr>
  107. <tr style='vertical-align: top;'>
  108. <td style='border: 0px; margin: 0px; padding: 0px;'>
  109. <table style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  110. <tr style='vertical-align: top'>
  111. <td style='text-align: left;'><span class='vboxSliderMin'>%1 CPU</span></td>
  112. <td style='text-align: right;'><span class='vboxSliderMax'>%1 CPUs</span></td>
  113. </tr>
  114. </table>
  115. </td>
  116. <td></td>
  117. </tr>
  118. </table>
  119. </td>
  120. </tr>
  121. <tr class='vboxRunningEnabled'>
  122. <th style='text-align:right'><span class='translate'>Execution Cap:</span></th>
  123. <td style='width: 100%; white-space: nowrap'>
  124. <table style='width: 100%'>
  125. <tr class='vboxRunningEnabled'>
  126. <td style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  127. <div style='margin-top: 4px' id='vboxSettingsSystemProcessorCap' class='slider'><div class='sliderScale'></div></div>
  128. </td>
  129. <td><input type='text' class='vboxText vboxRunningEnabled' name='vboxSettingsSystemProcessorCapValue' size='3' class='sliderValue' /></td>
  130. </tr>
  131. <tr style='vertical-align: top;' class='vboxRunningEnabled'>
  132. <td style='border: 0px; margin: 0px; padding: 0px;'>
  133. <table style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  134. <tr style='vertical-align: top' class='vboxRunningEnabled'>
  135. <td style='text-align: left;'><span class='vboxSliderMin' title='Min CPU execution cap in %'>%1%</span></td>
  136. <td style='text-align: right;'><span class='vboxSliderMax' title='Max CPU execution cap in %'>%1%</span></td>
  137. </tr>
  138. </table>
  139. </td>
  140. <td></td>
  141. </tr>
  142. </table>
  143. </td>
  144. </tr>
  145. <tr id='vboxSettingsSystemPAERow'>
  146. <th><span class='translate'>Extended Features:</span></th>
  147. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsSystemPAE' /> <span class='translate'>Enable PAE/NX</span></label></td>
  148. </tr>
  149. </table>
  150. </div>
  151. <!-- Acceleration Tab -->
  152. <div id='vboxSettingsTabSystemAcceleration' title='Acceleration'>
  153. <table>
  154. <tr>
  155. <th class='vboxEnablerIgnore'><span class='translate'>Paravirtualization Interface:</span></th>
  156. <td><select name='vboxSettingsParavirtInterface' class='vboxEnablerIgnore'>
  157. <option value='None'>None</option>
  158. <option value='Default'>Default</option>
  159. <option value='Legacy'>Legacy</option>
  160. <option value='Minimal'>Minimal</option>
  161. <option value='HyperV'>HyperV</option>
  162. <option value='KVM'>KVM</option>
  163. </select></td>
  164. <tr>
  165. <th style='text-align:right' class='vboxEnablerIgnore vboxSettingsAccelRequired'><span class='translate'>Hardware Virtualization:</span></th>
  166. <td style='width:100%'><label><input type='checkbox' name='settingsSystemVT' class='vboxEnablerCheckbox vboxSettingsAccelRequired'/>
  167. <span class='translate vboxSettingsAccelRequired'>Enable VT-x/AMD-V</span></label></td>
  168. </tr>
  169. <tr>
  170. <th></th>
  171. <td><label><input type='checkbox' name='settingsSystemPaging' class='vboxEnablerListen' /> <span class='translate vboxEnablerListen'>Enable Nested Paging</span></label></td>
  172. </tr>
  173. <tr class='vboxSettingsSystemAdvancedOnly'>
  174. <th></th>
  175. <td><label><input type='checkbox' name='settingsSystemLargePages' class='vboxEnablerListen'/> <span class='translate vboxEnablerListen'>Enable Large Pages</span></label></td>
  176. </tr>
  177. <tr class='vboxSettingsSystemAdvancedOnly'>
  178. <th></th>
  179. <td><label><input type='checkbox' name='settingsSystemUnrestrictedExecution' class='vboxEnablerListen'/> <span class='translate vboxEnablerListen'>Enable VT-x unrestricted execution</span></label></td>
  180. </tr>
  181. <tr class='vboxSettingsSystemAdvancedOnly'>
  182. <th></th>
  183. <td><label><input type='checkbox' name='settingsSystemVPID' class='vboxEnablerListen'/> <span class='translate vboxEnablerListen'>Enable VT-x VPID (Intel only)</span></label></td>
  184. </tr>
  185. </table>
  186. </div>
  187. <script type='text/javascript'>
  188. /* Boot order devices */
  189. $('#vboxVMBootOrder').find("span.vboxBootOrderDevice").html(function(i,h){return trans(vboxDevice(h),'VBoxGlobal');});
  190. /* Chipsets */
  191. $('#vboxSettingsSystemChipsetRow').find('option').html(function(i,h){return trans(h,'VBoxGlobal');});
  192. /* Paravirtualization providers */
  193. $(document.forms['frmVboxSettings'].vboxSettingsParavirtInterface).find('option').html(function(i,h){return trans(h,'VBoxGlobal', 'ParavirtProvider');});
  194. $('#vboxSettingsSystemMemory').data('form','frmVboxSettings');
  195. $('#vboxSettingsSystemProcessor').data('form','frmVboxSettings');
  196. $('#vboxSettingsSystemProcessorCap').data('form','frmVboxSettings');
  197. $('#vboxSettingsSystemMemory').slider({'min':parseInt($('#vboxPane').data('vboxSystemProperties').minGuestRAM),'max':parseInt($('#vboxSettingsDialog').data('vboxHostDetails').memorySize)});
  198. $('#vboxSettingsSystemProcessor').slider({'min':1,'max':$('#vboxSettingsDialog').data('vboxHostDetails').cpus.length});
  199. $('#vboxSettingsSystemProcessorCap').slider({'min':1,'max':100});
  200. /* Disable PAE if it is unsupported */
  201. if(!$('#vboxSettingsDialog').data('vboxHostDetails').cpuFeatures.PAE) {
  202. $('#vboxSettingsSystemPAERow span').addClass('disabled');
  203. document.forms['frmVboxSettings'].vboxSettingsSystemPAE.checked = false;
  204. document.forms['frmVboxSettings'].vboxSettingsSystemPAE.disabled = true;
  205. }
  206. /* Set CPUs to 1 and disable if host cpu does not support HWVirtEx */
  207. if(!$('#vboxSettingsDialog').data('vboxHostDetails').cpuFeatures.HWVirtEx) {
  208. var pt = $('#vboxSettingsSystemProcessor').slider('value',1).slider('disable').closest('table');
  209. pt.find('span').addClass('disabled');
  210. pt.find('input').prop('disabled',true);
  211. }
  212. /** @def VBOX_WITH_PAGE_SHARING
  213. * Enables the page sharing code.
  214. * @remarks This must match GMMR0Init; currently we only support page fusion on
  215. * all 64-bit hosts except Mac OS X */
  216. if(!$('#vboxSettingsDialog').data('vboxHostDetails').cpuFeatures['Long Mode (64-bit)'] || $('#vboxSettingsDialog').data('vboxHostDetails').operatingSystem.toLowerCase().search("darwin") >-1) {
  217. $(document.forms['frmVboxSettings'].vboxSettingsSystemPageFusion).prop({'checked':false,'disabled':true}).siblings().addClass('disabled');
  218. }
  219. /*
  220. *
  221. * Ordered lists (Boot order)
  222. *
  223. */
  224. $("#vboxVMBootOrder").find("input.imgMvUp").click(function() {
  225. var list = $('#vboxVMBootOrderList').children('li');
  226. for(var i = 0; i < list.length; i++ ) {
  227. if(list[i].className == 'vboxListItemSelected') {
  228. if(i == 0) return;
  229. var mv = $(list[i]).detach();
  230. $(list[(i-1)]).before(mv);
  231. i = list.length;
  232. mv.click();
  233. }
  234. }
  235. });
  236. $("#vboxVMBootOrder").find("input.imgMvDn").click(function() {
  237. var list = $('#vboxVMBootOrderList').children('li');
  238. for(var i = 0; i < list.length; i++ ) {
  239. if(list[i].className == 'vboxListItemSelected') {
  240. if(i == (list.length - 1)) return;
  241. var mv = $(list[i]).detach();
  242. $(list[(i+1)]).after(mv);
  243. i = list.length;
  244. mv.click();
  245. }
  246. }
  247. });
  248. // Preload up / down images
  249. var a = new Image();
  250. a.src = "images/vbox/list_movedown_16px.png";
  251. var b = new Image();
  252. b.src = "images/vbox/list_moveup_16px.png";
  253. /* Update values when data is loaded */
  254. $('#vboxSettingsDialog').on('dataLoaded',function(){
  255. /* System Default values from VM*/
  256. $('#vboxSettingsSystemMemory').slider('value', parseInt($('#vboxSettingsDialog').data('vboxMachineData').memorySize));
  257. document.forms['frmVboxSettings'].vboxSettingsSystemIOAPIC.checked = $('#vboxSettingsDialog').data('vboxMachineData').BIOSSettings.IOAPICEnabled;
  258. document.forms['frmVboxSettings'].vboxSettingsSystemEFI.checked = ($('#vboxSettingsDialog').data('vboxMachineData').firmwareType == 'EFI');
  259. document.forms['frmVboxSettings'].vboxSettingsSystemRTCUseUTC.checked = ($('#vboxSettingsDialog').data('vboxMachineData').RTCUseUTC);
  260. $('#vboxSettingsSystemProcessor').slider('value',parseInt($('#vboxSettingsDialog').data('vboxMachineData').CPUCount));
  261. $('#vboxSettingsSystemProcessorCap').slider('value',parseInt($('#vboxSettingsDialog').data('vboxMachineData').CPUExecutionCap));
  262. document.forms['frmVboxSettings'].vboxSettingsSystemPAE.checked = ($('#vboxSettingsDialog').data('vboxMachineData').CpuProperties.PAE);
  263. document.forms['frmVboxSettings'].settingsSystemVT.checked = ($('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled);
  264. document.forms['frmVboxSettings'].settingsSystemPaging.checked = ($('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.NestedPaging);
  265. $(document.forms['frmVboxSettings'].vboxSettingsParavirtInterface).val($('#vboxSettingsDialog').data('vboxMachineData').paravirtProvider);
  266. $(document.forms['frmVboxSettings'].settingsSystemVT).triggerHandler('click');
  267. /* Only if acceleration config is enabled */
  268. if($('#vboxPane').data('vboxConfig').enableAdvancedConfig) {
  269. document.forms['frmVboxSettings'].vboxSettingsSystemHPET.checked = ($('#vboxSettingsDialog').data('vboxMachineData').HPETEnabled);
  270. document.forms['frmVboxSettings'].vboxSettingsSystemDisableHostTimeSync.checked = ($('#vboxSettingsDialog').data('vboxMachineData').disableHostTimeSync);
  271. document.forms['frmVboxSettings'].settingsSystemLargePages.checked = ($('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.LargePages);
  272. document.forms['frmVboxSettings'].settingsSystemUnrestrictedExecution.checked = ($('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.UnrestrictedExecution);
  273. document.forms['frmVboxSettings'].settingsSystemVPID.checked = ($('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.VPID);
  274. document.forms['frmVboxSettings'].vboxSettingsSystemPageFusion.checked = ($('#vboxSettingsDialog').data('vboxMachineData').pageFusionEnabled);
  275. $('#vboxSettingsTabSystemMotherboard').find('tr.vboxSettingsSystemAdvancedOnly').css('display','');
  276. $('#vboxSettingsTabSystemAcceleration').find('tr.vboxSettingsSystemAdvancedOnly').css('display','');
  277. /* Else, remove advanced settings */
  278. } else {
  279. $('#vboxSettingsTabSystemMotherboard').find('tr.vboxSettingsSystemAdvancedOnly').css('display','none');
  280. $('#vboxSettingsTabSystemAcceleration').find('tr.vboxSettingsSystemAdvancedOnly').css('display','none');
  281. }
  282. /* Boot Order */
  283. var bootItems = {};
  284. var bootList = $('#vboxVMBootOrderList');
  285. $(bootList).children('li').each(function(){
  286. bootItems[$(this).attr('id')] = $(this).detach();
  287. });
  288. for(var i in $('#vboxSettingsDialog').data('vboxMachineData').bootOrder) {
  289. if(!isNaN(i)) {
  290. $(bootList).append(bootItems[$('#vboxSettingsDialog').data('vboxMachineData').bootOrder[i]]);
  291. document.forms['frmVboxSettings'].elements['vboxSettingsBoot' + $('#vboxSettingsDialog').data('vboxMachineData').bootOrder[i]].checked = true;
  292. }
  293. delete bootItems[$('#vboxSettingsDialog').data('vboxMachineData').bootOrder[i]];
  294. }
  295. for(var i in bootItems) {
  296. if(typeof i == 'function') continue;
  297. $(bootList).append(bootItems[i]);
  298. delete bootItems[i];
  299. }
  300. $(bootList).children().hoverClass('vboxHover');
  301. /* Hide Chipset selection if we didn't get one, or VirtualBox version is 4.0.0 A safeguard */
  302. if(!$('#vboxSettingsDialog').data('vboxMachineData').chipsetType) {
  303. $('#vboxSettingsSystemChipsetRow').css('display','none');
  304. } else {
  305. $('#vboxSettingsSystemChipsetRow').css('display','');
  306. $(document.forms['frmVboxSettings'].vboxSettingsSystemChipset).val($('#vboxSettingsDialog').data('vboxMachineData').chipsetType);
  307. }
  308. // Full editing not enabled
  309. var p = $('#vboxSettingsTabSystemMotherboard').parent().children('div');
  310. var t = $('#vboxVMBootOrder');
  311. if(!$('#vboxSettingsDialog').data('vboxFullEdit')) {
  312. $(p).find('tr:not(.vboxRunningEnabled)').find('span').addClass('disabled');
  313. $(p).find('tr:not(.vboxRunningEnabled)').find('input,select,textarea').prop('disabled',true);
  314. $('#vboxSettingsSystemMemory').slider('disable');
  315. $('#vboxSettingsSystemProcessor').slider('disable');
  316. t.find('input.imgMvUp').css('background-image', 'url(images/vbox/list_moveup_disabled_16px.png)');
  317. t.find('input.imgMvDn').css('background-image', 'url(images/vbox/list_movedown_disabled_16px.png)');
  318. t.find('img').each(function(){
  319. $(this).prop('src',$(this).prop('src').replace('_16','_disabled_16'));
  320. });
  321. $("#vboxVMBootOrderList").children("li").unbind('click');
  322. } else {
  323. $(p).find('tr:not(.vboxRunningEnabled)').find('span').removeClass('disabled');
  324. $(p).find('tr:not(.vboxRunningEnabled)').find('input,select,textarea').prop('disabled',false);
  325. $('#vboxSettingsSystemMemory').slider('enable');
  326. $('#vboxSettingsSystemProcessor').slider('enable');
  327. t.find('input.imgMvUp').css('background-image', 'url(images/vbox/list_moveup_16px.png)');
  328. t.find('input.imgMvDn').css('background-image', 'url(images/vbox/list_movedown_16px.png)');
  329. t.find('img').each(function(){
  330. $(this).prop('src',$(this).prop('src').replace('_disabled_16','_16'));
  331. });
  332. $("#vboxVMBootOrderList").children("li").click(function() {
  333. // Update class
  334. $(this).siblings().prop('className','vboxListItem');
  335. $(this).prop('className','vboxListItemSelected');
  336. var isFirst = ($(this).parent().children().first().attr('id') == $(this).attr('id'));
  337. var isLast = ($(this).parent().children().last().attr('id') == $(this).attr('id'));
  338. // update buttons
  339. $(this).closest("table").find('input.imgMvUp').css('background-image', 'url(images/vbox/list_moveup' + (isFirst ? '_disabled' : '') + '_16px.png)').prop('disabled', isFirst);
  340. $(this).closest("table").find('input.imgMvDn').css('background-image', 'url(images/vbox/list_movedown' + (isLast ? '_disabled' : '') + '_16px.png)').prop('disabled', isLast);
  341. }).first().trigger('click');
  342. }
  343. });
  344. /* Disable non-editable items when VM is running */
  345. $('#vboxSettingsDialog').one('show',function(){
  346. // Are virtualExtensions supported by the cpu?
  347. if(!$('#vboxSettingsDialog').data('vboxHostDetails').cpuFeatures.HWVirtEx && !$('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled) {
  348. $('#vboxSettingsTabSystemAcceleration').find('input.vboxSettingsAccelRequired').prop('disabled', true);
  349. $('#vboxSettingsTabSystemAcceleration').find('.vboxSettingsAccelRequired').addClass('vboxDisabled');
  350. }
  351. });
  352. /* Change general settings onSave() */
  353. $('#vboxSettingsDialog').on('save',function(){
  354. $('#vboxSettingsDialog').data('vboxMachineData').memorySize = parseInt(document.forms['frmVboxSettings'].vboxSettingsSystemMemoryValue.value);
  355. $('#vboxSettingsDialog').data('vboxMachineData').BIOSSettings.IOAPICEnabled = document.forms['frmVboxSettings'].vboxSettingsSystemIOAPIC.checked;
  356. $('#vboxSettingsDialog').data('vboxMachineData').firmwareType = (document.forms['frmVboxSettings'].vboxSettingsSystemEFI.checked ? 'EFI' : 'BIOS');
  357. $('#vboxSettingsDialog').data('vboxMachineData').CPUCount = parseInt($('#vboxSettingsSystemProcessor').slider('value'));
  358. $('#vboxSettingsDialog').data('vboxMachineData').CPUExecutionCap = parseInt($('#vboxSettingsSystemProcessorCap').slider('value'));
  359. $('#vboxSettingsDialog').data('vboxMachineData').CpuProperties.PAE = document.forms['frmVboxSettings'].vboxSettingsSystemPAE.checked;
  360. $('#vboxSettingsDialog').data('vboxMachineData').RTCUseUTC = document.forms['frmVboxSettings'].vboxSettingsSystemRTCUseUTC.checked;
  361. /* Only if we had a chipset */
  362. if($('#vboxSettingsDialog').data('vboxMachineData').chipsetType)
  363. $('#vboxSettingsDialog').data('vboxMachineData').chipsetType = $(document.forms['frmVboxSettings'].vboxSettingsSystemChipset).val();
  364. if($('#vboxSettingsDialog').data('vboxHostDetails').cpuFeatures.HWVirtEx || $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled || $('#vboxPane').data('vboxConfig').enableAdvancedConfig) {
  365. $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled = document.forms['frmVboxSettings'].settingsSystemVT.checked;
  366. $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.NestedPaging = $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled && document.forms['frmVboxSettings'].settingsSystemPaging.checked;
  367. }
  368. $('#vboxSettingsDialog').data('vboxMachineData').paravirtProvider = $(document.forms['frmVboxSettings'].vboxSettingsParavirtInterface).val();
  369. /* Only if advanced config is enabled */
  370. if($('#vboxPane').data('vboxConfig').enableAdvancedConfig) {
  371. $('#vboxSettingsDialog').data('vboxMachineData').pageFusionEnabled = document.forms['frmVboxSettings'].vboxSettingsSystemPageFusion.checked;
  372. $('#vboxSettingsDialog').data('vboxMachineData').HPETEnabled = document.forms['frmVboxSettings'].vboxSettingsSystemHPET.checked;
  373. $('#vboxSettingsDialog').data('vboxMachineData').disableHostTimeSync = document.forms['frmVboxSettings'].vboxSettingsSystemDisableHostTimeSync.checked;
  374. $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.LargePages = document.forms['frmVboxSettings'].settingsSystemLargePages.checked;
  375. $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.UnrestrictedExecution = ($('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled && document.forms['frmVboxSettings'].settingsSystemUnrestrictedExecution.checked ? true : false);
  376. $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.VPID = $('#vboxSettingsDialog').data('vboxMachineData').HWVirtExProperties.Enabled && document.forms['frmVboxSettings'].settingsSystemVPID.checked;
  377. }
  378. // Boot order
  379. $('#vboxSettingsDialog').data('vboxMachineData').bootOrder = new Array();
  380. $('#vboxVMBootOrderList').find('input').each(function(){
  381. if(!$(this).prop('checked')) return;
  382. $('#vboxSettingsDialog').data('vboxMachineData').bootOrder[$('#vboxSettingsDialog').data('vboxMachineData').bootOrder.length] = $(this).attr('name').substring(16);
  383. });
  384. });
  385. </script>