vagrant-qemu 0.6.2 → 0.6.3

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: 440c288ae31987a57f90398d4b8c621ff32377ca8e6479a64e74d221fde483b3
4
- data.tar.gz: 1dbd3b2b5fcb3d0bd68f384fd9cb6bde0700552c7960e0ae79d536b6ed6b5841
3
+ metadata.gz: f81dd5d072fb839f4c777404103ebdd5ec5054d485ac1e03333cffe30f928757
4
+ data.tar.gz: 11eb4c9827ec804c3de383404c8249c0b9f5b02ac2d52a1e304c7b4719acc87d
5
5
  SHA512:
6
- metadata.gz: e067f314f5c759d43ba2a3b49980c9610847abdfbd360dfa2007e65b9eaee0d7d8f0bfd6f0a9c3e393f8b7f238499eb672376c1a8550a60e97d81d6c6f1278c4
7
- data.tar.gz: c8576beb1bbb8da421f5c4e8d4eabd4e77b536bcca3abae4b1c39d3fe47d5817589452dda06b0af492d0776133c3780f7da03004dd058e68b3358ba797bc8044
6
+ metadata.gz: '0906a95866bb2bd8206dc602242e58c21ef966fe71c428ff5eebea455065fee57c6e1b7c06ff516d1b4d54bb42b23e9e821480e096ea6f8625d477355267dcdb'
7
+ data.tar.gz: abbfa2aae80e76d9ce268db53657deaa468ab125b7b0aa2e5934c2b3cb4917ac2ff54662ea49b8f4a428815161414b9560439801845b7ac09b6479b0ead4a7b2
data/CHANGELOG.md CHANGED
@@ -195,3 +195,13 @@
195
195
  that device, just with its output discarded; `-parallel none` — now the
196
196
  default — skips creating it entirely, matching how the other default args
197
197
  (`-monitor`/`-display`/`-vga`) already disable their optional devices. (#80)
198
+
199
+ # 0.6.3 (2026-08-12)
200
+
201
+ * Fix `vagrant up` aborting with `no implicit conversion of nil into Array`
202
+ on macOS whenever `advanced_network` was enabled without also setting
203
+ `net_mode`. The default `net_mode` of `:auto` selects the vmnet backend but
204
+ was never resolved to a concrete mode, so the backend produced no `-netdev`
205
+ arguments for the private network NIC and the command line assembly blew up
206
+ before QEMU was launched. Setting `net_mode` explicitly (e.g.
207
+ `:vmnet_shared`) was the workaround. (#40)
@@ -8,8 +8,10 @@ module VagrantPlugins
8
8
  # Supports vmnet-shared, vmnet-host, vmnet-bridged
9
9
  class Vmnet < Base
10
10
  def build_netdev_args(id, options)
11
+ # :auto reaches this backend only on macOS, where it means vmnet-shared;
12
+ # net_mode is not rewritten during backend selection, so match it here.
11
13
  case options[:net_mode]
12
- when :vmnet_shared
14
+ when :vmnet_shared, :auto
13
15
  base = "vmnet-shared,id=#{id}"
14
16
  base += subnet_args(options)
15
17
  %W(-netdev #{base})
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module QEMU
3
- VERSION = '0.6.2'
3
+ VERSION = '0.6.3'
4
4
  end
5
5
  end
@@ -10,7 +10,10 @@ describe "advanced networking end-to-end", :requires_vmnet do
10
10
  end
11
11
  end
12
12
 
13
- it "VM gets the configured static IP" do
13
+ # net_mode is deliberately left at its default (:auto) here — the other
14
+ # examples cover it set explicitly. Issue #40 was reported against exactly
15
+ # this shape, which no test in any layer exercised.
16
+ it "VM gets the configured static IP with the default net_mode" do
14
17
  File.write(@work_dir.join("Vagrantfile"), <<~RUBY)
15
18
  Vagrant.configure("2") do |config|
16
19
  config.vm.box = "#{test_box_cloudinit}"
@@ -20,7 +23,6 @@ describe "advanced networking end-to-end", :requires_vmnet do
20
23
  config.vm.provider "qemu" do |qe|
21
24
  qe.memory = "2G"
22
25
  qe.advanced_network = true
23
- qe.net_mode = :vmnet_shared
24
26
  end
25
27
  end
26
28
  RUBY
@@ -67,6 +67,17 @@ describe VagrantPlugins::QEMU::Driver, "start command line (dual NIC)" do
67
67
  expect(cmd_str).to include("-netdev vmnet-shared,id=net1")
68
68
  end
69
69
 
70
+ # Regression for issue #40: the default net_mode :auto selected the Vmnet
71
+ # backend but matched none of its cases, so NIC 1 args came back nil.
72
+ it "builds NIC 1 args for the default net_mode :auto" do
73
+ allow(VagrantPlugins::QEMU::Network).to receive(:auto_detect)
74
+ .and_return(VagrantPlugins::QEMU::Network::Vmnet.new)
75
+ subject.start(advanced_options.merge(net_mode: :auto))
76
+ cmd_str = @captured_cmd.join(" ")
77
+ expect(cmd_str).to include("-netdev vmnet-shared,id=net1")
78
+ expect(cmd_str).to include("start-address=192.168.105.1")
79
+ end
80
+
70
81
  it "NIC 1 has different MAC than NIC 0" do
71
82
  subject.start(advanced_options)
72
83
  cmd_str = @captured_cmd.join(" ")
@@ -20,6 +20,12 @@ describe VagrantPlugins::QEMU::Network::Vmnet do
20
20
  expect(netdev_arg).to include("subnet-mask=255.255.255.0")
21
21
  end
22
22
 
23
+ it "treats :auto as vmnet-shared (macOS default)" do
24
+ pn = [{ ip: "192.168.105.10", netmask: "255.255.255.0" }]
25
+ args = subject.build_netdev_args("net1", net_mode: :auto, private_networks: pn)
26
+ expect(args).to eq subject.build_netdev_args("net1", net_mode: :vmnet_shared, private_networks: pn)
27
+ end
28
+
23
29
  it "builds vmnet-host args with subnet" do
24
30
  args = subject.build_netdev_args("net1",
25
31
  net_mode: :vmnet_host,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-qemu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ppggff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-22 00:00:00.000000000 Z
11
+ date: 2026-08-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Enables Vagrant to manage machines with QEMU.
14
14
  email: pgf00a@gmail.com