vagrant-libvirt 0.0.38 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec76a65b6a28f5c9f4160ed84a12d4ed452e125d
4
- data.tar.gz: 1cb52a45beb2a74567a70b8633fbddb2581745ac
3
+ metadata.gz: 8cef6e96e357a1191f1b10a513d7a58154f6ed60
4
+ data.tar.gz: 8829ceb3cb02ff4034a7a04db4bdff058a30c500
5
5
  SHA512:
6
- metadata.gz: a4d955916b17fb3a513d091fe031435d293e766c6ae2cb87af4b6e49e23a4daa0388afc3596d64e7733d052c22cfdf6a699471039dd6b358d6202f9594f276ea
7
- data.tar.gz: '092d61e503d19f5a7ff51e6ab36af403f1dcba747ee5a7f5e0695199bf1e82aaf28c9b29b7ea9901d62f0dab748b2bd8caff34bae3cb47e75e8ed60fcb44a92f'
6
+ metadata.gz: ec1a305e16d78c78cca37084ff07cf0f840ad5c502530ef255e63894f9178c48a34a9f544e125694358bbb870a5ed3e4e67d287187823400b1e8a84ac59392c9
7
+ data.tar.gz: c8226c363be4311b61d0b9d1cbcf14ff08e6776790e4a016824fb727dc6db05b39588163bd5e99b0904ee11bdbd7f2dcc738f279af25738a702cdfb9a8282728
data/README.md CHANGED
@@ -1220,6 +1220,20 @@ Vagrant.configure(2) do |config|
1220
1220
  end
1221
1221
  ```
1222
1222
 
1223
+ ## Custom command line arguments
1224
+ You can also specify multiple qemuargs arguments for qemu-system
1225
+
1226
+ * `value` - Value
1227
+
1228
+ ```ruby
1229
+ Vagrant.configure("2") do |config|
1230
+ config.vm.provider :libvirt do |libvirt|
1231
+ libvirt.qemuargs :value => "-device"
1232
+ libvirt.qemuargs :value => "intel-iommu"
1233
+ end
1234
+ end
1235
+ ```
1236
+
1223
1237
  ## Box Format
1224
1238
 
1225
1239
  You can view an example box in the
@@ -88,9 +88,9 @@ module VagrantPlugins
88
88
 
89
89
  # PCI device passthrough
90
90
  @pcis = config.pcis
91
-
91
+
92
92
  # Watchdog device
93
- @watchdog_dev = config.watchdog_dev
93
+ @watchdog_dev = config.watchdog_dev
94
94
 
95
95
  # USB device passthrough
96
96
  @usbs = config.usbs
@@ -102,6 +102,9 @@ module VagrantPlugins
102
102
  # smartcard device
103
103
  @smartcard_dev = config.smartcard_dev
104
104
 
105
+ # qemuargs
106
+ @qemuargs = config.qemuargs
107
+
105
108
  # RNG device passthrough
106
109
  @rng = config.rng
107
110
 
@@ -280,6 +283,14 @@ module VagrantPlugins
280
283
  env[:ui].info(" -- smartcard device: mode=#{@smartcard_dev[:mode]}, type=#{@smartcard_dev[:type]}")
281
284
  end
282
285
 
286
+ unless @qemuargs.empty?
287
+ env[:ui].info(' -- Command line args: ')
288
+ @qemuargs.each do |arg|
289
+ msg = " -> value=#{arg[:value]}, "
290
+ env[:ui].info(msg)
291
+ end
292
+ end
293
+
283
294
  env[:ui].info(" -- Command line : #{@cmd_line}")
284
295
 
285
296
  # Create libvirt domain.
@@ -141,6 +141,9 @@ module VagrantPlugins
141
141
  # Attach mgmt network
142
142
  attr_accessor :mgmt_attach
143
143
 
144
+ # Additional qemuargs arguments
145
+ attr_accessor :qemuargs
146
+
144
147
  def initialize
145
148
  @uri = UNSET_VALUE
146
149
  @driver = UNSET_VALUE
@@ -238,6 +241,8 @@ module VagrantPlugins
238
241
 
239
242
  # Attach mgmt network
240
243
  @mgmt_attach = UNSET_VALUE
244
+
245
+ @qemuargs = UNSET_VALUE
241
246
  end
242
247
 
243
248
  def boot(device)
@@ -489,6 +494,11 @@ module VagrantPlugins
489
494
  @disks << disk # append
490
495
  end
491
496
 
497
+ def qemuargs(options = {})
498
+ @qemuargs = [] if @qemuargs == UNSET_VALUE
499
+ @qemuargs.push(value: options[:value])
500
+ end
501
+
492
502
  # code to generate URI from a config moved out of the connect action
493
503
  def _generate_uri
494
504
  # builds the libvirt connection URI from the given driver config
@@ -651,6 +661,8 @@ module VagrantPlugins
651
661
 
652
662
  # Attach mgmt network
653
663
  @mgmt_attach = true if @mgmt_attach == UNSET_VALUE
664
+
665
+ @qemuargs = [] if @qemuargs == UNSET_VALUE
654
666
  end
655
667
 
656
668
  def validate(machine)
@@ -676,9 +688,14 @@ module VagrantPlugins
676
688
  c = disks.dup
677
689
  c += other.disks
678
690
  result.disks = c
691
+
679
692
  c = cdroms.dup
680
693
  c += other.cdroms
681
694
  result.cdroms = c
695
+
696
+ c = qemuargs.dup
697
+ c += other.qemuargs
698
+ result.qemuargs = c
682
699
  end
683
700
  end
684
701
  end
@@ -1,4 +1,4 @@
1
- <domain type='<%= @domain_type %>'>
1
+ <domain type='<%= @domain_type %>' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
2
2
  <name><%= @name %></name>
3
3
  <uuid><%= @uuid %></uuid>
4
4
  <memory><%= @memory_size %></memory>
@@ -218,4 +218,12 @@
218
218
  </tpm>
219
219
  <% end -%>
220
220
  </devices>
221
+
222
+ <% unless @qemuargs.empty? %>
223
+ <qemu:commandline>
224
+ <% @qemuargs.each do |arg| %>
225
+ <qemu:arg value='<%= arg[:value] %>'/>
226
+ <% end %>
227
+ </qemu:commandline>
228
+ <% end %>
221
229
  </domain>
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ProviderLibvirt
3
- VERSION = '0.0.38'.freeze
3
+ VERSION = '0.0.39'.freeze
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- <domain type='kvm'>
1
+ <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
2
2
  <name></name>
3
3
  <uuid></uuid>
4
4
  <memory></memory>
@@ -125,4 +125,9 @@
125
125
  </backend>
126
126
  </tpm>
127
127
  </devices>
128
+
129
+ <qemu:commandline>
130
+ <qemu:arg value='-device'/>
131
+ <qemu:arg value='dummy-device'/>
132
+ </qemu:commandline>
128
133
  </domain>
@@ -1,4 +1,4 @@
1
- <domain type=''>
1
+ <domain type='' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
2
2
  <name></name>
3
3
  <uuid></uuid>
4
4
  <memory></memory>
@@ -42,4 +42,5 @@
42
42
 
43
43
 
44
44
  </devices>
45
+
45
46
  </domain>
@@ -62,6 +62,9 @@ describe 'templates/domain' do
62
62
  domain.watchdog(model: 'i6300esb', action: 'reset')
63
63
  domain.smartcard(mode: 'passthrough')
64
64
  domain.tpm_path = '/dev/tpm0'
65
+
66
+ domain.qemuargs(value: '-device')
67
+ domain.qemuargs(value: 'dummy-device')
65
68
  end
66
69
  let(:test_file) { 'domain_all_settings.xml' }
67
70
  it 'renders template' do
@@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
22
22
 
23
23
  gem.add_runtime_dependency 'fog-libvirt', '>= 0.3.0'
24
24
  gem.add_runtime_dependency 'nokogiri', '~> 1.6.0'
25
+ gem.add_runtime_dependency 'fog-core', '~> 1.43.0'
25
26
 
26
27
  gem.add_development_dependency 'rake'
27
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-libvirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.38
4
+ version: 0.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Stanek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-04-28 00:00:00.000000000 Z
13
+ date: 2017-04-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec-core
@@ -82,6 +82,20 @@ dependencies:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
84
  version: 1.6.0
85
+ - !ruby/object:Gem::Dependency
86
+ name: fog-core
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: 1.43.0
92
+ type: :runtime
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: 1.43.0
85
99
  - !ruby/object:Gem::Dependency
86
100
  name: rake
87
101
  requirement: !ruby/object:Gem::Requirement