-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for custom IP configuration #1293
Comments
Under Hyper-V, we're using the "Default Switch" network, and we have no control over what it's doing, I'm afraid. It's surprising it would use a different DHCP range on every boot, we'll have to investigate there. FWIW As for using static IPs, Multipass currently relies on IP connectivity between the host and the instance. And using something from a different subnet we'd need to set up routing and DNS for it. We're planning to detach Multipass functions from networking (where possible) by communicating with the instance via a "virtual socket", at which point we'll be able to expose much more complex networking configurations. |
Looks like #!/bin/bash
ics_gateway=$(powershell.exe -Command \
"(Get-NetAdapter -Name 'vEthernet (Default Switch)'|Get-NetIPAddress -AddressFamily IPv4).IPAddress")
sudo tee /etc/resolv.conf > /dev/null <<EOF
nameserver $ics_gateway
EOF |
I assume that using static IP on multipass is still not available? or not possible? until now? |
Hi @ticozz we'll be working on allowing custom network configuration for additional interfaces real soon. You'll be able to ask for an interface to be bridged with an interface of your choice, and then in the instance itself set the static IP configuration. |
Thanks @Saviq for now I had to opt for an alternate solution to host the VM, as assigning a static IP with gateway and nameserver was a must. Thanks for replying and keep up the great work |
Yes, be able set the IP of the instance is a must for us developers. Please give us this gift. :-) |
Every time the IP of the instance changes, I have to update it also in the MobaXTerm saved session to be able to log in. Quite annoying. |
Hi @akunaatrium you can use |
@Saviq Nice, worked indeed, thanks! Do you know if it also documented somewhere? |
Not yet - I've added it to the list of topics we should document on https://multipass.run/docs. |
On windows, you could add a virtual switch in hyper-v manager and then use your dhcp device to always assign the same ip for the instance. It's not ideal and I'm sure there are limitations, but it has worked for me so far. |
any news on this ? |
We're working on bridging support (#118) right now, which will also allow adding an interface to a custom switch without configuration, so this will come real soon. |
Still waiting... |
If you are using windows10, you should check a file which called
It says I could use |
Has this been implemented yet? |
Hi @Hamberfim, there's a prerelease build available here: |
Thanks. My desire is to be able to implement this on a headless Ubuntu server, but as I understand it this is Win/Mac OS specific. |
We're working on Linux support via LXD now. Stay tuned. |
Awesome...looking forward to it. :D |
So if the solution is locked to LXD it means it's for Ubuntu support rather than Linux. |
How should we set it as static for using as a server (kubernetes node)? |
@tuxerrante you can append static IPs, just add e.g. |
The |
It would be very helpful to have the functionality of providing static IP address to primary using cloud-init.
One of use cases of above would be hosting docker daemon within multipass and having WSL connect to it. For that we need either static IP address or dns resolution of primary.mshome.net which is only provided by etc/hosts.ics file. ( currently I am building up ubuntu's etc/hosts file in bashrc by copying etc/hosts.ics however it seems an ugly workaround.
The text was updated successfully, but these errors were encountered: