Headless VirtualBox VM NAT Network
Posted
by
dirt
on Super User
See other posts from Super User
or by dirt
Published on 2013-10-27T02:46:59Z
Indexed on
2013/10/27
3:58 UTC
Read the original article
Hit count: 455
virtualbox
I have a remote linux server accessible through SSH only.
My goal is to host multiple Virtual Machines on this host server using VirtualBox. The host server has 1 IP address, so NAT will be used to route to the VMs for example 10022 will forward to server1:22 and 20022 will forward to server2:22.
I have installed VirtualBox and copied a pre-configured CentOS VM to the host server.
I start the VM, but cannot establish a connection to the server for example ssh -p 10022 127.0.0.1 times out.
I've tried many things:
Method 1: Copied existing .vdi, attached to new VM
Method 2: Imported .Ova VM (thought it would help any MAC re-init issues?)
NAT network type, tried natnet1 192.168/16 and 10.0/16
VBoxManage modifyvm "hermes.awoms.com" --natnet1 "192.168/16"
Port forwarding with and without specifying VM ip in modifyvm --natpf1 command
VBoxManage modifyvm "hermes" --natpf1 "guestssh,tcp,,10022,,,22"
VBoxManage modifyvm "hermes" --natpf1 "guestssh,tcp,,10022,192.168.0.15,22"
I can't see if VM is even booting (VBoxHeadless "hermes" --start &
runs with no errors)
I can't tell if VM is getting an IP address
Is there anything else I can do to get more information from VirtualBox or the VM starting up when the only access I have is SSH?
© Super User or respective owner