vagrant-qemu 0.1.2 → 0.1.6
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/CHANGELOG.md +7 -0
- data/README.md +11 -5
- data/lib/vagrant-qemu/action/start_instance.rb +1 -0
- data/lib/vagrant-qemu/config.rb +3 -0
- data/lib/vagrant-qemu/driver.rb +1 -1
- data/lib/vagrant-qemu/version.rb +1 -1
- data/vagrant-qemu.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0275c3e86c8ab803e7a99cd437b6aef40f670d885438a29f6b233323b5744876
|
|
4
|
+
data.tar.gz: 3b52bb52aa9f434683d32bd806b9bd2b6d3420e17095d999312a8921732ab9cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d52b130c592143216d4742efa5c426b75e5dc362e2c3435bb3958cebbfff9790293964ef60c8c3b44dbd786f91eae8a60c8270a2e31ee6bb256bab3d6a84f77
|
|
7
|
+
data.tar.gz: 24a12127ab0778f258f57cc80976b4e414d2b4b209d57d5d39f72f883e9b3770bdbd76ceb1c4cf9fba4aa0c2fa3f80bbb3b32c14a751e03d7e61dea0e12b0701
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -25,10 +25,10 @@ brew install qemu
|
|
|
25
25
|
Install plugin:
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
vagrant plugin install vagrant-qemu
|
|
28
|
+
vagrant plugin install vagrant-qemu
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Prepare a `Vagrantfile`, and start:
|
|
31
|
+
Prepare a `Vagrantfile`, see [Example](#example), and start:
|
|
32
32
|
|
|
33
33
|
```
|
|
34
34
|
vagrant up --provider qemu
|
|
@@ -76,7 +76,14 @@ end
|
|
|
76
76
|
|
|
77
77
|
## Example
|
|
78
78
|
|
|
79
|
-
1.
|
|
79
|
+
1. Try with a sample box
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
vagrant init ppggff/centos-7-aarch64-2009-4K
|
|
83
|
+
vagrant up --provider qemu
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
2. With a local box
|
|
80
87
|
|
|
81
88
|
```
|
|
82
89
|
# Basic Vagrant config (API version 2)
|
|
@@ -87,7 +94,7 @@ Vagrant.configure(2) do |config|
|
|
|
87
94
|
end
|
|
88
95
|
```
|
|
89
96
|
|
|
90
|
-
|
|
97
|
+
3. With a local qcow2
|
|
91
98
|
|
|
92
99
|
```
|
|
93
100
|
# Basic Vagrant config (API version 2)
|
|
@@ -118,7 +125,6 @@ bundle exec rake build
|
|
|
118
125
|
|
|
119
126
|
## TODO
|
|
120
127
|
|
|
121
|
-
* Support example image
|
|
122
128
|
* Support NFS shared folder
|
|
123
129
|
* Support package VM to box
|
|
124
130
|
* Test on more architectures
|
|
@@ -18,6 +18,7 @@ module VagrantPlugins
|
|
|
18
18
|
:cpu => env[:machine].provider_config.cpu,
|
|
19
19
|
:smp => env[:machine].provider_config.smp,
|
|
20
20
|
:memory => env[:machine].provider_config.memory,
|
|
21
|
+
:net_device => env[:machine].provider_config.net_device,
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
env[:ui].output(I18n.t("vagrant_qemu.starting"))
|
data/lib/vagrant-qemu/config.rb
CHANGED
|
@@ -9,6 +9,7 @@ module VagrantPlugins
|
|
|
9
9
|
attr_accessor :cpu
|
|
10
10
|
attr_accessor :smp
|
|
11
11
|
attr_accessor :memory
|
|
12
|
+
attr_accessor :net_device
|
|
12
13
|
attr_accessor :image_path
|
|
13
14
|
attr_accessor :qemu_dir
|
|
14
15
|
|
|
@@ -19,6 +20,7 @@ module VagrantPlugins
|
|
|
19
20
|
@cpu = UNSET_VALUE
|
|
20
21
|
@smp = UNSET_VALUE
|
|
21
22
|
@memory = UNSET_VALUE
|
|
23
|
+
@net_device = UNSET_VALUE
|
|
22
24
|
@image_path = UNSET_VALUE
|
|
23
25
|
@qemu_dir = UNSET_VALUE
|
|
24
26
|
end
|
|
@@ -39,6 +41,7 @@ module VagrantPlugins
|
|
|
39
41
|
@cpu = "cortex-a72" if @cpu == UNSET_VALUE
|
|
40
42
|
@smp = "2" if @smp == UNSET_VALUE
|
|
41
43
|
@memory = "4G" if @memory == UNSET_VALUE
|
|
44
|
+
@net_device = "virtio-net-device" if @net_device == UNSET_VALUE
|
|
42
45
|
@image_path = nil if @image_path == UNSET_VALUE
|
|
43
46
|
@qemu_dir = "/opt/homebrew/share/qemu" if @qemu_dir == UNSET_VALUE
|
|
44
47
|
end
|
data/lib/vagrant-qemu/driver.rb
CHANGED
|
@@ -50,7 +50,7 @@ module VagrantPlugins
|
|
|
50
50
|
cmd += %W(-cpu #{options[:cpu]})
|
|
51
51
|
cmd += %W(-smp #{options[:smp]})
|
|
52
52
|
cmd += %W(-m #{options[:memory]})
|
|
53
|
-
cmd += %W(-device
|
|
53
|
+
cmd += %W(-device #{options[:net_device]},netdev=net0)
|
|
54
54
|
cmd += %W(-netdev user,id=net0,hostfwd=tcp::#{options[:ssh_port]}-:22)
|
|
55
55
|
|
|
56
56
|
# drive
|
data/lib/vagrant-qemu/version.rb
CHANGED
data/vagrant-qemu.gemspec
CHANGED
|
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
|
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
|
8
8
|
s.license = "MIT"
|
|
9
9
|
s.authors = "ppggff"
|
|
10
|
-
s.email = "pgf00a@gmail.com
|
|
11
|
-
s.homepage = ""
|
|
10
|
+
s.email = "pgf00a@gmail.com"
|
|
11
|
+
s.homepage = "https://github.com/ppggff/vagrant-qemu"
|
|
12
12
|
s.summary = "Enables Vagrant to manage machines with QEMU."
|
|
13
13
|
s.description = "Enables Vagrant to manage machines with QEMU."
|
|
14
14
|
|
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-qemu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ppggff
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-01-
|
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Enables Vagrant to manage machines with QEMU.
|
|
14
|
-
email: pgf00a@gmail.com
|
|
14
|
+
email: pgf00a@gmail.com
|
|
15
15
|
executables: []
|
|
16
16
|
extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
|
@@ -42,7 +42,7 @@ files:
|
|
|
42
42
|
- lib/vagrant-qemu/version.rb
|
|
43
43
|
- locales/en.yml
|
|
44
44
|
- vagrant-qemu.gemspec
|
|
45
|
-
homepage:
|
|
45
|
+
homepage: https://github.com/ppggff/vagrant-qemu
|
|
46
46
|
licenses:
|
|
47
47
|
- MIT
|
|
48
48
|
metadata: {}
|