--cpuidset command not working

Discussions related to using VirtualBox on Windows hosts.
Post Reply
MBrin
Posts: 6
Joined: 30. Jan 2013, 15:05

--cpuidset command not working

Post by MBrin »

I have been playing around with the VBoxManage commands for a few days and almost everything is working like expected. I am stuck now in the modifyvm –cpuidset command. I fill in something like:

VBoxManage modifyvm ‘vmname ’ -–cpuidset 00000001 000306A9 00100800 7f9AE3BF 078BFBFF

It does not return any errors and I have a vt-x enabled motherboard and processor. I enabled vt-x in the BIOS of the host and did a full power cycle and I have also enabled vt-x in VirtualBox. However when I check with CPUID identification software it still shows me the old values. Is there something that I am missing or is there maybe something wrong with the VBoxManage command I am executing? Does it matter if the guest is running x86 windows or x64. I am really confused since all other commands seem to be implemented smoothly. Any comments or recommendations will be greatly appreciated :D
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: --cpuidset command not working

Post by michaln »

Yes, there's something you're missing. What the --cpuidset command does is modify the CPUID data presented by the host. However, this data is not passed to the VM unfiltered. If you're trying to use --cpuidset to expose VT-x capability to the VM, don't. It won't work.

If you look at the VBox.log file, you'll see the "host" and "guest" CPUID values. They're not the same.
MBrin
Posts: 6
Joined: 30. Jan 2013, 15:05

Re: --cpuidset command not working

Post by MBrin »

Hi michaln,

Thank you for the quick reply. I am still a newbie to all this so excuse me if I am firing off some stupid questions now, because I am not really sure I understand your response to its full extent.

What do you mean with ‘this data is not passed to the VM unfiltered’? I thought I would be able to modify the CPUID of the guest with this command.

I am not trying to use the –cpuidset command to expose VT-x capability to the VM. I am trying to change the guest VM cpuid so I will be able to install the software I was previously using on my vmware VM. It is being licensed on motherboard serial and cpuid.

I found out how to change the motherboard serial and what I am trying to do now is change the guest VM cpuid so it will allow me to use my software in VirtualBox. Is this possible in anyway and if so could you tell me how I can do this?

The vmware VM runs on the same computer by the way.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: --cpuidset command not working

Post by mpack »

I imagine what Michaln means is that you are not allowed to set arbitrary CPU capabilities in the guest. Certain ones will be filtered out if they can't be supported, such as VT-x.
MBrin wrote: The vmware VM runs on the same computer by the way.
Then why do you need to fake the CPUID?
MBrin
Posts: 6
Joined: 30. Jan 2013, 15:05

Re: --cpuidset command not working

Post by MBrin »

Hi mpack

Thanks to you as well for contributing to this thread. What you are saying makes sense.

So if I get you right, you are saying: I am able to change the cpuid as long as I do not change part of the code that stands for features that can’t be supported within Virtualbox?

My knowledge about what the codes stand for does not stretch too far but I will read up on it tonight and see how far it gets me.

To answer your question as to why I need to fake the cpuid. I need to fake this because the cpuid I have in my vmware VM is not the same as the cpuid of my host or the cpuid of the VirtualBox vm.

If any of you could give me any more pointers as to what part of the cpuid code I can and cannot change I would really appreciate it :D
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: --cpuidset command not working

Post by Perryg »

What is this guest?
MBrin
Posts: 6
Joined: 30. Jan 2013, 15:05

Re: --cpuidset command not working

Post by MBrin »

It is Windows 7 ultimate x86 and my host is running Windows 7 x64
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: --cpuidset command not working

Post by michaln »

MBrin wrote:I am not trying to use the –cpuidset command to expose VT-x capability to the VM. I am trying to change the guest VM cpuid so I will be able to install the software I was previously using on my vmware VM. It is being licensed on motherboard serial and cpuid.
Well, which part of CPUID? All of it? There is quite a lot of CPUID information these days.

At any rate, there's a pretty good chance VMware and VirtualBox expose a slightly different set of host capabilities to the guest (and this set will change across versions and depends on VM settings). That's not something which is easy to change.

If I understood you correctly, this software won't even run on the host because the CPUID information is not the same as what's inside the VMware VM?
MBrin
Posts: 6
Joined: 30. Jan 2013, 15:05

Re: --cpuidset command not working

Post by MBrin »

I personally think I would only have to change leaf1, but I can’t be entirely sure until I am able to change it to the same value as my vmware VM and test the software.

Can this be done to only change the code at leaf1 to the same value or does it has code that stand for features that can’t be implemented in VirtualBox?

And yes you understand me correct that the software won’t even run on the host because of the differences between host -and vmware VM cpuid.
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: --cpuidset command not working

Post by michaln »

Is the CPUID value you're trying to set the value that is seen inside a VMware VM? Why don't you start with CPUID leaf 0, or is that the same? And incidentally, what host CPU is this?
MBrin
Posts: 6
Joined: 30. Jan 2013, 15:05

Re: --cpuidset command not working

Post by MBrin »

Thanks again for helping me with this.

The CPUID I am trying to set ultimately is indeed one as seen inside a vmware VM. I have however experimented with many different CPUIDS just to see if it was possible to force a change. It did not work.

I have tried on 3 different computers who are all VT-x enabled but the one that really counts has an Intel 3770K processor.

I think part of the problem is my lack of knowledge about the true meaning of these CPUID values that I am trying to change. I am still in the process of acquiring knowledge about this subject.

Another big issue is is that my software cost several thousands of dollars so it is not just a case of simply buying another license and be done with it.

I already tried starting with CPUID leaf 0 but so far I have not been successful in making any changes what so ever. Leaf 0 is not the same as leaf 1 in any of my CPUIDS.

I have also tried to manually set EXTRADATAITEMS in the Vbox log itself, but this has also not yielded any results.

I understand that just changing the CPUID into something totally different will cause unexpected behavior and poor or even no performance in the VirtualBox VM but I never expected it to be so hard to force a simple change of even one digit in the CPUID. If there is anyone who could give me one working CPUID override for leaf1 in combination with my processor I would at least have the acknowledgement that it is possible to make a change. :D
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: --cpuidset command not working

Post by michaln »

MBrin wrote:I think part of the problem is my lack of knowledge about the true meaning of these CPUID values that I am trying to change. I am still in the process of acquiring knowledge about this subject.
This is the canonical document: http://www.intel.com/content/www/us/en/ ... -note.html
Another big issue is is that my software cost several thousands of dollars so it is not just a case of simply buying another license and be done with it.
If they took that much money from you, they ought to be able to modify the license?
I already tried starting with CPUID leaf 0 but so far I have not been successful in making any changes what so ever. Leaf 0 is not the same as leaf 1 in any of my CPUIDS.
They're all different, with all sorts of unrelated meanings. The document I linked to above describes all the CPUID information. It's horribly complex nowadays.
I understand that just changing the CPUID into something totally different will cause unexpected behavior and poor or even no performance in the VirtualBox VM but I never expected it to be so hard to force a simple change of even one digit in the CPUID.
Changing some things is trivial, like the "display string" in the CPU (the human-readable processor name). Even pretending that an Intel is and AMD or vice versa is relatively trivial. But many of the feature flags pertain to things that can't be emulated or aren't worth emulating and those will be modified because yes, leaving those bits on will likely confuse or crash the guest.
Post Reply