修改VirtualBox虚拟机默认存储路径及虚拟机迁移
一、问题
二、解决方案
1 、 文件迁移
将c盘里的C:\Users\86138\VirtualBox VMs文件复制到你想存放的目录
2、 修改全局设定,默认虚拟电脑位置
管理-》全局设定
3、删除所有
4、重新导入
导入成功,正常运行
然后干掉c盘下的 VirtualBox VMs,成功瘦身
5、补充
也可以不删除,不重新导入
直接在用户目录下找到.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="n=GLOBAL,m=f40c25a2-c41c-4159-9d56-d23b001ce52d"/> <ExtraDataItem name="GUI/LastItemSelected" value="m=vagrant_wxjr_reinforce_default_1640513208801_13257"/> <ExtraDataItem name="GUI/LastWindowPosition" value="269,197,720,385"/> <ExtraDataItem name="GUI/SplitterSizes" value="238,481"/> <ExtraDataItem name="GUI/SuppressMessages" value="confirmACPIShutdownMachine,confirmPowerOffMachine,confirmResetMachine"/> <ExtraDataItem name="GUI/Tools/LastItemsSelected" value="Welcome,Details"/> <ExtraDataItem name="GUI/UpdateCheckCount" value="33"/> <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2022-02-14, stable, 6.1.16"/> <ExtraDataItem name="GUI/VirtualMediaManager/SearchWidget/Expanded" value="true"/> <ExtraDataItem name="HostOnly/{6ff052ef-09a9-411b-9ecb-c501722c73e1}/IPAddress" value="192.168.56.1"/> <ExtraDataItem name="HostOnly/{6ff052ef-09a9-411b-9ecb-c501722c73e1}/IPNetMask" value="255.255.255.0"/> <ExtraDataItem name="HostOnly/{6ff052ef-09a9-411b-9ecb-c501722c73e1}/IPV6Address" value="fe80::b9ab:71ca:4123:bf05"/> <ExtraDataItem name="HostOnly/{6ff052ef-09a9-411b-9ecb-c501722c73e1}/IPV6PrefixLen" value="64"/> <ExtraDataItem name="HostOnly/{6ff052ef-09a9-411b-9ecb-c501722c73e1}/Name" value="VirtualBox Host-Only Ethernet Adapter"/> </ExtraData> <MachineRegistry> <MachineEntry uuid="{f40c25a2-c41c-4159-9d56-d23b001ce52d}" src="E:/VirtualBox VMs/vagrant_wxjr_reinforce_default_1640513208801_13257/vagrant_wxjr_reinforce_default_1640513208801_13257.vbox"/> <MachineEntry uuid="{11f52692-aec4-4674-b947-2ef05ea6dd23}" src="E:/VirtualBox VMs/vagrant_jx_default_1609938230384_5790/vagrant_jx_default_1609938230384_5790.vbox"/> </MachineRegistry> <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="E:\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" proxyMode="0" exclusiveHwVirt="false"/> <USBDeviceFilters/> </Global> </VirtualBox>
不过我删除虚拟机之后 重新加路径没有效果,还是重新导入的好。