I recently tried KVM as virtualization platform. I also use VirtualBox occasionally.

In every instance of deploying guest OSes, I always do one of these two: 1) set up network as NAT, guest not needed to be visible outside the virtualized environment. 2) set up network as bridged, guest needed to be visible. IP usually handed by DHCP from DHCP server in the physical network.

My question is, how to set up the environment so that the host OS and guest OSes can see each other given the condition that no physical network present (the host OS is not connected to any network) thus, no DHCP for both guests and host in option 2, or no DHCP for host in option 1 (virtual OSes will do just fine amongst themselves). I am interested in KVM on RHEL/CentOS, but if there is information for VirtualBox, it would be very nice.

This is actually so that I can set the host os as a platform (mainly CentOS/RHEL) and then I can set the guest as Fedora or Windows, and allows me to tinker deep to the inside of the OS without changing the host OS. For example, in CentOS I should add EPEL to acquire nginx and test something. However I don't need the EPEL to be constantly be contacted during yum update. Keeping base/host OS as minimal as possible (using the default repository whenever possible) and using the guests as testing ground (including adding new repos) therefore adds convenience that whenever I issue yum update on the host OS, it only pulls from the default repository. I don't need to update the guest OSes since it will sometimes be rebuilt from zero for practice.

  • FWIW, VIrtualBox has a DHCP server included in its networking stack. You can setup a Host-Only network or internal network and have VirtualBox provide IP addresses via the built in DHCP server. – heavyd May 3 '16 at 16:35
  • Hi @heavyd will this allow the host to obtain the IP from the VirtualBox DHCP server? How can the said DHCP Server simulates network connection from physical network port? Is there a virtual interface it will respond to? – Ferdi May 7 '16 at 1:26
  • Apparently here already explained how it's done in KVM. I will indeed try them both (VBox and KVM). Thank you for the keyword @heavyd – Ferdi May 7 '16 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.