Page 1 of 1
set static IP addresses for VM using commandline
Posted: 9. Feb 2011, 21:50
by nkhoa
hi there
I've been bugging this for over a month.
Is it possible to set Ip address for VM using VBoxManage?
What I've been doing is to use RDP. My physical hosts server are linux and windows and located on the East Coast while I'm in West. Therefore, I need to RDC into the host first before I can do any RDP manipulation on VM. And this thing is pretty laggy.
Many thanks!
Re: set static IP addresses for VM using commandline
Posted: 9. Feb 2011, 22:19
by Perryg
Is it possible to set Ip address for VM using VBoxManage?
Short answer is no.
VirtualBox has nothing to do with the guests actual address. It presents a NIC and protocol.
If you want to set a static address for the guest then set it in the guest.
Re: set static IP addresses for VM using commandline
Posted: 9. Feb 2011, 22:24
by nkhoa
Thanks for your reply!!!
Re: set static IP addresses for VM using commandline
Posted: 10. Feb 2011, 23:06
by HubTou
Hello,
You can either:
- use NAT, bind your VM to the IP you want in the host, assign names at boot time to the internal IP you have been given (10.0.2.15). See VBoxManage modifyvm "VM name" --natbindip1 "the external IP you want" (§9.9.4 in the 4.0.2 manua)
- Use bridged networking, configure your VM to use DHCP, set the address dynamically through the internal DHCP, use a firewall in the host to filter DHCP dialog from getting outside. See VBoxManage dhcpserver [...] --lowerip "the external IP you want" (§8.33 in the 4.0.2 manual)
BTW, unless you want to tunnel RDP or VNC through the host, with SSH or SSL/TLS, why not connect directly with RDP into the VM?
I've always had very good response time with remote machines using a RDP server in the guest. The VNC server in the host is also very responsive, but it leaves me with two mouse pointers in graphical guests.
Best regards,
Hubert
Re: set static IP addresses for VM using commandline
Posted: 11. Feb 2011, 00:23
by nkhoa
hey thanks!!
yeah.. i got 2 mouses on guests too and it's pretty laggy. I just think that it might be better to be able to set IP addresses for each VM directly from VBoxManage command