VirtualBox 6.024
Hi, I manually moved a virtual machine and modified the Machine Entry source location the VirtualBox.xml file (also the VirtualBox.xml-prev file) to reflect this. Unfortunately, when I start up VirtualBox again, the same virtual machine is still being listed in the old location, and not the new location. Re-opening the VirtualBox.xml file shows that it has been reverted to the previous location as well.
How is the VirtualBox.xml file being reverted back to the previous information, and where is that (previous) information coming from?
Unable to modify VirtualBox.xml
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Unable to modify VirtualBox.xml
Did you notice the first lines in Virtualbox.xml?
While VboxSVC is running, the contents of Virtualbox.xml and all registered VM .vbox files are kept in Virtualbox's memory, and can be written back to disk at any time without regard for manual edits, thus that sticky wicket in the warning message: "If you make changes to this file while any VirtualBox related application is running, your changes will be overwritten later, without taking effect."
Making manual edits to Virtualbox.xml or a .vbox file is possible if VboxSVC is not running. Making sure you have no VMs set to run as a service, etc, then rebooting the host and not starting any Virtualbox processes usually ensures that VboxSVC will not be running. You can check the Task Manager to be sure. Then you can manually edit Virtualbox.xml etc.
Note that manual edits to Virtualbox.xml or the .vbox's are not error-checked in Virtualbox like changes made by Vboxmanage or the main Virtualbox window. So you could really bung up the plumbing majorly. Adding VMs can cause duplicated UUIDs which would cause trouble and which would be caught when using the supported methods.
<?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.
-->
There is a service 'VboxSVC' which runs when any Virtualbox process is running, and which stays running for a short period of time after all Virtualbox processes have stopped.jonzilla wrote:How is the VirtualBox.xml file being reverted
While VboxSVC is running, the contents of Virtualbox.xml and all registered VM .vbox files are kept in Virtualbox's memory, and can be written back to disk at any time without regard for manual edits, thus that sticky wicket in the warning message: "If you make changes to this file while any VirtualBox related application is running, your changes will be overwritten later, without taking effect."
Making manual edits to Virtualbox.xml or a .vbox file is possible if VboxSVC is not running. Making sure you have no VMs set to run as a service, etc, then rebooting the host and not starting any Virtualbox processes usually ensures that VboxSVC will not be running. You can check the Task Manager to be sure. Then you can manually edit Virtualbox.xml etc.
Note that manual edits to Virtualbox.xml or the .vbox's are not error-checked in Virtualbox like changes made by Vboxmanage or the main Virtualbox window. So you could really bung up the plumbing majorly. Adding VMs can cause duplicated UUIDs which would cause trouble and which would be caught when using the supported methods.
How about the Move command? (see the VM's right-click menu in the VM list.)jonzilla wrote:I manually moved a virtual machine
Re: Unable to modify VirtualBox.xml
Thanks Scott, that was the little bugger indeed; once I stopped it I was able to effect the change and have it stick. Cheers!scottgus1 wrote: There is a service 'VboxSVC' which runs when any Virtualbox process is running, and which stays running for a short period of time after all Virtualbox processes have stopped.
While VboxSVC is running, the contents of Virtualbox.xml and all registered VM .vbox files are kept in Virtualbox's memory, and can be written back to disk at any time without regard for manual edits...
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Unable to modify VirtualBox.xml
Great! Glad you're up and running.