Page 1 of 1
set Cd-rom VendorID
Posted: 6. Apr 2017, 11:32
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?
Re: set Cd-rom VendorID
Posted: 6. Apr 2017, 12:27
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.
Re: set Cd-rom VendorID
Posted: 6. Apr 2017, 12:55
by socratis
Where did you copy that command from?
Re: set Cd-rom VendorID
Posted: 6. Apr 2017, 14:19
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/
Re: set Cd-rom VendorID
Posted: 6. Apr 2017, 16:04
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.
Re: set Cd-rom VendorID
Posted: 6. Apr 2017, 17:10
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.
Re: set Cd-rom VendorID
Posted: 6. Apr 2017, 20:51
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.