vagrant 2.4.6 → 2.4.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a92c20e5a3d39c9d5da86eb148a11f8217cf57c7f8a248efd9837f3b74266022
|
4
|
+
data.tar.gz: de063590a0b3d8704def63c7f96f17400094034c8819cb69cadf9f2a7ae5cb38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa7ce2d66db74feb9271cb3cfec80bddc763bb03941093735fe30e9f77b80fc06b21108bf3c7b57b5bfa5cb1176f4d444231d24124dc5141ffcd9cdb65cb567d
|
7
|
+
data.tar.gz: bda8216b65f5493b51e9e3578b7e3636b40b717c6ecdcfbe13bdf5f87ea8e41eaa220cdedefdb78baba6d64bffa3e6e0d8ed2e730f5cb320e0ae8c4f71b787e4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 2.4.7 (June 17, 2025)
|
2
|
+
|
3
|
+
BUG FIXES:
|
4
|
+
|
5
|
+
- guests/linux: Fix /etc/fstab clean up behavior [GH-13681]
|
6
|
+
- provider/docker: Fix auto generated container names [GH-13678]
|
7
|
+
- provider/hyperv: Fix import for XML based configuration [GH-13674]
|
8
|
+
|
1
9
|
## 2.4.6 (May 21, 2025)
|
2
10
|
|
3
11
|
IMPROVEMENTS:
|
@@ -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,7 +333,11 @@ function New-VagrantVMXML {
|
|
327
333
|
|
328
334
|
# Apply original VM configuration to new VM instance
|
329
335
|
|
330
|
-
$
|
336
|
+
if($CPUCount -ne $null) {
|
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
342
|
$memory = (Select-Xml -XML $VMConfig -XPath "//memory").node.Bank
|
333
343
|
if ($memory.dynamic_memory_enabled."#text" -eq "True") {
|
@@ -336,10 +346,22 @@ function New-VagrantVMXML {
|
|
336
346
|
else {
|
337
347
|
$dynamicmemory = $False
|
338
348
|
}
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
349
|
+
|
350
|
+
|
351
|
+
if($Memory -ne $null) {
|
352
|
+
$MemoryMaximumBytes = $Memory * 1MB
|
353
|
+
$MemoryStartupBytes = $Memory * 1MB
|
354
|
+
$MemoryMinimumBytes = $Memory * 1MB
|
355
|
+
} else {
|
356
|
+
$MemoryMaximumBytes = ($memory.limit."#text" -as [int]) * 1MB
|
357
|
+
$MemoryStartupBytes = ($memory.size."#text" -as [int]) * 1MB
|
358
|
+
$MemoryMinimumBytes = ($memory.reservation."#text" -as [int]) * 1MB
|
359
|
+
}
|
360
|
+
|
361
|
+
if($MaxMemory -ne $null) {
|
362
|
+
$dynamicmemory = $true
|
363
|
+
$MemoryMaximumBytes = $MaxMemory * 1MB
|
364
|
+
}
|
343
365
|
|
344
366
|
$Config = @{
|
345
367
|
ProcessorCount = $processors;
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.7
|
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.7
|
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-
|
12
|
+
date: 2025-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: base64
|