vagrant 2.4.7 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a92c20e5a3d39c9d5da86eb148a11f8217cf57c7f8a248efd9837f3b74266022
4
- data.tar.gz: de063590a0b3d8704def63c7f96f17400094034c8819cb69cadf9f2a7ae5cb38
3
+ metadata.gz: f19af437fb31a0585525e07e85ce91a5228f36e18d8b2eebf8ee1741f3b7a0c3
4
+ data.tar.gz: 3baa2535360dac9edde5b875852e8288bbff83f6cd690ddd0faa08040f13f8cc
5
5
  SHA512:
6
- metadata.gz: fa7ce2d66db74feb9271cb3cfec80bddc763bb03941093735fe30e9f77b80fc06b21108bf3c7b57b5bfa5cb1176f4d444231d24124dc5141ffcd9cdb65cb567d
7
- data.tar.gz: bda8216b65f5493b51e9e3578b7e3636b40b717c6ecdcfbe13bdf5f87ea8e41eaa220cdedefdb78baba6d64bffa3e6e0d8ed2e730f5cb320e0ae8c4f71b787e4
6
+ metadata.gz: 104b578f8065c53dd04b9896b745deec55f3b4fd31ae15f960c79be9392871082ce48c2e4e354977f1349d042da51b852c42410c106dc7d8b3927bdb3829874d
7
+ data.tar.gz: 938479a8ef6fc6b425cb873ce8b561be0288dbd5cebbb3543d2c887ae97ea4df68159540ada26ced866d9728419bf9c3266cd5a8d61c07e1f8cfb3c56fb8d333
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
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
+
1
14
  ## 2.4.7 (June 17, 2025)
2
15
 
3
16
  BUG FIXES:
@@ -192,7 +192,7 @@ module Vagrant
192
192
  env,
193
193
  checksum: env[:box_checksum],
194
194
  checksum_type: env[:box_checksum_type],
195
- architecture: env[:architecture]
195
+ architecture: env[:box_architecture]
196
196
  )
197
197
  end
198
198
 
@@ -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 = Hash.new.tap do |cd|
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
@@ -333,14 +333,14 @@ function New-VagrantVMXML {
333
333
 
334
334
  # Apply original VM configuration to new VM instance
335
335
 
336
- if($CPUCount -ne $null) {
336
+ if($CPUCount -ne $null -and $CPUCount -gt 0) {
337
337
  $processors = $CPUCount
338
338
  } else {
339
339
  $processors = $VMConfig.configuration.settings.processors.count."#text"
340
340
  }
341
341
  $notes = (Select-Xml -XML $VMConfig -XPath "//notes").node."#text"
342
- $memory = (Select-Xml -XML $VMConfig -XPath "//memory").node.Bank
343
- if ($memory.dynamic_memory_enabled."#text" -eq "True") {
342
+ $memoryNode = (Select-Xml -XML $VMConfig -XPath "//memory").node.bank
343
+ if ($memoryNode.dynamic_memory_enabled."#text" -eq "True") {
344
344
  $dynamicmemory = $True
345
345
  }
346
346
  else {
@@ -348,17 +348,17 @@ function New-VagrantVMXML {
348
348
  }
349
349
 
350
350
 
351
- if($Memory -ne $null) {
351
+ if($Memory -ne $null -and $Memory -gt 0) {
352
352
  $MemoryMaximumBytes = $Memory * 1MB
353
353
  $MemoryStartupBytes = $Memory * 1MB
354
354
  $MemoryMinimumBytes = $Memory * 1MB
355
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
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
359
  }
360
360
 
361
- if($MaxMemory -ne $null) {
361
+ if($MaxMemory -ne $null -and $MaxMemory -gt 0) {
362
362
  $dynamicmemory = $true
363
363
  $MemoryMaximumBytes = $MaxMemory * 1MB
364
364
  }
@@ -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 Cloud, make sure the box is
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
- could not be accessed in the remote catalog. If this is a private
561
- box on HashiCorp's Vagrant Cloud, please verify you're logged in via
562
- `vagrant login`. Also, please double-check the name. The expanded
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.7
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.7
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-06-17 00:00:00.000000000 Z
12
+ date: 2025-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: base64