mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Add qemu commandline environment variable support. (#961)
Make it easier to tweak some qemu options by allowing passthru of command line environment variables. - Also cleans up weird variable indirection used for qemu commandline args variable through `qargs` in various constructors. - Addresses some functionality discussed in #776.
This commit is contained in:
@@ -143,5 +143,9 @@
|
||||
<qemu:commandline>
|
||||
<qemu:arg value='-device'/>
|
||||
<qemu:arg value='dummy-device'/>
|
||||
<qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
|
||||
<qemu:env name='QEMU_AUDIO_TIMER_PERIOD' value='150'/>
|
||||
<qemu:env name='QEMU_PA_SAMPLES' value='1024'/>
|
||||
<qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
|
||||
</qemu:commandline>
|
||||
</domain>
|
||||
|
||||
@@ -11,7 +11,6 @@ describe 'templates/domain' do
|
||||
|
||||
def finalize!
|
||||
super
|
||||
@qargs = @qemu_args
|
||||
end
|
||||
end
|
||||
|
||||
@@ -76,6 +75,12 @@ describe 'templates/domain' do
|
||||
|
||||
domain.qemuargs(value: '-device')
|
||||
domain.qemuargs(value: 'dummy-device')
|
||||
|
||||
domain.qemuenv(QEMU_AUDIO_DRV: 'pa')
|
||||
domain.qemuenv(QEMU_AUDIO_TIMER_PERIOD: '150')
|
||||
domain.qemuenv(QEMU_PA_SAMPLES: '1024')
|
||||
domain.qemuenv(QEMU_PA_SERVER: '/run/user/1000/pulse/native')
|
||||
|
||||
domain.shares = '1024'
|
||||
domain.cpuset = '1-4,^3,6'
|
||||
domain.nodeset = '1-4,^3,6'
|
||||
|
||||
Reference in New Issue
Block a user