Home Database Mysql Tutorial VirtualBox重要的配置文件和配置程序

VirtualBox重要的配置文件和配置程序

Jun 07, 2016 pm 04:10 PM
virtualbox I program Configuration Configuration file

之前我安装了VirtualBox 来跑 Linux 虚拟机, 开始设置的时候设了 4G 内存, 结果后来不能改了. 造成的结果就是一开机, 内存飙到40%, 一开VirtualBox, 直接飙到95%. 然后开个数据库开个EBS 服务, 基本就不用干其他事情了. 怎么修改VirtualBox 虚拟机的内存分配

之前我安装了VirtualBox 来跑 Linux 虚拟机, 开始设置的时候设了 4G 内存, 结果后来不能改了. 造成的结果就是一开机, 内存飙到40%, 一开VirtualBox, 直接飙到95%. 然后开个数据库开个EBS 服务, 基本就不用干其他事情了.

怎么修改VirtualBox 虚拟机的内存分配呢? 有一个实用程序可以直接修改:

 

cd C:\Program Files\VirtualBox
VBoxManage.exe modifyvm "EBS R12 RUP8" --memory "2048"
Copy after login

直接可以把内存分配调到 2G, 这样开着Linux 的内存开销就不会有那么大. 即使数据库 EBS 全开, 物理内存也只到70% 多;

那么这个程序修改了什么呢? 我们可以去看看下面两个配置文件;

1. 在User 目录下, 有个不可见目录 .VirtualBox, 里面有两个文件比较重要: VirtualBox.xml 和 VirtualBox.xml-prev. 后面一个是备份文件, 可以不用管他, 前面一个我们可以看看里面的内容:

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.12-windows">
  <Global>
    <ExtraData>
      <ExtraDataItem name="GUI/DetailsPageBoxes" value="generalClosed,previewClosed,system,displayClosed,storageClosed,audioClosed,networkClosed,usbClosed,sharedFoldersClosed,descriptionClosed,serialPortsClosed"/>
      <ExtraDataItem name="GUI/GroupDefinitions/" value="m=28233f89-d496-4c66-9d63-2f42f23f253a,m=34d9ffe0-5c7d-4eab-a87e-b2321e1babcb"/>
      <ExtraDataItem name="GUI/HostScreenSaverDisabled" value="false"/>
      <ExtraDataItem name="GUI/Input/AutoCapture" value="false"/>
      <ExtraDataItem name="GUI/Input/HostKeyCombination" value="163"/>
      <ExtraDataItem name="GUI/LastItemSelected" value="m=EBS R12 RUP8"/>
      <ExtraDataItem name="GUI/LastWindowPosition" value="654,228,770,550"/>
      <ExtraDataItem name="GUI/RecentFolderHD" value="E:/"/>
      <ExtraDataItem name="GUI/RecentListHD" value="E:\EBS R12 RUP8.vbox;E:\EBS R12 RUP8-disk1.vdi;E:\EBS_Linux_64.vdi;E:\Linux\Linux.vdi;"/>
      <ExtraDataItem name="GUI/SplitterSizes" value="231,533"/>
      <ExtraDataItem name="GUI/SuppressMessages" value=",remindAboutMouseIntegrationOff,remindAboutMouseIntegrationOn,remindAboutAutoCapture,showRuntimeError.warning.HostAudioNotResponding,showRuntimeError.warning.BrokenSharedFolder,confirmInputCapture,remindAboutMouseIntegration,warnAboutInaccessibleMedia"/>
      <ExtraDataItem name="GUI/TrayIcon/Enabled" value="false"/>
      <ExtraDataItem name="GUI/UpdateCheckCount" value="18"/>
      <ExtraDataItem name="GUI/UpdateDate" value="never"/>
      <ExtraDataItem name="HostOnly/VirtualBox Host-Only Ethernet Adapter/IPAddress" value="192.168.77.1"/>
      <ExtraDataItem name="HostOnly/VirtualBox Host-Only Ethernet Adapter/IPNetMask" value="255.255.255.0"/>
    </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{28233f89-d496-4c66-9d63-2f42f23f253a}" src="G:/VMs/EBS R12 RUP8/EBS R12 RUP8.vbox"/>
      <MachineEntry uuid="{34d9ffe0-5c7d-4eab-a87e-b2321e1babcb}" src="C:\Users\yuzzhang\VirtualBox VMs\ubuntu_server\ubuntu_server.vbox"/>
    </MachineRegistry>
    <MediaRegistry>
      <HardDisks/>
      <DVDImages/>
      <FloppyImages/>
    </MediaRegistry>
    <NetserviceRegistry>
      <DHCPServers>
        <DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.56.100" networkMask="255.255.255.0" lowerIP="192.168.56.101" upperIP="192.168.56.254" enabled="0"/>
      </DHCPServers>
    </NetserviceRegistry>
    <SystemProperties defaultMachineFolder="C:\Users\yuzzhang\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" exclusiveHwVirt="false"/>
    <USBDeviceFilters/>
  </Global>
</VirtualBox>
Copy after login

里面定义了两个虚拟机, 一个叫 "EBS R12 RUP8", 另一个叫"ubuntu_server". 并且指明了这两个虚拟机的配置文件位置, vdi 文件位置, ip 地址 等等; 这个是VirtualBox 的配置文件, 下面可以看看具体的虚拟机配置文件, 以 "EBS R12 RUP8" 为例, 上面指明了这个虚拟机的配置文件是
G:/VMs/EBS R12 RUP8/EBS R12 RUP8.vbox
Copy after login
我们就到这个目录下面去找, 可以看到两个文件, 一个是 .vbox 文件, 另一个是 .vbox-prev 文件. 同样后面的是备份文件不用管;

在这个配置文件里面

    <Hardware version="2">
      <CPU count="2" executionCap="90" hotplug="false">
        <HardwareVirtEx enabled="true"/>
        <HardwareVirtExNestedPaging enabled="true"/>
        <HardwareVirtExVPID enabled="true"/>
        <HardwareVirtExUX enabled="true"/>
        <PAE enabled="true"/>
        <HardwareVirtExLargePages enabled="true"/>
        <HardwareVirtForce enabled="false"/>
      </CPU>
      <Memory RAMSize="2048" PageFusion="false"/>
      <HID Pointing="PS2Mouse" Keyboard="PS2Keyboard"/>
      <HPET enabled="false"/>
      <Chipset type="PIIX3"/>
      <Boot>
        <Order position="1" device="Floppy"/>
        <Order position="2" device="DVD"/>
        <Order position="3" device="HardDisk"/>
        <Order position="4" device="None"/>
...
Copy after login

可以在这个地方看到 Memory RAMSize="2048" 的字样. 这就是最开始的 VBoxManage.exe 程序修改的地方.

 

也可以直接修改这个文件, 但是文件注释告诉我们不要手动修改. 所以还是老老实实用程序或者通过界面修改吧;

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to make Google Maps the default map in iPhone How to make Google Maps the default map in iPhone Apr 17, 2024 pm 07:34 PM

The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

The working principle and configuration method of GDM in Linux system The working principle and configuration method of GDM in Linux system Mar 01, 2024 pm 06:36 PM

Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

The perfect combination of PyCharm and PyTorch: detailed installation and configuration steps The perfect combination of PyCharm and PyTorch: detailed installation and configuration steps Feb 21, 2024 pm 12:00 PM

PyCharm is a powerful integrated development environment (IDE), and PyTorch is a popular open source framework in the field of deep learning. In the field of machine learning and deep learning, using PyCharm and PyTorch for development can greatly improve development efficiency and code quality. This article will introduce in detail how to install and configure PyTorch in PyCharm, and attach specific code examples to help readers better utilize the powerful functions of these two. Step 1: Install PyCharm and Python

Clock app missing in iPhone: How to fix it Clock app missing in iPhone: How to fix it May 03, 2024 pm 09:19 PM

Is the clock app missing from your phone? The date and time will still appear on your iPhone's status bar. However, without the Clock app, you won’t be able to use world clock, stopwatch, alarm clock, and many other features. Therefore, fixing missing clock app should be at the top of your to-do list. These solutions can help you resolve this issue. Fix 1 – Place the Clock App If you mistakenly removed the Clock app from your home screen, you can put the Clock app back in its place. Step 1 – Unlock your iPhone and start swiping to the left until you reach the App Library page. Step 2 – Next, search for “clock” in the search box. Step 3 – When you see “Clock” below in the search results, press and hold it and

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

Can't allow access to camera and microphone in iPhone Can't allow access to camera and microphone in iPhone Apr 23, 2024 am 11:13 AM

Are you getting "Unable to allow access to camera and microphone" when trying to use the app? Typically, you grant camera and microphone permissions to specific people on a need-to-provide basis. However, if you deny permission, the camera and microphone will not work and will display this error message instead. Solving this problem is very basic and you can do it in a minute or two. Fix 1 – Provide Camera, Microphone Permissions You can provide the necessary camera and microphone permissions directly in settings. Step 1 – Go to the Settings tab. Step 2 – Open the Privacy & Security panel. Step 3 – Turn on the “Camera” permission there. Step 4 – Inside, you will find a list of apps that have requested permission for your phone’s camera. Step 5 – Open the “Camera” of the specified app

MyBatis Generator configuration parameter interpretation and best practices MyBatis Generator configuration parameter interpretation and best practices Feb 23, 2024 am 09:51 AM

MyBatisGenerator is a code generation tool officially provided by MyBatis, which can help developers quickly generate JavaBeans, Mapper interfaces and XML mapping files that conform to the database table structure. In the process of using MyBatisGenerator for code generation, the setting of configuration parameters is crucial. This article will start from the perspective of configuration parameters and deeply explore the functions of MyBatisGenerator.

How to configure workgroup in win11 system How to configure workgroup in win11 system Feb 22, 2024 pm 09:50 PM

How to configure a workgroup in Win11 A workgroup is a way to connect multiple computers in a local area network, which allows files, printers, and other resources to be shared between computers. In Win11 system, configuring a workgroup is very simple, just follow the steps below. Step 1: Open the "Settings" application. First, click the "Start" button of the Win11 system, and then select the "Settings" application in the pop-up menu. You can also use the shortcut "Win+I" to open "Settings". Step 2: Select "System" In the Settings app, you will see multiple options. Please click the "System" option to enter the system settings page. Step 3: Select "About" In the "System" settings page, you will see multiple sub-options. Please click

See all articles