Recently installed a software for research, need to use the hard disk serial number to verify. Before another server has been installed, if you can change the serial number of the current hard drive with the original server's hard drive consistent with a lot less registration related trouble. Based on this idea, I found it in VBox's help.
9.5.3. Configuring the hard disk Vendor product data (VPD)
VirtualBox reports vendor product data for its virtual hard disks which consist of hard disk serial
Number, firmware revision and model number. These can be changed using the following commands:
Change serial number
Vboxmanage Setextradata "My VM" "Vboxinternal/devices/ahci/0/config/port0/serialnumber" "Serial"
Change firmware version
Vboxmanage Setextradata "My VM" "vboxinternal/devices/ahci/0/config/port0/firmwarerevision" "firmware"
Change supplier information
Vboxmanage Setextradata "My VM" "Vboxinternal/devices/ahci/0/config/port0/modelnumber" "Model"
The above command is for the SATA interface hard disk, "My VM" is the name of the virtual machine, the AHCI table is the type of hard disk, Port0 represents the first hard drive. If the IDE interface uses Primarymaster, Primaryslave, etc. to identify the hard drive, the type is piix3ide. To the IDE interface command:
Vboxmanage setextradata "XP" "Vboxinternal/devices/piix3ide/0/config/primarymaster/serialnumber" "9AC00E9F"
Command meaning: Modify the virtual machine IDE's primary hard drive serial number as 9ac00e9f
After the command has been executed, the configuration file for the corresponding virtual machine is actually modified. Virtualbox/machines/xp/xp. XML, adding the appropriate settings under the <ExtraData> node, so you can actually modify the configuration file directly without the command, and the effect is the same.
<ExtraData>
<extradataitem name= "Gui/autoresizeguest" value= "on"/>
<extradataitem name= "Gui/fullscreen" value= "Off"/>
<extradataitem name= "gui/lastcloseaction" value= "Poweroff"/>
<extradataitem name= "gui/lastwindowpostion" value= "239,49,1024,816"/>
<extradataitem name= "gui/minitoolbaralignment" value= "Bottom"/>
<extradataitem name= "Gui/minitoolbarautohide" value= "on"/>
<extradataitem name= "Gui/savemountedatruntime" value= "yes"/>
<extradataitem name= "gui/seamless" value= "Off"/>
<extradataitem name= "Gui/showminitoolbar" value= "yes"/>
<extradataitem name= "Vboxinternal/devices/piix3ide/0/config/primaryslave/serialnumber" value= "9AC00E9F"/>
</ExtraData>