VBoxManage controlvm “guest OS”

Operate specified guest OS

%VBoxManage controlvm "guest os" [ poweroff  | savestate | reset | pause | resume ]

The second argument in controlvm specifies the control option

Added port forwarding settings from the command line in VirtualBox

VBoxManage controlvm "guest OS" natpf1 "nginx,tcp,127.0.0.1,8080,,80"

In this sample, port forwarding 8080 of localhost to port 80.

VBoxManage controlvm "guest OS" natpf1 ssh,tcp,,22022,,22