Set up VM with Static IP + Internet + Host Communication

Issues related to configuring your network
Post Reply
JohnAgapi
Posts: 1
Joined: 2019/03/27 01:32:31

Set up VM with Static IP + Internet + Host Communication

Post by JohnAgapi » 2019/03/27 01:45:19

Dear Fellow Forum Member,

I need to set up a Virtual Machine with Static IP to connect to the Internet as well as the Host Machine.

Error: Cannot find a valid baseurl for repo: base/7/x86_64

I've spent at least 10 Hours, following any suggestion that I found on many websites, obviously, none of them helped :(

Additional Info:
Desired Static IP 192.168.122.50
Distro: CentOS Linux release 7.3.1611 (Core)
Host Machine: Windows 10 (1803)
The host is connecting using Wi-Fi & I don't have physical LAN

I'm preparing for my RHCE Certification and using [RHCE Study Guide][1]
[1]: https://www.amazon.in/RHCSA-Linux-Certi ... 0071841962
On Page 17, I have been instructed to set up a VM with Static IP. Without the Internet, I'm not able to install Guest Additions.

As expected of me, I will be more than willing to provide you any further information you may need to help me out.

User avatar
TrevorH
Forum Moderator
Posts: 25537
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Set up VM with Static IP + Internet + Host Communication

Post by TrevorH » 2019/03/27 09:34:42

Distro: CentOS Linux release 7.3.1611 (Core)
Why are you starting with something that's already 3 point releases and more than 2 years behind the current version? 7.6 is current and the only supported CentOS 7 version.
Error: Cannot find a valid baseurl for repo: base/7/x86_64
Does your network work? Can you ping 8.8.8.8 by ip address? Can you resolve hostnames to ip addresses correctly - e.g. does host www.google.com work and resolve to an ip address? Is /etc/resolv.conf set up correctly?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 2142
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Set up VM with Static IP + Internet + Host Communication

Post by jlehtone » 2019/03/27 13:51:25

The preferred way to configure every network device (VM and real metal) is DHCP. The alternative to DHCP is manual configuration.

That is unrelated to "static IP". DHCP can set a static IP and manual configuration can set dynamic IP.

Therefore, use your Windows virtualization tools to offer the desired IP for the VM. The thing is that the host side knows and dictates how and if the VM can communicate with the outside world. The VM has no say in the matter, except to refuse connectivity.


PS. You do state "desired IP" but do not show what the actual configuration is in the VM. Is that an effective way to ask a question?

Post Reply