Comments (7)
Not only the space is wrong, there should be only one IP address.
Well, I normally run this in VMware environment, not in VirtualBox, so I don't have much experience how two boxes could work in parallel.
from windows-docker-machine.
I am not sure if it will work at all for two instances because of the ports.
The main problem however is that docker breaks and it is really hard to find out why.
Do you have any idea how we might fix that spacing issues to prevent docker from breaking?
from windows-docker-machine.
Maybe after line 17 we have to get rid of everything after the space. Donβt know why there are sometimes two IP addresses.
from windows-docker-machine.
Another solution would be to throw an error if two IP addresses are present.
But I would probably prefer to get rid of the space.
from windows-docker-machine.
I found a similar issue/pr #56 where we also couldn't find the reason.
But maybe it makes sense to filter out all IP addresses beginning with 169.254 π€
($_.IPAddress).StartsWith("169.254.")
and put it into the filterscript somehow.
from windows-docker-machine.
I like the idea π
this is the full `Get-NetIPAddress` output I receive (click to expand)
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : poB:DDC:noD>?o<D>opoDl<p=/;@55;@55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address :
2019-box: IPv6Address : fe80::90de:45e2:4efe:b2f3%16
2019-box: IPVersionSupport :
2019-box: PrefixLength : 64
2019-box: SubnetMask :
2019-box: AddressFamily : IPv6
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : Ethernet 2
2019-box: InterfaceIndex : 16
2019-box: IPAddress : fe80::90de:45e2:4efe:b2f3%16
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : WellKnown
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Link
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 16
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : poB:DD>m<pDm<:pD@<BpDCo;@/;<55;<55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address :
2019-box: IPv6Address : fe80::4c2f:c20f:628f:9e16%12
2019-box: IPVersionSupport :
2019-box: PrefixLength : 64
2019-box: SubnetMask :
2019-box: AddressFamily : IPv6
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : vEthernet (nat)
2019-box: InterfaceIndex : 12
2019-box: IPAddress : fe80::4c2f:c20f:628f:9e16%12
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : WellKnown
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Link
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 12
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : poB:DD?m@@DBCk=Dl?>@DBo>;/=55=55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address :
2019-box: IPv6Address : fe80::5c66:89a3:b546:8e41%3
2019-box: IPVersionSupport :
2019-box: PrefixLength : 64
2019-box: SubnetMask :
2019-box: AddressFamily : IPv6
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : Ethernet
2019-box: InterfaceIndex : 3
2019-box: IPAddress : fe80::5c66:89a3:b546:8e41%3
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : WellKnown
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Link
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 3
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : DD;55;55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address :
2019-box: IPv6Address : ::1
2019-box: IPVersionSupport :
2019-box: PrefixLength : 128
2019-box: SubnetMask :
2019-box: AddressFamily : IPv6
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : Loopback Pseudo-Interface 1
2019-box: InterfaceIndex : 1
2019-box: IPAddress : ::1
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : WellKnown
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : WellKnown
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 1
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : ;C<8;@B8CC8C:55;@55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address : 192.168.99.90
2019-box: IPv6Address :
2019-box: IPVersionSupport :
2019-box: PrefixLength : 24
2019-box: SubnetMask :
2019-box: AddressFamily : IPv4
2019-box: AddressState : Duplicate
2019-box: InterfaceAlias : Ethernet 2
2019-box: InterfaceIndex : 16
2019-box: IPAddress : 192.168.99.90
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : Manual
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Manual
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 16
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : ;@C8<?>8;AB8<>=55;@55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address : 169.254.178.243
2019-box: IPv6Address :
2019-box: IPVersionSupport :
2019-box: PrefixLength : 16
2019-box: SubnetMask :
2019-box: AddressFamily : IPv4
2019-box: AddressState : Tentative
2019-box: InterfaceAlias : Ethernet 2
2019-box: InterfaceIndex : 16
2019-box: IPAddress : 169.254.178.243
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : WellKnown
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Link
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 16
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : ;C<8;@B8;@:8;55;<55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address : 192.168.160.1
2019-box: IPv6Address :
2019-box: IPVersionSupport :
2019-box: PrefixLength : 20
2019-box: SubnetMask :
2019-box: AddressFamily : IPv4
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : vEthernet (nat)
2019-box: InterfaceIndex : 12
2019-box: IPAddress : 192.168.160.1
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : Manual
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Manual
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 12
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : ;:8:8<8;?55=55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address : 10.0.2.15
2019-box: IPv6Address :
2019-box: IPVersionSupport :
2019-box: PrefixLength : 24
2019-box: SubnetMask :
2019-box: AddressFamily : IPv4
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : Ethernet
2019-box: InterfaceIndex : 3
2019-box: IPAddress : 10.0.2.15
2019-box: PreferredLifetime : 23:59:32
2019-box: PrefixOrigin : Dhcp
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : Dhcp
2019-box: Type : Unicast
2019-box: ValidLifetime : 23:59:32
2019-box: PSComputerName :
2019-box: ifIndex : 3
2019-box: Caption :
2019-box: Description :
2019-box: ElementName :
2019-box: InstanceID :
2019-box: CommunicationStatus :
2019-box: DetailedStatus :
2019-box: HealthState :
2019-box: InstallDate :
2019-box: Name : ;<A8:8:8;55;55;55;
2019-box: OperatingStatus :
2019-box: OperationalStatus :
2019-box: PrimaryStatus :
2019-box: Status :
2019-box: StatusDescriptions :
2019-box: AvailableRequestedStates :
2019-box: EnabledDefault : 2
2019-box: EnabledState :
2019-box: OtherEnabledState :
2019-box: RequestedState : 12
2019-box: TimeOfLastStateChange :
2019-box: TransitioningToState : 12
2019-box: CreationClassName :
2019-box: SystemCreationClassName :
2019-box: SystemName :
2019-box: NameFormat :
2019-box: OtherTypeDescription :
2019-box: ProtocolIFType : 4096
2019-box: ProtocolType :
2019-box: Address :
2019-box: AddressOrigin : 0
2019-box: AddressType :
2019-box: IPv4Address : 127.0.0.1
2019-box: IPv6Address :
2019-box: IPVersionSupport :
2019-box: PrefixLength : 8
2019-box: SubnetMask :
2019-box: AddressFamily : IPv4
2019-box: AddressState : Preferred
2019-box: InterfaceAlias : Loopback Pseudo-Interface 1
2019-box: InterfaceIndex : 1
2019-box: IPAddress : 127.0.0.1
2019-box: PreferredLifetime : 10675199.02:48:05.4775807
2019-box: PrefixOrigin : WellKnown
2019-box: SkipAsSource : False
2019-box: Store : ActiveStore
2019-box: SuffixOrigin : WellKnown
2019-box: Type : Unicast
2019-box: ValidLifetime : 10675199.02:48:05.4775807
2019-box: PSComputerName :
2019-box: ifIndex : 1
I am not that familiar with powershell but I guess we would need the following statement:
$machineIp=(Get-NetIPAddress -AddressFamily IPv4 `
| Where-Object -FilterScript { `
( ! ($_.InterfaceAlias).StartsWith("vEthernet (") ) `
-And $_.IPAddress -Ne "127.0.0.1" `
-And $_.IPAddress -Ne "10.0.2.15" `
-And !($_.IPAddress).StartsWith("169.254.") `
}).IPAddress
I'll give it a try
from windows-docker-machine.
Fixed with #69
from windows-docker-machine.
Related Issues (20)
- vagrant up on Mac OS fails: "VBoxManage: error: Unknown option: --nested-hw-virt" HOT 2
- Document the step to remove it HOT 3
- Parallels support? HOT 6
- windows_2019_docker packer build fails on Mac Big sur. HOT 5
- .dockerignore file not respected on MacOS X (VMware) HOT 2
- VirtualBox doesn't allow 192.168.99.0 subnet by default HOT 3
- Apple Silicon Support HOT 1
- Is there any image for Apple silicon M1 macOS? HOT 4
- Plugins failed to load? HOT 1
- Question: Is this compatible with m1 MacOS? HOT 4
- Can't connect to published ports from MacOS
- Host-only adapters are no longer supported by Virtualbox HOT 1
- 2019-box is different in configuration from 2019 self-build HOT 1
- Automatic shutdown? HOT 2
- Unable to enableSharedFolders due to VMware Tools HOT 4
- Size of docker disk? HOT 1
- Digest initialization failed: initialization error when running vagrant up HOT 5
- 'docker context ls' does not show '2019-box' HOT 1
- RDP 3389, but got CMD console only HOT 1
- Windows 2019 hangs on Running... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-docker-machine.