vagrant-parallels 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/vagrant-parallels/driver/base.rb +18 -4
- data/lib/vagrant-parallels/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45a092a3894860152f2315793cb2a6ca541bc3488b168e3e08c9ba9637f8c867
|
4
|
+
data.tar.gz: 7e6a76e6734bad9691232004722d0cc04f5bc53992798bd6e5074341dce985af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff72d8b55fde7f2d4444048fe9c736e0f312c61f8b5098b0ac5569a1b3415a6c6671b9c54375190cbcd43aebf55b74fbde681ae9ff2c77f0144bd199a525b60
|
7
|
+
data.tar.gz: 5181b7a0c84d03f593e7e4102e8289c95c292a5328566802f017851617259911012745707b78799bf113bd96e78200f95a6762abbb85135181883c273439dd6b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 2.3.1 (March 23, 2022)
|
2
|
+
BUG FIXES:
|
3
|
+
- Fix the detection of VM IP. Wait for the IP to become available to
|
4
|
+
avoid connection issues and Vagrant warnings.
|
5
|
+
[[GH-440](https://github.com/Parallels/vagrant-parallels/issues/440)]
|
6
|
+
|
1
7
|
## 2.3.0 (March 22, 2022)
|
2
8
|
IMPROVEMENTS:
|
3
9
|
- Support fetching the VM IP using prlctl
|
@@ -406,6 +406,7 @@ module VagrantPlugins
|
|
406
406
|
# Returns an IP of the virtual machine fetched from the DHCP lease file.
|
407
407
|
# It requires that Shared network adapter is configured for this VM
|
408
408
|
# and it obtains an IP via DHCP.
|
409
|
+
# Returns an empty string if the IP coudn't be determined this way.
|
409
410
|
#
|
410
411
|
# @return [String] IP address leased by DHCP server in "Shared" network
|
411
412
|
def read_guest_ip_dhcp
|
@@ -432,12 +433,13 @@ module VagrantPlugins
|
|
432
433
|
end
|
433
434
|
|
434
435
|
# Returns an IP of the virtual machine fetched from prlctl.
|
436
|
+
# Returns an empty string if the IP coudn't be determined this way.
|
435
437
|
#
|
436
438
|
# @return [String] IP address returned by `prlctl list -f` command
|
437
439
|
def read_guest_ip_prlctl
|
438
440
|
vm_info = json { execute_prlctl('list', @uuid, '--full', '--json') }
|
439
|
-
ip = vm_info.first.fetch('ip_configured',
|
440
|
-
ip == '-' ?
|
441
|
+
ip = vm_info.first.fetch('ip_configured', '')
|
442
|
+
ip == '-' ? '' : ip
|
441
443
|
end
|
442
444
|
|
443
445
|
# Returns path to the Parallels Tools ISO file.
|
@@ -768,13 +770,25 @@ module VagrantPlugins
|
|
768
770
|
end
|
769
771
|
|
770
772
|
# Reads the SSH IP of this VM from DHCP lease file or from `prlctl list`
|
771
|
-
# command - whatever returns a non-empty result.
|
773
|
+
# command - whatever returns a non-empty result first.
|
772
774
|
# The method with DHCP does not work for *.macvm VMs on Apple M-series Macs,
|
773
775
|
# so we try both sources here.
|
774
776
|
#
|
775
777
|
# @return [String] IP address to use for SSH connection to the VM.
|
776
778
|
def ssh_ip
|
777
|
-
|
779
|
+
5.times do
|
780
|
+
ip = read_guest_ip_dhcp
|
781
|
+
return ip unless ip.empty?
|
782
|
+
|
783
|
+
ip = read_guest_ip_prlctl
|
784
|
+
return ip unless ip.empty?
|
785
|
+
|
786
|
+
sleep 2
|
787
|
+
end
|
788
|
+
|
789
|
+
# We didn't manage to determine IP - return nil and
|
790
|
+
# expect SSH client to do a retry
|
791
|
+
return nil
|
778
792
|
end
|
779
793
|
|
780
794
|
# Reads the SSH port of this VM.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-parallels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Zholobov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|