Oracle VM VirtualBox配置文件

简介:

Linux 虚拟机配置文件分为两处。

windows下:
1、用户名/.VirtualBox/
这里面有2个配置文件:
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="general,system,preview,display,storage,audio,network,usb,sharedFolders,description"/>
      <ExtraDataItem name="GUI/GroupDefinitions/" value="m=83d5321d-32f6-438b-b81c-3e336ccc1460,m=ef9627ae-2637-4f90-a9e9-1423fbdccbd1"/>
      <ExtraDataItem name="GUI/HostScreenSaverDisabled" value="false"/>
      <ExtraDataItem name="GUI/Input/AutoCapture" value="true"/>
      <ExtraDataItem name="GUI/Input/HostKeyCombination" value="163"/>
      <ExtraDataItem name="GUI/LastItemSelected" value="m=xp"/>
      <ExtraDataItem name="GUI/LastWindowPosition" value="298,89,770,550"/>
      <ExtraDataItem name="GUI/SplitterSizes" value="192,573"/>
      <ExtraDataItem name="GUI/SuppressMessages" value="confirmInputCapture"/>
    </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{ef9627ae-2637-4f90-a9e9-1423fbdccbd1}" src="D:\VirtualBox VMs\xp\xp.vbox"/>
      <MachineEntry uuid="{55a1a18a-0cb6-4238-bcdb-2df5d647e255}" src="D:\VirtualBox VMs\centos\centos.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="1"/>
      </DHCPServers>
    </NetserviceRegistry>
    <SystemProperties defaultMachineFolder="D:\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" exclusiveHwVirt="false"/>
    <USBDeviceFilters/>
  </Global>
</VirtualBox>

注意此处定义虚拟机文件uuid及所在位置:

<MachineRegistry>
  <MachineEntry uuid="{ef9627ae-2637-4f90-a9e9-1423fbdccbd1}" src="D:\VirtualBox VMs\xp\xp.vbox"/>
  <MachineEntry uuid="{55a1a18a-0cb6-4238-bcdb-2df5d647e255}" src="D:\VirtualBox VMs\centos\centos.vbox"/>
</MachineRegistry>

其中uuid来自于src对应文件.vbox里面的:

<Machine uuid="{55a1a18a-0cb6-4238-bcdb-2df5d647e255}" name="centos" OSType="RedHat" snapshotFolder="Snapshots" lastStateChange="2015-12-02T14:16:08Z">

如果不小心重新重新安装VirtualBox或者删除了VirtualBox的配置文件,只要虚拟机没有删除(如.vbox、.vdi文件),可以 重新安装虚拟机后仿照MachineRegistry里MachineEntry添加一行。注意uuid不错,必须和.vbox里的一致。

2、虚拟机目录里的.vbox文件
这是个文本文件,可以直接编辑。例如:

<?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.15-windows">
  <Machine uuid="{55a1a18a-0cb6-4238-bcdb-2df5d647e255}" name="centos" OSType="RedHat" snapshotFolder="Snapshots" lastStateChange="2015-12-02T14:16:08Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{e1e7ffe5-9b7c-4c94-932f-72b4810a274f}" location="centos-disk2_1.vmdk" format="VMDK" type="Normal"/>
        <HardDisk uuid="{b914d8b0-b772-427b-a840-cadc1cf0391a}" location="data.vdi" format="VDI" type="Normal"/>
      </HardDisks>
      <DVDImages/>
      <FloppyImages/>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
      <ExtraDataItem name="GUI/LastGuestSizeHint" value="720,400"/>
      <ExtraDataItem name="GUI/LastNormalWindowPosition" value="8,30,720,445"/>
      <ExtraDataItem name="GUI/RestrictedRuntimeDevicesMenuActions" value="HardDrives"/>
      <ExtraDataItem name="GUI/RestrictedRuntimeMachineMenuActions" value="SaveState,PowerOff"/>
      <ExtraDataItem name="GUI/StatusBar/IndicatorOrder" value="HardDisks,OpticalDisks,FloppyDisks,Network,USB,SharedFolders,Display,VideoCapture,Features,Mouse,Keyboard"/>
    </ExtraData>
    <Hardware version="2">
      <CPU count="1" 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="512" PageFusion="false"/>
      <HID Pointing="PS2Mouse" Keyboard="PS2Keyboard"/>
      <HPET enabled="false"/>
      <Chipset type="PIIX3"/>
      <Boot>
        <Order position="1" device="HardDisk"/>
        <Order position="2" device="DVD"/>
        <Order position="3" device="None"/>
        <Order position="4" device="None"/>
      </Boot>
      <Display VRAMSize="12" monitorCount="1" accelerate3D="false" accelerate2DVideo="false"/>
      <VideoCapture enabled="false" screens="18446744073709551615" horzRes="1024" vertRes="768" rate="512" fps="25" maxTime="0" maxSize="0"/>
      <RemoteDisplay enabled="false" authType="Null" authTimeout="5000"/>
      <BIOS>
        <ACPI enabled="true"/>
        <IOAPIC enabled="false"/>
        <Logo fadeIn="true" fadeOut="true" displayTime="0"/>
        <BootMenu mode="MessageAndMenu"/>
        <TimeOffset value="0"/>
        <PXEDebug enabled="false"/>
      </BIOS>
      <USB>
        <Controllers>
          <Controller name="OHCI" type="OHCI"/>
          <Controller name="EHCI" type="EHCI"/>
        </Controllers>
        <DeviceFilters/>
      </USB>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027F9C460" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <NAT>
            <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
            <Alias logging="false" proxy-only="false" use-same-ports="false"/>
          </NAT>
        </Adapter>
        <Adapter slot="1" enabled="true" MACAddress="080027597536" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="Microsoft Loopback Adapter"/>
        </Adapter>
        <Adapter slot="2" enabled="true" MACAddress="080027E33818" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="Broadcom 802.11n &#x7F51;&#x7EDC;&#x9002;&#x914D;&#x5668;"/>
        </Adapter>
        <Adapter slot="3" enabled="false" MACAddress="08002724B024" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="4" enabled="false" MACAddress="0800275ACDE2" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="5" enabled="false" MACAddress="080027715437" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="6" enabled="false" MACAddress="08002733EDEE" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="7" enabled="false" MACAddress="080027B318D4" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
      </Network>
      <UART>
        <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
        <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
      </UART>
      <LPT>
        <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
      </LPT>
      <AudioAdapter controller="AC97" driver="DirectSound" enabled="true"/>
      <RTC localOrUTC="UTC"/>
      <SharedFolders/>
      <Clipboard mode="Disabled"/>
      <DragAndDrop mode="Disabled"/>
      <IO>
        <IoCache enabled="true" size="5"/>
        <BandwidthGroups/>
      </IO>
      <HostPci>
        <Devices/>
      </HostPci>
      <EmulatedUSB>
        <CardReader enabled="false"/>
      </EmulatedUSB>
      <Guest memoryBalloonSize="0"/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="zh_CN" timestamp="1449065768536626000" flags=""/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
      </StorageController>
      <StorageController name="SATA" type="AHCI" PortCount="2" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" hotpluggable="true" port="0" device="0">
          <Image uuid="{e1e7ffe5-9b7c-4c94-932f-72b4810a274f}"/>
        </AttachedDevice>
        <AttachedDevice type="HardDisk" hotpluggable="false" port="1" device="0">
          <Image uuid="{b914d8b0-b772-427b-a840-cadc1cf0391a}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>

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

目录
相关文章
|
2月前
|
存储 Oracle 关系型数据库
|
3月前
|
Ubuntu Oracle 关系型数据库
Oracle VM VirtualBox之Ubuntu 22.04LTS双网卡网络模式配置
这篇文章是关于如何在Oracle VM VirtualBox中配置Ubuntu 22.04LTS虚拟机双网卡网络模式的详细指南,包括VirtualBox网络概述、双网卡网络模式的配置步骤以及Ubuntu系统网络配置。
317 3
|
Oracle 关系型数据库 Linux
oracle学习82-VMware出现配置文件 .vmx 是由VMware产品创建,但该产品与此版 VMware workstation 不兼容,因此无法使用(VMware版本不兼容问题)
oracle学习82-VMware出现配置文件 .vmx 是由VMware产品创建,但该产品与此版 VMware workstation 不兼容,因此无法使用(VMware版本不兼容问题)
664 0
oracle学习82-VMware出现配置文件 .vmx 是由VMware产品创建,但该产品与此版 VMware workstation 不兼容,因此无法使用(VMware版本不兼容问题)
|
Oracle 关系型数据库 MySQL
|
SQL Oracle 安全
Virtualbox安装Oracle 19c 升级到19.8(Oracle Restart和数据库)完整步骤
这个文档是来自鼎甲科技的姚远工作中整理的,在Virtualbox上安装Oracle 19.3 再升级到19.8(Oracle Restart和数据库)完整步骤,包括:配置系统环境,安装grid,oracle,建库,补丁下载升级等全过程。
744 0
|
Oracle 关系型数据库 数据安全/隐私保护
|
编解码 Oracle 关系型数据库
安装增强功能失败:Could not mount the media/drive C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso
安装增强功能失败:Could not mount the media/drive C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso
431 0
安装增强功能失败:Could not mount the media/drive C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso
|
SQL Oracle 网络协议
Oracle的网络三大配置文件sqlnet.ora、tnsnames.ora、listener.ora
Oracle的网络三大配置文件sqlnet.ora、tnsnames.ora、listener.ora
796 0
|
Oracle 关系型数据库 数据库
oracle学习32-plsql版本低需到配置文件中添加配置
oracle学习32-plsql版本低需到配置文件中添加配置
92 0
oracle学习32-plsql版本低需到配置文件中添加配置
|
Oracle 关系型数据库 Linux
Linux下oracle数据库spfile参数配置文件丢失问题解决,“ORA-32001: write to SPFILE requested but no SPFILE is in use“问题处理
Linux下oracle数据库spfile参数配置文件丢失问题解决,“ORA-32001: write to SPFILE requested but no SPFILE is in use“问题处理
910 0
Linux下oracle数据库spfile参数配置文件丢失问题解决,“ORA-32001: write to SPFILE requested but no SPFILE is in use“问题处理

推荐镜像

更多