Put a static IP address on Virtualbox

Discussions about using Linux guests in VirtualBox.

Put a static IP address on Virtualbox

Postby nordinez » 16. Apr 2021, 18:17

Hi does anyone know how to put a static up address on a VM and is it useful because I checked and I already have the same subnet in my vm and my "real" pc
My real pc used Windows and my VM Ubuntu 18.04
nordinez
 
Posts: 8
Joined: 25. Mar 2021, 18:11

Re: Put a static IP address on Virtualbox

Postby mpack » 16. Apr 2021, 19:13

I already answered this in your "Using VirtualBox" cross post (which I have now deleted):

That is a guest OS question, not a VirtualBox question. If the guest OS does not ask for an IP address assignment, it will not receive one. What it uses instead is up to the guest OS. Whether what it uses instead works is up to the network you attach the VM to. Every guest OS has different tools for network config.

But... if you need to ask this question then perhaps you should leave automated address assignment alone...


You can't assign a static IP to a VM, the guest OS has to do that for itself. As mentioned in the quote, you need to use guest tools to assign a static IP. In Windows guests you simply disable "Automatically request an IP address" on the NIC interface, and then type in some manual numbers.

I will move this topic to "Linux Guests", as the question does not concern any feature of your Windows Host.
mpack
Site Moderator
 
Posts: 33930
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Put a static IP address on Virtualbox

Postby mpack » 16. Apr 2021, 19:18

Perhaps you should explain why you believe you need a static IP address.

Also, I hope you understand that this address will not be seen outside your home network, so it will not affect how the outside world treats the VM.
mpack
Site Moderator
 
Posts: 33930
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 10 guests