Skip to content

Instantly share code, notes, and snippets.

@xiaoyvr
Last active December 5, 2017 14:35
Show Gist options
  • Select an option

  • Save xiaoyvr/81faaf9b9c4b4c978085fd076141586f to your computer and use it in GitHub Desktop.

Select an option

Save xiaoyvr/81faaf9b9c4b4c978085fd076141586f to your computer and use it in GitHub Desktop.

Hyper-V

Fix the IP address

issue: minishift/minishift#1391

create a virtual switch with name miniNAT, then enable internet sharing for miniNAT in wireless adapter settings.

$env:HYPERV_VIRTUAL_SWITCH="miniNAT" # or something else
$env:MINISHIFT_ENABLE_EXPERIMENTAL="y"
minishift start --network-gateway 255.255.255.0 --network-ipaddress 192.168.137.225

use same NAT with docker-ce (haven't tried yet)

change virtual switch to external network for DockerNAT

New-NetNat -Name SharedNAT -InternalIPInterfaceAddressPrefix 10.0.75.1/24
$env:MINISHIFT_ENABLE_EXPERIMENTAL="y"
$env:HYPERV_VIRTUAL_SWITCH="DockerNAT"
minishift.exe start --network-ipaddress 10.0.75.124 `
  --network-gateway 10.0.75.1 `
  --network-nameserver 8.8.8.8 

serv git locally

& git daemon --verbose --export-all --base-path=. --reuseaddr

add firewall rule for windows :9418

enable root for openshift container

login as system:admin

oc adm policy add-scc-to-user anyuid -z default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment