Overview

Unresolved directive in <stdin> - include::con_static-ip-overview.adoc[]

  • Assigning a static IP address to the Minishift VM is only officially supported for Hyper-V.

  • The Minishift VM cannot be assigned a static IP address when using the KVM driver plug-in.

  • An experimental --set-static flag is available for the minishift ip command for other hypervisors. See Set Fixed IP Address for more information.

Assign IP Address to Hyper-V

Since the Internal Virtual Switch for Hyper-V does not provide a DHCP offer option, an IP address needs to be provided in a different way. Functionality is provided to assign an IP address on startup using the Data Exchange Service for Hyper-V.

This only works with the CentOS or RHEL ISO in combation with Hyper-V. The Boot2Docker ISO image experiences a problem when the values are being sent to the Minishift instance and consumed by the Boot2Docker ISO. We are looking into the issue and hope to provide a solution in the future.

to make this work, you need to create a Virtual Switch using NAT.

WinNAT is limited to one NAT network per host. For more details about capabilities and limitations, please see the WinNAT capabilities and limitations blog.

The following command will attempt to assign an IP address for use on the Internal Virtual Switch 'MyInternal':

PS> $env:HYPERV_VIRTUAL_SWITCH="MyInternal"
PS> minishift.exe start `
  --iso-url centos `
  --network-ipaddress 192.168.1.10 `
  --network-gateway 192.168.1.1 `
  --network-nameserver 8.8.8.8

If you want to use the 'DockerNAT' network, the following commands are needed to setup the correct NAT networking and assign an IP in the range expected:

PS> New-NetNat -Name SharedNAT -InternalIPInterfaceAddressPrefix 10.0.75.1/24
PS> $env:HYPERV_VIRTUAL_SWITCH="DockerNAT"
PS> minishift.exe start `
  --iso-url centos `
  --network-ipaddress 10.0.75.128 `
  --network-gateway 10.0.75.1 `
  --network-nameserver 8.8.8.8

Be sure to specify a valid gateway and nameserver. Failing to do so will result in connectivity issues.