set Cd-rom VendorID

This is for discussing general topics about how to use VirtualBox.
Post Reply
newcomer109
Posts: 11
Joined: 16. Dec 2016, 21:24

set Cd-rom VendorID

Post by newcomer109 »

Good afternoon,

Have a little mess around setting up Cd-rom vendor

Code: Select all

%vboxman% setextradata "%1" "VBoxInternal/Devices/ahci/0/Config/Port1/ATAPIVendorId" "string:Hitachi-LG"
Get error form Virtualbox AHCI configuration error: "ATAPIVendorId" is longer than 16 bytes (VERR_INVALID_PARAMETER). But as can you see it is only 10th symbol long. Where is a trick?
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: set Cd-rom VendorID

Post by mpack »

I count 17 characters in that string. I guess VBoxManage does as well.

I assume you aren't counting the length of the "string:" part? Do you have a reference that describes this syntax? I'm rather curious about why that prefix is there. The string is in quotes, so the parser already knows it's a string. I might see a point if the string contained digits.
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: set Cd-rom VendorID

Post by socratis »

Where did you copy that command from?
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.
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: set Cd-rom VendorID

Post by Martin »

Probably from an ubuntu wiki entry where a similar syntax was used in a script to assign a variable which is then used in the VBoxManage call.
https://wiki.ubuntuusers.de/Dualboot-Wi ... alisieren/
newcomer109
Posts: 11
Joined: 16. Dec 2016, 21:24

Re: set Cd-rom VendorID

Post by newcomer109 »

I assume you aren't counting the length of the "string:" part? Do you have a reference that describes this syntax? I'm rather curious about why that prefix is there. The string is in quotes, so the parser already knows it's a string. I might see a point if the string contained digits.
String: is not counted, it just send to Virtualbox treat value as a string. When using quotes, sometimes noticed Virtualbox returns an error that value definition is wrong. I take this syntax from general knowledge of batch.
The result will be same if you set

Code: Select all

%vboxman% setextradata "%1" "VBoxInternal/Devices/ahci/0/Config/Port1/ATAPIVendorId" "Hitachi-LG"
That's why want to know how Virtualbox assumes this 16 bytes long.
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: set Cd-rom VendorID

Post by mpack »

newcomer109 wrote: String: is not counted
Sez who? You may be right, but I asked for a reference in VirtualBox documentation. "General knowledge of batch" does not seem to be applicable here.
newcomer109
Posts: 11
Joined: 16. Dec 2016, 21:24

Re: set Cd-rom VendorID

Post by newcomer109 »

Found info about using string: & integer: as the way to make VirtualBox clearly understand the value (in some cases put only "" not enough and as a result you will get an error) at some Linux board, not in the official manual. Many useful tricks are not describe at all or barely documented in offical manual. Good example, CPU emulation. A few people know that VirtualBox can fully emulate any CPU via VBoxInternal/CPUM/HostCPUID/ (this is undocumented any way) or using barely documented vboxmanage modifyvm <uuid|vmname> [--cpuidset <leaf> <eax> <ebx> <ecx> <edx>] (If you interested can explain both of them in details).
I tested dozen dmi tables + storages info gazered from real notebooks, and seem that actual size you can add is 8 bytes (8 symbols).If amount of bytes is greater, you will see an error. So i wonder how this info passes to Virtualbox , is it count each symbol for 2 bytes?

P.S.
Explore source code today, seems that VirtualBox allow only 8 bytes to be set for this parameter (thinks it is a bug),
Topic is clear now.
Post Reply