LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configuring VM static ipaddress (https://www.linuxquestions.org/questions/linux-newbie-8/configuring-vm-static-ipaddress-4175598342/)

edentonjr 01-26-2017 11:06 PM

Configuring VM static ipaddress
 
1 Attachment(s)
I created 2 virtual machines via Oracle VirtualBox using the same Centos7 .ISO DVD for both machines. The default ip address is 10.0.2.15, I want to assign different static ip addresses on both machines. Please advise; what changes do I need to make to my
/etc/sysconfig/network-scripts/ifcfg-enp0s3

see attachment

smallpond 01-27-2017 08:16 AM

You shouldn't have to change anything. They're set for DHCP and VB will assign a different MAC for each NIC.

michaelk 01-27-2017 09:23 AM

What are you trying to accomplish?

I assume both machines ethernet adapters were configured as NAT. So each VM adapter when using DHCP will be assigned a 10.0.x.15 address. If you want the VMs to communicate with each other you might want to use a host only, internal network or use bridge networking.

https://www.virtualbox.org/manual/ch06.html


All times are GMT -5. The time now is 02:59 PM.