Page 1 of 1
Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 02:01
by terra
Hi,
Is it possible to set CPUid by editing "Virtual Machine Name".vbox like this:
Code: Select all
<CpuIdTree>
<CpuIdLeaf id="1" eax="1787" ebx="2048" ecx="2147484169" edx="126614527"/>
</CpuIdTree>
instead of executing the following command:
Code: Select all
VBoxManage.exe modifyvm "Virtual Machine Name" --cpuidset 00000001 000006fb 00000800 80000209 078bfbff
The reason I am asking is that the second "cpuidset" are Hex of the first numbers
Re: Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 02:50
by socratis
Just to get this straight...
You prefer
manually editing the XML definition file and changing the values in
decimals, after making sure that no instance of
any VirtualBox related processes are in memory, with a
good chance of making a mistake and messing up the
CPU settings in the process, when chances are the the register values you want to change are
already given to you in hex?
... Instead of doing a dec2hex conversion?
Yes, by all means, it is absolutely possible!
PS. I'll give it to you that I never understood why they implemented it in decimal in the settings to begin with and not straight hexadecimals, but they must have had their reasons, it's simply that *I* don't get it...
PPS. It's doable in binary too, for those interested. I'll leave it as an exercise for the student...

Re: Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 09:17
by michaln
socratis wrote:PS. I'll give it to you that I never understood why they implemented it in decimal in the settings to begin with and not straight hexadecimals, but they must have had their reasons, it's simply that *I* don't get it...
The settings format is internal and does not need to be looked at or modified... so it could be stored in BASE64 or Roman numerals and it still wouldn't matter.
Also, users who routinely modify the .vbox settings files by hand deserve all the problems they get.
Re: Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 12:15
by socratis
michaln wrote:it could be stored in BASE64 or Roman numerals and it still wouldn't matter.
So, when I said it's doable in binary, I wasn't
that far off, right?

Re: Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 14:21
by scottgus1
terra wrote:Is it possible to set CPUid by editing "Virtual Machine Name".vbox
Should be possible, but please let me highlight this from Socratis' post:
socratis wrote:after making sure that no instance of any VirtualBox related processes are in memory
This because Virtualbox may come in at any time and edit stored-in-memory changes to the guest .vbox files, and will overwrite your changes. You need to make sure there are no Virtualbox processes or services running anywhere in your whole host OS before you can edit a .vbox manually. Thus this warning at the top of the .vbox file:
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
If you really want to edit the .vbox manually, reboot the host first then edit before starting any Virtualbox program, guest or main window.
Why do you want to enter cpu numbers in decimal? (If we knew that we might be able to suggest a different solution than editing the .vbox)
Re: Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 14:27
by scottgus1
There actually is a way to manually edit the .vbox while Virtualbox is running, but it requires unregistering the guest from Virtualbox. Then you can edit and re-register the guest.
Be careful, there is a dangerous button in the unregister process (the "Delete All Files" button) - click that instead of "Remove Only" and you'll lose the guest completely and have to restore from a backup.
Of course, backups go without saying if editing the .vbox manually is being considered

Re: Is it possible to set "cpuidset" manualy
Posted: 24. Oct 2016, 17:14
by socratis
scottgus1 wrote:Thus this warning at the top of the .vbox file:
Scott, you left out the line
just above those two that you quoted:
** DO NOT EDIT THIS FILE.