System and host port mapping under virtualbox

Environment:
Virtualbox is installed under Ubuntu and XP is installed under VirtualBox,
 
Requirements:
Accessing xp Web services under Ubuntu,
 
Methods:
To do port mapping in Ubuntu, execute the following command (turn the virtual off before executing) :
VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/Protocol” TCP
VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/GuestPort” 80
VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/HostPort” 8888
 
The operating system name of the “XP” virtual machine; Pcnet is a network type; The Web can be anything;
 
Completed: start the xp virtual machine, and then under the ubuntu browser to access the address is: http://www.test.com:8888/, 80 service will show the xp system.
 
Just to remind you, there’s one question that’s been bothering me for a long time:
Description:

NAT#0: configuration query for “HostPort” int failed (VERR_CFGM_VALUE_NOT_FOUND).
Unknown error creating VM (VERR_CFGM_VALUE_NOT_FOUND).
 
When using VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/HostPort”, 8080, the above problems;
Later: 8080 into 8888 port IS OK.

Read More: