vagrant-qemu 0.6.1 → 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: a7af3fcc9e9a9210bea30f44da695c87fbd15c24eed79de64540bb01ec5d4842
4
- data.tar.gz: 805730ceb9574de982d6c20f4b8a7e04c37b13fbdc47ca902ddde6fcf844fef5
3
+ metadata.gz: f81dd5d072fb839f4c777404103ebdd5ec5054d485ac1e03333cffe30f928757
4
+ data.tar.gz: 11eb4c9827ec804c3de383404c8249c0b9f5b02ac2d52a1e304c7b4719acc87d
5
5
  SHA512:
6
- metadata.gz: d9613c43e9ea63da345bf0745b3825578cb9d32a8e9465b91a9beea36c571e085d9a325675d28e1a98fe655fbabffb0b29f8e6107e90a13dc504ba83e1b007c8
7
- data.tar.gz: 96a64e28147f0a7c6c7994695d8b423088f7f3eb80c18288d2652120e24c5479d88d9d407455f10e0ab252a7cacbf0fb2f0c0ef2a22a403c625d3826d5002ec5
6
+ metadata.gz: '0906a95866bb2bd8206dc602242e58c21ef966fe71c428ff5eebea455065fee57c6e1b7c06ff516d1b4d54bb42b23e9e821480e096ea6f8625d477355267dcdb'
7
+ data.tar.gz: abbfa2aae80e76d9ce268db53657deaa468ab125b7b0aa2e5934c2b3cb4917ac2ff54662ea49b8f4a428815161414b9560439801845b7ac09b6479b0ead4a7b2
data/CHANGELOG.md CHANGED
@@ -186,3 +186,22 @@
186
186
  core `cloud_init` user-data config, i.e. the `net_mode` examples above)
187
187
  being re-registered as a duplicate disk on every same-process reload,
188
188
  hitting the same QEMU write-lock error via a different disk.
189
+
190
+ # 0.6.2 (2026-07-22)
191
+
192
+ * Fix the default QEMU args crashing the VM on distros whose qemu-kvm build
193
+ doesn't include the legacy parallel port device (e.g. Rocky Linux, and
194
+ likely RHEL and other derivatives). `-parallel null` still instantiates
195
+ that device, just with its output discarded; `-parallel none` — now the
196
+ default — skips creating it entirely, matching how the other default args
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)
@@ -120,7 +120,7 @@ module VagrantPlugins
120
120
  @debug_port = nil if @debug_port == UNSET_VALUE
121
121
  @no_daemonize = false if @no_daemonize == UNSET_VALUE
122
122
  @firmware_format = "raw" if @firmware_format == UNSET_VALUE
123
- @other_default = %W(-parallel null -monitor none -display none -vga none) if @other_default == UNSET_VALUE
123
+ @other_default = %W(-parallel none -monitor none -display none -vga none) if @other_default == UNSET_VALUE
124
124
  @extra_image_opts = nil if @extra_image_opts == UNSET_VALUE
125
125
  @graceful_timeout = 60 if @graceful_timeout == UNSET_VALUE
126
126
  @advanced_network = false if @advanced_network == UNSET_VALUE
@@ -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.1'
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
@@ -50,6 +50,15 @@ describe VagrantPlugins::QEMU::Config do
50
50
  it "ssh_port stays 50022 regardless of host" do
51
51
  expect(finalized(host_arch: "x86_64", host_accel: "kvm").ssh_port).to eq 50022
52
52
  end
53
+
54
+ it "disables the parallel port instead of attaching a null-backed device" do
55
+ # "-parallel null" still instantiates the isa-parallel device (guest sees
56
+ # it, output discarded); some distro qemu-kvm builds (e.g. Rocky/RHEL)
57
+ # don't compile that device in, so instantiating it crashes. "none" skips
58
+ # device creation entirely and works everywhere.
59
+ expect(finalized(host_arch: "x86_64", host_accel: "kvm").other_default)
60
+ .to eq %w(-parallel none -monitor none -display none -vga none)
61
+ end
53
62
  end
54
63
 
55
64
  describe "#default_qemu_dir" do
@@ -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.1
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