非常突然,打开VirtualBox时,发现工具栏里面之前创建的虚拟机都不见了,自己又没有删,咋回事呢,有些慌,之前的撸力全没有了👿。。。之前有关注过存储文件路径,去找了一下发现*.vdi和*.vbox文件都在啊,网上找了一些资料说是从工具栏“控制”->“注册”里面找回。
网上资源说是用户文件损坏,目录在C:\Users\wenchun001\.VirtualBox\VirtualBox.xml
里面虚拟主机配置节点。。。一个都没有了(⊙o⊙)…
<?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.virtualbox.org/" version="1.12-windows">
<Global>
<ExtraData>
<ExtraDataItem name="GUI/Details/Elements" value="general,system,preview,display,storage,audio,network,usb,sharedFolders,description"/>
<ExtraDataItem name="GUI/GroupDefinitions/" value="go=新编组,m=61b58edd-205f-4492-aa0d-5291253372da,m=020a802f-0bc3-431f-a1bc-e7924ef32c38"/>
<ExtraDataItem name="GUI/LastItemSelected" value="m=centos7 192.168.0.10(bigdata)"/>
<ExtraDataItem name="GUI/LastWindowPosition" value="-9,-9,1920,1011,max"/>
<ExtraDataItem name="GUI/RecentFolderCD" value="迅雷下载"/>
<ExtraDataItem name="GUI/RecentFolderHD" value="VMData/bigdata/新编组/CentOS-10"/>
<ExtraDataItem name="GUI/RecentListCD" value="迅雷下载\CentOS-7-x86_64-Minimal-2207-02.iso"/>
<ExtraDataItem name="GUI/RecentListHD" value="VMData\bigdata\新编组\CentOS-10\CentOS-10.vdi,Users\wenchun001\.VirtualBox\VirtualBox.xml"/>
<ExtraDataItem name="GUI/SplitterSizes" value="447,1472"/>
<ExtraDataItem name="GUI/Tools/LastItemsSelected" value="Welcome,Details"/>
</ExtraData>
<MachineRegistry>
....虚拟主机配置节点。。。一个都没有了(⊙o⊙)…
</MachineRegistry>
<NetserviceRegistry>
<DHCPServers>
<DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.0.10" networkMask="255.255.255.0" lowerIP="192.168.0.10" upperIP="192.168.0.254" enabled="1"/>
</DHCPServers>
</NetserviceRegistry>
<SystemProperties defaultMachineFolder="C:\Users\wenchun001\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" proxyMode="0" exclusiveHwVirt="false"/>
<USBDeviceFilters/>
</Global>
</VirtualBox>
第一种方式
先找到工具栏菜单
查找之前的主机vbox文件
选择.vbox文件打开
第二种方式
重新建主机
跟之前的一样,这里步骤略过。。。
配置存储->控制器:SATA
删除默认的vdi,选择之前需要恢复的vdi文件。
配置网络
跟之前的一样,这里步骤略过。。。
启动主机
这时网络IP和之前一样只是不过多了一组文件。
配置完后
.VirtualBox\VirtualBox.xml文件有数据了
看来是有软件破坏了这个文件,可恶啊
<?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.virtualbox.org/" version="1.12-windows">
<Global>
<ExtraData>
<ExtraDataItem name="GUI/Details/Elements" value="general,system,preview,display,storage,audio,network,usb,sharedFolders,description"/>
<ExtraDataItem name="GUI/GroupDefinitions/" value="go=新编组,m=61b58edd-205f-4492-aa0d-5291253372da,m=020a802f-0bc3-431f-a1bc-e7924ef32c38"/>
<ExtraDataItem name="GUI/LastItemSelected" value="m=centos7 192.168.0.10(bigdata)"/>
<ExtraDataItem name="GUI/LastWindowPosition" value="-9,-9,1920,1011,max"/>
<ExtraDataItem name="GUI/RecentFolderCD" value="迅雷下载"/>
<ExtraDataItem name="GUI/RecentFolderHD" value="VMData/bigdata/新编组/CentOS-10"/>
<ExtraDataItem name="GUI/RecentListCD" value="迅雷下载\CentOS-7-x86_64-Minimal-2207-02.iso"/>
<ExtraDataItem name="GUI/RecentListHD" value="VMData\bigdata\新编组\CentOS-10\CentOS-10.vdi,Users\wenchun001\.VirtualBox\VirtualBox.xml"/>
<ExtraDataItem name="GUI/SplitterSizes" value="447,1472"/>
<ExtraDataItem name="GUI/Tools/LastItemsSelected" value="Welcome,Details"/>
</ExtraData>
<MachineRegistry>
<MachineEntry uuid="{00000000-0000-0000-0000-000000000000}" src="C:/Users/wenchun001/.VirtualBox/VirtualBox.xml"/>
<MachineEntry uuid="{020a802f-0bc3-431f-a1bc-e7924ef32c38}" src="VMData/centos7 192.168.0.10___bigdata___/centos7.vbox"/>
<MachineEntry uuid="{e05ea8e0-c17a-4951-824a-77c56643fd83}" src="VMData/bigdata/新编组/CentOS-10/CentOS-10.vbox"/>
<MachineEntry uuid="{61b58edd-205f-4492-aa0d-5291253372da}" src="VMData/centos7 100/centos7 100.vbox"/>
</MachineRegistry>
<NetserviceRegistry>
<DHCPServers>
<DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.0.10" networkMask="255.255.255.0" lowerIP="192.168.0.10" upperIP="192.168.0.254" enabled="1"/>
</DHCPServers>
</NetserviceRegistry>
<SystemProperties defaultMachineFolder="C:\Users\wenchun001\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" proxyMode="0" exclusiveHwVirt="false"/>
<USBDeviceFilters/>
</Global>
</VirtualBox>