Is it possible to set "cpuidset" manualy

This is for discussing general topics about how to use VirtualBox.
Post Reply
terra
Posts: 5
Joined: 7. Aug 2016, 09:56

Is it possible to set "cpuidset" manualy

Post 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
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Is it possible to set "cpuidset" manualy

Post 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... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: Is it possible to set "cpuidset" manualy

Post 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.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Is it possible to set "cpuidset" manualy

Post 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? :lol:
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Is it possible to set "cpuidset" manualy

Post 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)
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Is it possible to set "cpuidset" manualy

Post 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 :lol:
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Is it possible to set "cpuidset" manualy

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply