vagrant 2.4.6 → 2.4.8
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 +21 -0
- data/lib/vagrant/action/builtin/box_add.rb +1 -1
- data/lib/vagrant/util/guest_networks.rb +18 -8
- data/plugins/guests/linux/cap/persist_mount_shared_folder.rb +9 -1
- data/plugins/providers/docker/action/create.rb +10 -3
- data/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 +29 -7
- data/templates/locales/en.yml +5 -6
- data/version.txt +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: f19af437fb31a0585525e07e85ce91a5228f36e18d8b2eebf8ee1741f3b7a0c3
|
4
|
+
data.tar.gz: 3baa2535360dac9edde5b875852e8288bbff83f6cd690ddd0faa08040f13f8cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 104b578f8065c53dd04b9896b745deec55f3b4fd31ae15f960c79be9392871082ce48c2e4e354977f1349d042da51b852c42410c106dc7d8b3927bdb3829874d
|
7
|
+
data.tar.gz: 938479a8ef6fc6b425cb873ce8b561be0288dbd5cebbb3543d2c887ae97ea4df68159540ada26ced866d9728419bf9c3266cd5a8d61c07e1f8cfb3c56fb8d333
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## 2.4.8 (August 05, 2025)
|
2
|
+
|
3
|
+
IMPROVEMENTS:
|
4
|
+
|
5
|
+
- core: Improve error message when no matching provider is found for a box [GH-13693]
|
6
|
+
- core: Improve error message on box add failures [GH-13687]
|
7
|
+
|
8
|
+
BUG FIXES:
|
9
|
+
|
10
|
+
- core: Fix box add action when adding a box directly from a file [GH-13699]
|
11
|
+
- provider/hyperv: Fix XML configuration parsing logic, and add additional checks for minimum amount of memory and CPU [GH-13691]
|
12
|
+
- core: Fix guest network configuration when more than one network interface is present [GH-13686]
|
13
|
+
|
14
|
+
## 2.4.7 (June 17, 2025)
|
15
|
+
|
16
|
+
BUG FIXES:
|
17
|
+
|
18
|
+
- guests/linux: Fix /etc/fstab clean up behavior [GH-13681]
|
19
|
+
- provider/docker: Fix auto generated container names [GH-13678]
|
20
|
+
- provider/hyperv: Fix import for XML based configuration [GH-13674]
|
21
|
+
|
1
22
|
## 2.4.6 (May 21, 2025)
|
2
23
|
|
3
24
|
IMPROVEMENTS:
|
@@ -16,14 +16,7 @@ module Vagrant
|
|
16
16
|
net_configs = machine.config.vm.networks.find_all { |type, _| type.to_s.end_with?("_network") }.map(&:last)
|
17
17
|
|
18
18
|
# Get IDs of currently configured devices
|
19
|
-
current_devs =
|
20
|
-
comm.execute("nmcli -t c show") do |type, data|
|
21
|
-
if type == :stdout
|
22
|
-
_, id, _, dev = data.strip.split(":")
|
23
|
-
cd[dev] = id
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
19
|
+
current_devs = get_current_devices(comm)
|
27
20
|
|
28
21
|
networks.each.with_index do |network, i|
|
29
22
|
net_opts = (net_configs[i] || {}).merge(network)
|
@@ -101,6 +94,23 @@ module Vagrant
|
|
101
94
|
end
|
102
95
|
end
|
103
96
|
end
|
97
|
+
|
98
|
+
# Get all network devices currently managed by NetworkManager.
|
99
|
+
# @param [Vagrant::Plugin::V2::Communicator] comm Guest communicator
|
100
|
+
# @return [Hash] A hash of current device names and their associated IDs.
|
101
|
+
def get_current_devices(comm)
|
102
|
+
{}.tap do |cd|
|
103
|
+
comm.execute("nmcli -t c show") do |type, data|
|
104
|
+
if type == :stdout
|
105
|
+
data.strip.lines.map(&:chomp).each do |line|
|
106
|
+
next if line.strip.empty?
|
107
|
+
_, id, _, dev = line.strip.split(':')
|
108
|
+
cd[dev] = id
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
104
114
|
end
|
105
115
|
end
|
106
116
|
end
|
@@ -64,9 +64,17 @@ module VagrantPlugins
|
|
64
64
|
machine.communicate.test("test -f /etc/fstab")
|
65
65
|
end
|
66
66
|
|
67
|
+
def self.contains_vagrant_data?(machine)
|
68
|
+
machine.communicate.test("grep '#VAGRANT-BEGIN' /etc/fstab")
|
69
|
+
end
|
70
|
+
|
67
71
|
def self.remove_vagrant_managed_fstab(machine)
|
68
72
|
if fstab_exists?(machine)
|
69
|
-
machine
|
73
|
+
if contains_vagrant_data?(machine)
|
74
|
+
machine.communicate.sudo("sed -i '/\#VAGRANT-BEGIN/,/\#VAGRANT-END/d' /etc/fstab")
|
75
|
+
else
|
76
|
+
@@logger.info("no vagrant data in fstab file, carrying on")
|
77
|
+
end
|
70
78
|
else
|
71
79
|
@@logger.info("no fstab file found, carrying on")
|
72
80
|
end
|
@@ -91,9 +91,7 @@ module VagrantPlugins
|
|
91
91
|
def create_params
|
92
92
|
container_name = @provider_config.name
|
93
93
|
if !container_name
|
94
|
-
container_name =
|
95
|
-
container_name.gsub!(/[^-a-z0-9_]/i, "")
|
96
|
-
container_name << "_#{Time.now.to_i}"
|
94
|
+
container_name = generate_container_name
|
97
95
|
end
|
98
96
|
|
99
97
|
image = @env[:create_image]
|
@@ -156,6 +154,15 @@ module VagrantPlugins
|
|
156
154
|
|
157
155
|
result
|
158
156
|
end
|
157
|
+
|
158
|
+
def generate_container_name
|
159
|
+
container_name = "#{@env[:root_path].basename.to_s}_#{@machine.name}"
|
160
|
+
# Remove leading -/_ and any non-alphanumeric, non-hyphen/underscore characters
|
161
|
+
container_name.gsub!(/\A[^a-zA-Z0-9]+|[^-a-z0-9_]/i, "")
|
162
|
+
container_name << "_#{Time.now.to_i}"
|
163
|
+
container_name
|
164
|
+
end
|
165
|
+
|
159
166
|
end
|
160
167
|
end
|
161
168
|
end
|
@@ -224,6 +224,12 @@ function New-VagrantVMXML {
|
|
224
224
|
[string] $SourcePath,
|
225
225
|
[parameter (Mandatory=$false)]
|
226
226
|
[bool] $LinkedClone = $false,
|
227
|
+
[parameter (Mandatory=$false)]
|
228
|
+
[int] $Memory = $null,
|
229
|
+
[parameter (Mandatory=$false)]
|
230
|
+
[int] $MaxMemory = $null,
|
231
|
+
[parameter (Mandatory=$false)]
|
232
|
+
[int] $CPUCount = $null,
|
227
233
|
[parameter(Mandatory=$false)]
|
228
234
|
[string] $VMName
|
229
235
|
)
|
@@ -327,19 +333,35 @@ function New-VagrantVMXML {
|
|
327
333
|
|
328
334
|
# Apply original VM configuration to new VM instance
|
329
335
|
|
330
|
-
$
|
336
|
+
if($CPUCount -ne $null -and $CPUCount -gt 0) {
|
337
|
+
$processors = $CPUCount
|
338
|
+
} else {
|
339
|
+
$processors = $VMConfig.configuration.settings.processors.count."#text"
|
340
|
+
}
|
331
341
|
$notes = (Select-Xml -XML $VMConfig -XPath "//notes").node."#text"
|
332
|
-
$
|
333
|
-
if ($
|
342
|
+
$memoryNode = (Select-Xml -XML $VMConfig -XPath "//memory").node.bank
|
343
|
+
if ($memoryNode.dynamic_memory_enabled."#text" -eq "True") {
|
334
344
|
$dynamicmemory = $True
|
335
345
|
}
|
336
346
|
else {
|
337
347
|
$dynamicmemory = $False
|
338
348
|
}
|
339
|
-
|
340
|
-
|
341
|
-
$
|
342
|
-
|
349
|
+
|
350
|
+
|
351
|
+
if($Memory -ne $null -and $Memory -gt 0) {
|
352
|
+
$MemoryMaximumBytes = $Memory * 1MB
|
353
|
+
$MemoryStartupBytes = $Memory * 1MB
|
354
|
+
$MemoryMinimumBytes = $Memory * 1MB
|
355
|
+
} else {
|
356
|
+
$MemoryMaximumBytes = ($memoryNode.limit."#text" -as [int]) * 1MB
|
357
|
+
$MemoryStartupBytes = ($memoryNode.size."#text" -as [int]) * 1MB
|
358
|
+
$MemoryMinimumBytes = ($memoryNode.reservation."#text" -as [int]) * 1MB
|
359
|
+
}
|
360
|
+
|
361
|
+
if($MaxMemory -ne $null -and $MaxMemory -gt 0) {
|
362
|
+
$dynamicmemory = $true
|
363
|
+
$MemoryMaximumBytes = $MaxMemory * 1MB
|
364
|
+
}
|
343
365
|
|
344
366
|
$Config = @{
|
345
367
|
ProcessorCount = $processors;
|
data/templates/locales/en.yml
CHANGED
@@ -504,7 +504,7 @@ en:
|
|
504
504
|
provider. Double-check your requested provider to verify you didn't
|
505
505
|
simply misspell it.
|
506
506
|
|
507
|
-
If you're adding a box from HashiCorp's Vagrant
|
507
|
+
If you're adding a box from HashiCorp's Vagrant Public Registry, make sure the box is
|
508
508
|
released.
|
509
509
|
|
510
510
|
Name: %{name}
|
@@ -556,11 +556,10 @@ en:
|
|
556
556
|
Constraints: %{constraints}
|
557
557
|
Available versions: %{versions}
|
558
558
|
box_add_short_not_found: |-
|
559
|
-
The box '%{name}' could not be found or
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
URL and error message are shown below:
|
559
|
+
The box '%{name}' could not be found or could not be accessed in the remote catalog.
|
560
|
+
If this is a private box on the HashiCorp Vagrant Public Registry, please verify
|
561
|
+
you're logged in via `vagrant cloud auth login`. Also, please double-check the name.
|
562
|
+
The expanded URL and error message are shown below:
|
564
563
|
|
565
564
|
URL: %{url}
|
566
565
|
Error: %{error}
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.8
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-05
|
12
|
+
date: 2025-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: base64
|