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 +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +3 -0
- data/README.md +3 -1
- data/lib/vagrant-qemu/action/start_instance.rb +1 -0
- data/lib/vagrant-qemu/config.rb +3 -0
- data/lib/vagrant-qemu/driver.rb +2 -1
- data/lib/vagrant-qemu/version.rb +1 -1
- data/vagrant-qemu.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e058e7e0ade14ed01928a0a1f6132cd114091bfeb6d609adcd560c82be77262
|
4
|
+
data.tar.gz: e0c795473dce2bc209fdb199983b63d1ed90533fda753db18e3ebce8a41a7e40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbff7dc3f75ef9432aa1a1cc80ad8246d69c596cfc4a1182727a6bb6b2f67ce0529438addee24672d1bde65268d2c6ce502501df64059ce788d91414b2d872bb
|
7
|
+
data.tar.gz: 70ad6126a2d9132e0a91a0ec968110e4a16eded9a183cad842bb35b5c4aa568d0a278eb5a6356bd1b03baeceb9cb3a629e799bf7d95b0b917c8e553ec58c29a7
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
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 = "
|
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),
|
data/lib/vagrant-qemu/config.rb
CHANGED
@@ -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
|
data/lib/vagrant-qemu/driver.rb
CHANGED
@@ -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
|
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
|
data/lib/vagrant-qemu/version.rb
CHANGED
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.
|
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:
|
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.
|