vagrant-qemu 0.3.3 → 0.3.4

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: ee5e88ebb3cd884abc825a1e7d9911f70e2539439806e8b9c41f7f6dacd38431
4
- data.tar.gz: cd7ab93955848c5b575e4516b64a902aa9051d053bd9a468aad3f1dab37c269b
3
+ metadata.gz: 1e058e7e0ade14ed01928a0a1f6132cd114091bfeb6d609adcd560c82be77262
4
+ data.tar.gz: e0c795473dce2bc209fdb199983b63d1ed90533fda753db18e3ebce8a41a7e40
5
5
  SHA512:
6
- metadata.gz: 6145c635a8363bf5c7f3aefed1533eb705d4193e9d03bd0a83707b36434791b223c8d4c8dcb3ce0494e4971c35cae74e1ccb9f23fdec6e96d4e803bbea8524fc
7
- data.tar.gz: '08a89b1e3ec0bd8b3bd7d40d98ded3f8f4fdaa853970e4ec0bd6ad83acae269b0b42196569884354f38f6741d92510fa33c42dd258e28e03df1ffc4fc9d9c2a0'
6
+ metadata.gz: bbff7dc3f75ef9432aa1a1cc80ad8246d69c596cfc4a1182727a6bb6b2f67ce0529438addee24672d1bde65268d2c6ce502501df64059ce788d91414b2d872bb
7
+ data.tar.gz: 70ad6126a2d9132e0a91a0ec968110e4a16eded9a183cad842bb35b5c4aa568d0a278eb5a6356bd1b03baeceb9cb3a629e799bf7d95b0b917c8e553ec58c29a7
data/.gitignore CHANGED
@@ -11,6 +11,8 @@ pkg/*
11
11
  tags
12
12
  Gemfile.lock
13
13
  vendor
14
+ vendor/**
15
+ vendor/**/*
14
16
 
15
17
  # Vagrant
16
18
  .vagrant
data/CHANGELOG.md CHANGED
@@ -55,3 +55,6 @@
55
55
 
56
56
  * Fix a compatibility issue about ruby 3.x
57
57
 
58
+ # 0.3.4 (2023-03-09)
59
+
60
+ * Add config 'drive_interface'.
data/README.md CHANGED
@@ -13,6 +13,7 @@ Tested:
13
13
  * QEMU >= 7.0.0
14
14
  * CentOS (centos-7-aarch64-2009-4K)
15
15
  * Ubuntu (see [Wiki](https://github.com/ppggff/vagrant-qemu/wiki) for detais)
16
+ * Debian buster64 on x86_64 (see [Wiki](https://github.com/ppggff/vagrant-qemu/wiki) for detais)
16
17
 
17
18
  Others:
18
19
 
@@ -83,6 +84,7 @@ This provider exposes a few provider-specific configuration options:
83
84
  * `memory` - The memory setting of VM, default: `4G`
84
85
  * debug/expert
85
86
  * `net_device` - The network device, default: `virtio-net-device`
87
+ * `drive_interface` - The interface type for the main drive, default `virtio`
86
88
  * `image_path` - The path to qcow2 image for box-less VM, default is nil value
87
89
  * `qemu_dir` - The path to QEMU's install dir, default: `/opt/homebrew/share/qemu`
88
90
  * `extra_qemu_args` - The raw list of additional arguments to pass to QEMU. Use with extreme caution. (see "Force Multicore" below as example)
@@ -147,7 +149,7 @@ Vagrant.configure(2) do |config|
147
149
  config.vm.provider "qemu" do |qe|
148
150
  qe.arch = "x86_64"
149
151
  qe.machine = "q35"
150
- qe.cpu = "max"
152
+ qe.cpu = "qemu64"
151
153
  qe.net_device = "virtio-net-pci"
152
154
  end
153
155
  end
@@ -19,6 +19,7 @@ module VagrantPlugins
19
19
  :smp => env[:machine].provider_config.smp,
20
20
  :memory => env[:machine].provider_config.memory,
21
21
  :net_device => env[:machine].provider_config.net_device,
22
+ :drive_interface => env[:machine].provider_config.drive_interface,
22
23
  :extra_qemu_args => env[:machine].provider_config.extra_qemu_args,
23
24
  :extra_netdev_args => env[:machine].provider_config.extra_netdev_args,
24
25
  :ports => forwarded_ports(env),
@@ -10,6 +10,7 @@ module VagrantPlugins
10
10
  attr_accessor :smp
11
11
  attr_accessor :memory
12
12
  attr_accessor :net_device
13
+ attr_accessor :drive_interface
13
14
  attr_accessor :image_path
14
15
  attr_accessor :qemu_dir
15
16
  attr_accessor :extra_qemu_args
@@ -26,6 +27,7 @@ module VagrantPlugins
26
27
  @smp = UNSET_VALUE
27
28
  @memory = UNSET_VALUE
28
29
  @net_device = UNSET_VALUE
30
+ @drive_interface = UNSET_VALUE
29
31
  @image_path = UNSET_VALUE
30
32
  @qemu_dir = UNSET_VALUE
31
33
  @extra_qemu_args = UNSET_VALUE
@@ -52,6 +54,7 @@ module VagrantPlugins
52
54
  @smp = "2" if @smp == UNSET_VALUE
53
55
  @memory = "4G" if @memory == UNSET_VALUE
54
56
  @net_device = "virtio-net-device" if @net_device == UNSET_VALUE
57
+ @drive_interface = "virtio" if @drive_interface == UNSET_VALUE
55
58
  @image_path = nil if @image_path == UNSET_VALUE
56
59
  @qemu_dir = "/opt/homebrew/share/qemu" if @qemu_dir == UNSET_VALUE
57
60
  @extra_qemu_args = [] if @extra_qemu_args == UNSET_VALUE
@@ -89,7 +89,7 @@ module VagrantPlugins
89
89
  cmd += %W(-netdev user,id=net0,#{hostfwd}#{extra_netdev})
90
90
 
91
91
  # drive
92
- cmd += %W(-drive if=virtio,format=qcow2,file=#{image_path})
92
+ cmd += %W(-drive if=#{options[:drive_interface]},format=qcow2,file=#{image_path})
93
93
  if options[:arch] == "aarch64"
94
94
  fm1_path = id_dir.join("edk2-aarch64-code.fd").to_s
95
95
  fm2_path = id_dir.join("edk2-arm-vars.fd").to_s
@@ -149,6 +149,7 @@ module VagrantPlugins
149
149
  if options[:arch] == "aarch64"
150
150
  execute("cp", options[:qemu_dir].join("edk2-aarch64-code.fd").to_s, id_dir.join("edk2-aarch64-code.fd").to_s)
151
151
  execute("cp", options[:qemu_dir].join("edk2-arm-vars.fd").to_s, id_dir.join("edk2-arm-vars.fd").to_s)
152
+ execute("chmod", "644", id_dir.join("edk2-arm-vars.fd").to_s)
152
153
  end
153
154
 
154
155
  # Create image
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module QEMU
3
- VERSION = '0.3.3'
3
+ VERSION = '0.3.4'
4
4
  end
5
5
  end
data/vagrant-qemu.gemspec CHANGED
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
41
41
  # as git).
42
42
  #
43
43
  gitignore.any? do |ignore|
44
- File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
44
+ File.fnmatch(ignore, file, File::FNM_PATHNAME|File::FNM_DOTMATCH) ||
45
45
  File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
46
46
  end
47
47
  end
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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ppggff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-11 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Enables Vagrant to manage machines with QEMU.
14
14
  email: pgf00a@gmail.com
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: 1.3.6
64
64
  requirements: []
65
- rubygems_version: 3.0.3
65
+ rubygems_version: 3.0.3.1
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Enables Vagrant to manage machines with QEMU.