Page 1 of 1

Assign one ip to each guest

Posted: 26. Apr 2018, 17:52
by zozidalom
Hello Everyone!

I have a host node based on CentOS with 5 IPv4 addresses. I am using phpvirtualbox. I want to setup 4 quests with one-one IP from the host node.

Now my IPs look like this on the host machine:
i.imgur(dot)com/YO07jHS(dot)png

I want my guests to use only one of them per guest, and with theese IPs I want to access ssh ftp services on the guests. So I basically want my guest machines to run on one-one ip of the host machine.
But in phpvirtualbox only em1 is displayed and the rest not.
i.imgur(dot)com/0sD4bRR(dot)png
Sorry if this is a common problem I do not have much experience with networking and linux.

PS: I need a quick solution and I just registered so I can't post URLs please replace (dot) with a .

Best
zozidalom

Re: Assign one ip to each guest

Posted: 26. Apr 2018, 19:20
by mpack
Every guest already has its own IP. It couldn't communicate if the IP conflicted with other PCs on the network.

Just make sure every VM has a unique MAC. I.e. if the VMs were created by cloning then you should have selected the "Reset MAC" option.

Re: Assign one ip to each guest

Posted: 26. Apr 2018, 19:38
by zozidalom
Thank you for the reply! So if I want to run a sevrer on my VM then shall I use the ip of the host or the ip of the VM?

Re: Assign one ip to each guest

Posted: 26. Apr 2018, 19:58
by socratis
zozidalom wrote:I am using phpvirtualbox ... But in phpvirtualbox only em1 is displayed and the rest not.
Shouldn't that be a question for the phpVirtualBox people?

phpVirtualBox is a program that relies on VirtualBox but modifies its configuration files in unknown ways to us. It is not supported on these VirtualBox user forums, they have their own phpVirtualBox support channels. If you are having this problem with a standalone version of VirtualBox, then we can continue this discussion.

Plus, there's something weird in your configuration. Can you explain why your NICs are listed as "em1:", "em1::" (note the two colons), "em1:1", "em1:2", "em1:3"? Those are some weirdly named cards to begin with, maybe that's why phpVirtualBox has issues identifying them.

But as I said, you'll need to ask them...