mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Disable graphics autoport attr when using spice (#1636)
If the graphics type is set to spice, then skip setting the autoport as the attribute will be discarded by libvirt causing it to appear as though not all of the XML sent to start the domain was accepted.
This commit is contained in:
parent
59c7d9f18e
commit
a8ab0040ff
@ -956,7 +956,7 @@ module VagrantPlugins
|
||||
@initrd = '' if @initrd == UNSET_VALUE
|
||||
@dtb = nil if @dtb == UNSET_VALUE
|
||||
@graphics_type = 'vnc' if @graphics_type == UNSET_VALUE
|
||||
@graphics_autoport = @graphics_port == UNSET_VALUE ? 'yes' : nil
|
||||
@graphics_autoport = @graphics_type != 'spice' && @graphics_port == UNSET_VALUE ? 'yes' : nil
|
||||
if (@graphics_type != 'vnc' && @graphics_type != 'spice') ||
|
||||
@graphics_passwd == UNSET_VALUE
|
||||
@graphics_passwd = nil
|
||||
|
@ -673,7 +673,7 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
||||
|
||||
expect(subject.graphics_port).to eq(nil)
|
||||
expect(subject.graphics_ip).to eq(nil)
|
||||
expect(subject.graphics_autoport).to eq('yes')
|
||||
expect(subject.graphics_autoport).to eq(nil)
|
||||
expect(subject.channels).to match([a_hash_including({:target_name => 'com.redhat.spice.0'})])
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user