vagrant-libvirt 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-libvirt/action/create_domain.rb +19 -91
- data/lib/vagrant-libvirt/action/destroy_domain.rb +20 -4
- data/lib/vagrant-libvirt/action/destroy_networks.rb +1 -1
- data/lib/vagrant-libvirt/action/handle_box_image.rb +2 -0
- data/lib/vagrant-libvirt/action/resolve_disk_settings.rb +174 -0
- data/lib/vagrant-libvirt/action/start_domain.rb +41 -1
- data/lib/vagrant-libvirt/action.rb +4 -0
- data/lib/vagrant-libvirt/config.rb +4 -0
- data/lib/vagrant-libvirt/templates/domain.xml.erb +2 -2
- data/lib/vagrant-libvirt/util/domain_flags.rb +15 -0
- data/lib/vagrant-libvirt/util.rb +1 -0
- data/lib/vagrant-libvirt/version +1 -1
- data/locales/en.yml +4 -2
- data/spec/support/libvirt_context.rb +4 -0
- data/spec/unit/action/cleanup_on_failure_spec.rb +0 -2
- data/spec/unit/action/create_domain_spec.rb +113 -147
- data/spec/unit/action/create_domain_volume_spec.rb +0 -3
- data/spec/unit/action/destroy_domain_spec.rb +43 -10
- data/spec/unit/action/handle_box_image_spec.rb +13 -13
- data/spec/unit/action/package_domain_spec.rb +0 -5
- data/spec/unit/action/resolve_disk_settings_spec/default_domain.xml +43 -0
- data/spec/unit/action/resolve_disk_settings_spec/default_no_aliases.xml +42 -0
- data/spec/unit/action/{create_domain_spec → resolve_disk_settings_spec}/default_system_storage_pool.xml +0 -0
- data/spec/unit/action/resolve_disk_settings_spec/multi_volume_box.xml +55 -0
- data/spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_and_custom_no_aliases.xml +67 -0
- data/spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_storage.xml +67 -0
- data/spec/unit/action/resolve_disk_settings_spec.rb +361 -0
- data/spec/unit/action/start_domain_spec/existing_added_nvram.xml +62 -0
- data/spec/unit/action/start_domain_spec/nvram_domain.xml +64 -0
- data/spec/unit/action/start_domain_spec/nvram_domain_other_setting.xml +64 -0
- data/spec/unit/action/start_domain_spec/nvram_domain_removed.xml +64 -0
- data/spec/unit/action/start_domain_spec.rb +64 -6
- data/spec/unit/action/wait_till_up_spec.rb +0 -2
- data/spec/unit/action_spec.rb +0 -3
- data/spec/unit/config_spec.rb +18 -0
- data/spec/unit/driver_spec.rb +2 -0
- data/spec/unit/templates/domain_all_settings.xml +2 -2
- data/spec/unit/templates/domain_spec.rb +2 -2
- metadata +37 -15
@@ -0,0 +1,64 @@
|
|
1
|
+
<domain type='qemu'>
|
2
|
+
<name>vagrant-libvirt_default</name>
|
3
|
+
<uuid>881a931b-0110-4d10-81aa-47a1a19f5726</uuid>
|
4
|
+
<description>Source: /home/test/vagrant-libvirt/Vagrantfile</description>
|
5
|
+
<memory unit='KiB'>2097152</memory>
|
6
|
+
<currentMemory unit='KiB'>2097152</currentMemory>
|
7
|
+
<vcpu placement='static'>2</vcpu>
|
8
|
+
<os>
|
9
|
+
<type arch='x86_64' machine='pc-i440fx-6.0'>hvm</type>
|
10
|
+
<loader type='pflash'>/path/to/loader/file</loader>
|
11
|
+
<nvram>/path/to/nvram/file</nvram>
|
12
|
+
<boot dev='hd'/>
|
13
|
+
</os>
|
14
|
+
<features>
|
15
|
+
<acpi/>
|
16
|
+
<apic/>
|
17
|
+
<pae/>
|
18
|
+
</features>
|
19
|
+
<cpu mode='host-model' check='partial'/>
|
20
|
+
<clock offset='utc'/>
|
21
|
+
<on_poweroff>destroy</on_poweroff>
|
22
|
+
<on_reboot>restart</on_reboot>
|
23
|
+
<on_crash>destroy</on_crash>
|
24
|
+
<devices>
|
25
|
+
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
26
|
+
<disk type='file' device='disk'>
|
27
|
+
<driver name='qemu' type='qcow2'/>
|
28
|
+
<source file='/var/lib/libvirt/images/vagrant-libvirt_default.img'/>
|
29
|
+
<target dev='vda' bus='virtio'/>
|
30
|
+
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
31
|
+
</disk>
|
32
|
+
<controller type='usb' index='0' model='piix3-uhci'>
|
33
|
+
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
34
|
+
</controller>
|
35
|
+
<controller type='pci' index='0' model='pci-root'/>
|
36
|
+
<interface type='network'>
|
37
|
+
<mac address='52:54:00:7d:14:0e'/>
|
38
|
+
<source network='vagrant-libvirt'/>
|
39
|
+
<model type='virtio'/>
|
40
|
+
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
41
|
+
</interface>
|
42
|
+
<serial type='pty'>
|
43
|
+
<target type='isa-serial' port='0'>
|
44
|
+
<model name='isa-serial'/>
|
45
|
+
</target>
|
46
|
+
</serial>
|
47
|
+
<console type='pty'>
|
48
|
+
<target type='serial' port='0'/>
|
49
|
+
</console>
|
50
|
+
<input type='mouse' bus='ps2'/>
|
51
|
+
<input type='keyboard' bus='ps2'/>
|
52
|
+
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
|
53
|
+
<listen type='address' address='127.0.0.1'/>
|
54
|
+
</graphics>
|
55
|
+
<audio id='1' type='none'/>
|
56
|
+
<video>
|
57
|
+
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
|
58
|
+
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
59
|
+
</video>
|
60
|
+
<memballoon model='virtio'>
|
61
|
+
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
62
|
+
</memballoon>
|
63
|
+
</devices>
|
64
|
+
</domain>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<domain type='qemu'>
|
2
|
+
<name>vagrant-libvirt_default</name>
|
3
|
+
<uuid>881a931b-0110-4d10-81aa-47a1a19f5726</uuid>
|
4
|
+
<description>Source: /home/test/vagrant-libvirt/Vagrantfile</description>
|
5
|
+
<memory unit='KiB'>2097152</memory>
|
6
|
+
<currentMemory unit='KiB'>2097152</currentMemory>
|
7
|
+
<vcpu placement='static'>4</vcpu>
|
8
|
+
<os>
|
9
|
+
<type arch='x86_64' machine='pc-i440fx-6.0'>hvm</type>
|
10
|
+
<loader type='pflash'>/path/to/loader/file</loader>
|
11
|
+
<nvram>/path/to/nvram/file</nvram>
|
12
|
+
<boot dev='hd'/>
|
13
|
+
</os>
|
14
|
+
<features>
|
15
|
+
<acpi/>
|
16
|
+
<apic/>
|
17
|
+
<pae/>
|
18
|
+
</features>
|
19
|
+
<cpu check='partial' mode='host-model'/>
|
20
|
+
<clock offset='utc'/>
|
21
|
+
<on_poweroff>destroy</on_poweroff>
|
22
|
+
<on_reboot>restart</on_reboot>
|
23
|
+
<on_crash>destroy</on_crash>
|
24
|
+
<devices>
|
25
|
+
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
26
|
+
<disk device='disk' type='file'>
|
27
|
+
<driver name='qemu' type='qcow2'/>
|
28
|
+
<source file='/var/lib/libvirt/images/vagrant-libvirt_default.img'/>
|
29
|
+
<target bus='virtio' dev='vda'/>
|
30
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x03' type='pci'/>
|
31
|
+
</disk>
|
32
|
+
<controller index='0' model='piix3-uhci' type='usb'>
|
33
|
+
<address bus='0x00' domain='0x0000' function='0x2' slot='0x01' type='pci'/>
|
34
|
+
</controller>
|
35
|
+
<controller index='0' model='pci-root' type='pci'/>
|
36
|
+
<interface type='network'>
|
37
|
+
<mac address='52:54:00:7d:14:0e'/>
|
38
|
+
<source network='vagrant-libvirt'/>
|
39
|
+
<model type='virtio'/>
|
40
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x05' type='pci'/>
|
41
|
+
</interface>
|
42
|
+
<serial type='pty'>
|
43
|
+
<target port='0' type='isa-serial'>
|
44
|
+
<model name='isa-serial'/>
|
45
|
+
</target>
|
46
|
+
</serial>
|
47
|
+
<console type='pty'>
|
48
|
+
<target port='0' type='serial'/>
|
49
|
+
</console>
|
50
|
+
<input bus='ps2' type='mouse'/>
|
51
|
+
<input bus='ps2' type='keyboard'/>
|
52
|
+
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'>
|
53
|
+
<listen address='127.0.0.1' type='address'/>
|
54
|
+
</graphics>
|
55
|
+
<audio id='1' type='none'/>
|
56
|
+
<video>
|
57
|
+
<model heads='1' primary='yes' type='cirrus' vram='16384'/>
|
58
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x02' type='pci'/>
|
59
|
+
</video>
|
60
|
+
<memballoon model='virtio'>
|
61
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x04' type='pci'/>
|
62
|
+
</memballoon>
|
63
|
+
</devices>
|
64
|
+
</domain>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<domain type='qemu'>
|
2
|
+
<name>vagrant-libvirt_default</name>
|
3
|
+
<uuid>881a931b-0110-4d10-81aa-47a1a19f5726</uuid>
|
4
|
+
<description>Source: /home/test/vagrant-libvirt/Vagrantfile</description>
|
5
|
+
<memory unit='KiB'>2097152</memory>
|
6
|
+
<currentMemory unit='KiB'>2097152</currentMemory>
|
7
|
+
<vcpu placement='static'>2</vcpu>
|
8
|
+
<os>
|
9
|
+
<type arch='x86_64' machine='pc-i440fx-6.0'>hvm</type>
|
10
|
+
|
11
|
+
|
12
|
+
<boot dev='hd'/>
|
13
|
+
</os>
|
14
|
+
<features>
|
15
|
+
<acpi/>
|
16
|
+
<apic/>
|
17
|
+
<pae/>
|
18
|
+
</features>
|
19
|
+
<cpu check='partial' mode='host-model'/>
|
20
|
+
<clock offset='utc'/>
|
21
|
+
<on_poweroff>destroy</on_poweroff>
|
22
|
+
<on_reboot>restart</on_reboot>
|
23
|
+
<on_crash>destroy</on_crash>
|
24
|
+
<devices>
|
25
|
+
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
26
|
+
<disk device='disk' type='file'>
|
27
|
+
<driver name='qemu' type='qcow2'/>
|
28
|
+
<source file='/var/lib/libvirt/images/vagrant-libvirt_default.img'/>
|
29
|
+
<target bus='virtio' dev='vda'/>
|
30
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x03' type='pci'/>
|
31
|
+
</disk>
|
32
|
+
<controller index='0' model='piix3-uhci' type='usb'>
|
33
|
+
<address bus='0x00' domain='0x0000' function='0x2' slot='0x01' type='pci'/>
|
34
|
+
</controller>
|
35
|
+
<controller index='0' model='pci-root' type='pci'/>
|
36
|
+
<interface type='network'>
|
37
|
+
<mac address='52:54:00:7d:14:0e'/>
|
38
|
+
<source network='vagrant-libvirt'/>
|
39
|
+
<model type='virtio'/>
|
40
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x05' type='pci'/>
|
41
|
+
</interface>
|
42
|
+
<serial type='pty'>
|
43
|
+
<target port='0' type='isa-serial'>
|
44
|
+
<model name='isa-serial'/>
|
45
|
+
</target>
|
46
|
+
</serial>
|
47
|
+
<console type='pty'>
|
48
|
+
<target port='0' type='serial'/>
|
49
|
+
</console>
|
50
|
+
<input bus='ps2' type='mouse'/>
|
51
|
+
<input bus='ps2' type='keyboard'/>
|
52
|
+
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'>
|
53
|
+
<listen address='127.0.0.1' type='address'/>
|
54
|
+
</graphics>
|
55
|
+
<audio id='1' type='none'/>
|
56
|
+
<video>
|
57
|
+
<model heads='1' primary='yes' type='cirrus' vram='16384'/>
|
58
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x02' type='pci'/>
|
59
|
+
</video>
|
60
|
+
<memballoon model='virtio'>
|
61
|
+
<address bus='0x00' domain='0x0000' function='0x0' slot='0x04' type='pci'/>
|
62
|
+
</memballoon>
|
63
|
+
</devices>
|
64
|
+
</domain>
|
@@ -13,19 +13,19 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
|
|
13
13
|
include_context 'unit'
|
14
14
|
include_context 'libvirt'
|
15
15
|
|
16
|
-
let(:libvirt_domain) { double('libvirt_domain') }
|
17
|
-
let(:libvirt_client) { double('libvirt_client') }
|
18
16
|
let(:servers) { double('servers') }
|
19
17
|
|
20
18
|
let(:domain_xml) { File.read(File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb'), test_file)) }
|
21
19
|
let(:updated_domain_xml) { File.read(File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb'), updated_test_file)) }
|
22
20
|
|
21
|
+
before do
|
22
|
+
allow(driver).to receive(:created?).and_return(true)
|
23
|
+
end
|
24
|
+
|
23
25
|
describe '#call' do
|
24
26
|
let(:test_file) { 'default.xml' }
|
25
27
|
|
26
28
|
before do
|
27
|
-
allow_any_instance_of(VagrantPlugins::ProviderLibvirt::Driver)
|
28
|
-
.to receive(:connection).and_return(connection)
|
29
29
|
allow(connection).to receive(:client).and_return(libvirt_client)
|
30
30
|
allow(libvirt_client).to receive(:lookup_domain_by_uuid).and_return(libvirt_domain)
|
31
31
|
|
@@ -43,7 +43,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'should execute without changing' do
|
46
|
-
|
46
|
+
expect(libvirt_domain).to_not receive(:undefine)
|
47
47
|
expect(libvirt_domain).to receive(:autostart=)
|
48
48
|
expect(domain).to receive(:start)
|
49
49
|
|
@@ -54,7 +54,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
|
|
54
54
|
let(:test_file) { 'existing.xml' }
|
55
55
|
|
56
56
|
it 'should execute without changing' do
|
57
|
-
|
57
|
+
expect(libvirt_domain).to_not receive(:undefine)
|
58
58
|
expect(libvirt_domain).to receive(:autostart=)
|
59
59
|
expect(domain).to receive(:start)
|
60
60
|
|
@@ -62,6 +62,64 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
context 'nvram' do
|
66
|
+
context 'when being added to existing' do
|
67
|
+
let(:vagrantfile_providerconfig) do
|
68
|
+
<<-EOF
|
69
|
+
libvirt.loader = "/path/to/loader/file"
|
70
|
+
libvirt.nvram = "/path/to/nvram/file"
|
71
|
+
EOF
|
72
|
+
end
|
73
|
+
let(:test_file) { 'existing.xml' }
|
74
|
+
let(:updated_test_file) { 'existing_added_nvram.xml' }
|
75
|
+
|
76
|
+
it 'should undefine without passing flags' do
|
77
|
+
expect(libvirt_domain).to receive(:undefine).with(0)
|
78
|
+
expect(servers).to receive(:create).with(xml: updated_domain_xml)
|
79
|
+
expect(libvirt_domain).to receive(:autostart=)
|
80
|
+
expect(domain).to receive(:start)
|
81
|
+
|
82
|
+
expect(subject.call(env)).to be_nil
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context 'when it was already in use' do
|
87
|
+
let(:vagrantfile_providerconfig) do
|
88
|
+
<<-EOF
|
89
|
+
libvirt.loader = "/path/to/loader/file"
|
90
|
+
libvirt.nvram = "/path/to/nvram/file"
|
91
|
+
# change another setting to trigger the undefine/create
|
92
|
+
libvirt.cpus = 4
|
93
|
+
EOF
|
94
|
+
end
|
95
|
+
let(:test_file) { 'nvram_domain.xml' }
|
96
|
+
let(:updated_test_file) { 'nvram_domain_other_setting.xml' }
|
97
|
+
|
98
|
+
it 'should set the flag to keep nvram' do
|
99
|
+
expect(libvirt_domain).to receive(:undefine).with(VagrantPlugins::ProviderLibvirt::Util::DomainFlags::VIR_DOMAIN_UNDEFINE_KEEP_NVRAM)
|
100
|
+
expect(servers).to receive(:create).with(xml: updated_domain_xml)
|
101
|
+
expect(libvirt_domain).to receive(:autostart=)
|
102
|
+
expect(domain).to receive(:start)
|
103
|
+
|
104
|
+
expect(subject.call(env)).to be_nil
|
105
|
+
end
|
106
|
+
|
107
|
+
context 'when it is being disabled' do
|
108
|
+
let(:vagrantfile_providerconfig) { }
|
109
|
+
let(:updated_test_file) { 'nvram_domain_removed.xml' }
|
110
|
+
|
111
|
+
it 'should set the flag to remove nvram' do
|
112
|
+
expect(libvirt_domain).to receive(:undefine).with(VagrantPlugins::ProviderLibvirt::Util::DomainFlags::VIR_DOMAIN_UNDEFINE_NVRAM)
|
113
|
+
expect(servers).to receive(:create).with(xml: updated_domain_xml)
|
114
|
+
expect(libvirt_domain).to receive(:autostart=)
|
115
|
+
expect(domain).to receive(:start)
|
116
|
+
|
117
|
+
expect(subject.call(env)).to be_nil
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
65
123
|
context 'tpm' do
|
66
124
|
context 'passthrough tpm added' do
|
67
125
|
let(:updated_test_file) { 'default_added_tpm_path.xml' }
|
@@ -18,8 +18,6 @@ describe VagrantPlugins::ProviderLibvirt::Action::WaitTillUp do
|
|
18
18
|
|
19
19
|
describe '#call' do
|
20
20
|
before do
|
21
|
-
allow_any_instance_of(VagrantPlugins::ProviderLibvirt::Provider).to receive(:driver)
|
22
|
-
.and_return(driver)
|
23
21
|
allow(driver).to receive(:get_domain).and_return(domain)
|
24
22
|
allow(driver).to receive(:state).and_return(:running)
|
25
23
|
# return some information for domain when needed
|
data/spec/unit/action_spec.rb
CHANGED
@@ -14,13 +14,10 @@ describe VagrantPlugins::ProviderLibvirt::Action do
|
|
14
14
|
include_context 'libvirt'
|
15
15
|
include_context 'unit'
|
16
16
|
|
17
|
-
let(:libvirt_domain) { double('libvirt_domain') }
|
18
17
|
let(:runner) { Vagrant::Action::Runner.new(env) }
|
19
18
|
let(:state) { double('state') }
|
20
19
|
|
21
20
|
before do
|
22
|
-
allow_any_instance_of(VagrantPlugins::ProviderLibvirt::Driver)
|
23
|
-
.to receive(:connection).and_return(connection)
|
24
21
|
allow(machine).to receive(:id).and_return('test-machine-id')
|
25
22
|
allow(machine).to receive(:state).and_return(state)
|
26
23
|
|
data/spec/unit/config_spec.rb
CHANGED
@@ -630,6 +630,24 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
|
630
630
|
end
|
631
631
|
end
|
632
632
|
|
633
|
+
context 'with nvram defined' do
|
634
|
+
before do
|
635
|
+
subject.nvram = '/path/to/some/nvram'
|
636
|
+
end
|
637
|
+
|
638
|
+
it 'should be invalid as loader not set' do
|
639
|
+
assert_invalid
|
640
|
+
end
|
641
|
+
|
642
|
+
context 'with loader defined' do
|
643
|
+
it 'should be valid' do
|
644
|
+
subject.loader = '/path/to/some/loader'
|
645
|
+
|
646
|
+
assert_valid
|
647
|
+
end
|
648
|
+
end
|
649
|
+
end
|
650
|
+
|
633
651
|
context 'with cpu_mode and cpu_model defined' do
|
634
652
|
it 'should discard model if mode is passthrough' do
|
635
653
|
subject.cpu_mode = 'host-passthrough'
|
data/spec/unit/driver_spec.rb
CHANGED
@@ -46,6 +46,8 @@ describe VagrantPlugins::ProviderLibvirt::Driver do
|
|
46
46
|
allow(machine.provider_config).to receive(:qemu_use_session).and_return(false)
|
47
47
|
allow(logger).to receive(:info)
|
48
48
|
allow(logger).to receive(:debug)
|
49
|
+
allow(machine.provider).to receive('driver').and_call_original
|
50
|
+
allow(machine2.provider).to receive('driver').and_call_original
|
49
51
|
end
|
50
52
|
|
51
53
|
describe '#connection' do
|
@@ -112,12 +112,12 @@
|
|
112
112
|
</hostdev>
|
113
113
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
114
114
|
<source>
|
115
|
-
|
115
|
+
<address domain='0x0001' bus='0x03' slot='0x00' function='0x0'/>
|
116
116
|
</source>
|
117
117
|
</hostdev>
|
118
118
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
119
119
|
<source>
|
120
|
-
|
120
|
+
<address domain='0x0002' bus='0x04' slot='0x00' function='0x0'/>
|
121
121
|
</source>
|
122
122
|
<address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
|
123
123
|
</hostdev>
|
@@ -62,13 +62,13 @@ describe 'templates/domain' do
|
|
62
62
|
:dev => 'vda',
|
63
63
|
:cache => 'unsafe',
|
64
64
|
:bus => domain.disk_bus,
|
65
|
-
:
|
65
|
+
:absolute_path => '/var/lib/libvirt/images/test.qcow2'
|
66
66
|
})
|
67
67
|
domain.domain_volumes.push({
|
68
68
|
:dev => 'vdb',
|
69
69
|
:cache => 'unsafe',
|
70
70
|
:bus => domain.disk_bus,
|
71
|
-
:
|
71
|
+
:absolute_path => '/var/lib/libvirt/images/test2.qcow2'
|
72
72
|
})
|
73
73
|
domain.storage(:file, path: 'test-disk1.qcow2')
|
74
74
|
domain.storage(:file, path: 'test-disk2.qcow2', io: 'threads', copy_on_read: 'on', discard: 'unmap', detect_zeroes: 'on')
|
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.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Stanek
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-06-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec-core
|
@@ -166,6 +166,7 @@ files:
|
|
166
166
|
- lib/vagrant-libvirt/action/read_mac_addresses.rb
|
167
167
|
- lib/vagrant-libvirt/action/remove_libvirt_image.rb
|
168
168
|
- lib/vagrant-libvirt/action/remove_stale_volume.rb
|
169
|
+
- lib/vagrant-libvirt/action/resolve_disk_settings.rb
|
169
170
|
- lib/vagrant-libvirt/action/resume_domain.rb
|
170
171
|
- lib/vagrant-libvirt/action/set_boot_order.rb
|
171
172
|
- lib/vagrant-libvirt/action/set_name_of_domain.rb
|
@@ -192,6 +193,7 @@ files:
|
|
192
193
|
- lib/vagrant-libvirt/util.rb
|
193
194
|
- lib/vagrant-libvirt/util/byte_number.rb
|
194
195
|
- lib/vagrant-libvirt/util/collection.rb
|
196
|
+
- lib/vagrant-libvirt/util/domain_flags.rb
|
195
197
|
- lib/vagrant-libvirt/util/erb_template.rb
|
196
198
|
- lib/vagrant-libvirt/util/error_codes.rb
|
197
199
|
- lib/vagrant-libvirt/util/network_util.rb
|
@@ -216,7 +218,6 @@ files:
|
|
216
218
|
- spec/unit/action/create_domain_spec/additional_disks_domain.xml
|
217
219
|
- spec/unit/action/create_domain_spec/custom_disk_settings.xml
|
218
220
|
- spec/unit/action/create_domain_spec/default_domain.xml
|
219
|
-
- spec/unit/action/create_domain_spec/default_system_storage_pool.xml
|
220
221
|
- spec/unit/action/create_domain_spec/default_user_storage_pool.xml
|
221
222
|
- spec/unit/action/create_domain_spec/two_disk_settings.xml
|
222
223
|
- spec/unit/action/create_domain_volume_spec.rb
|
@@ -236,6 +237,13 @@ files:
|
|
236
237
|
- spec/unit/action/handle_box_image_spec.rb
|
237
238
|
- spec/unit/action/package_domain_spec.rb
|
238
239
|
- spec/unit/action/prepare_nfs_settings_spec.rb
|
240
|
+
- spec/unit/action/resolve_disk_settings_spec.rb
|
241
|
+
- spec/unit/action/resolve_disk_settings_spec/default_domain.xml
|
242
|
+
- spec/unit/action/resolve_disk_settings_spec/default_no_aliases.xml
|
243
|
+
- spec/unit/action/resolve_disk_settings_spec/default_system_storage_pool.xml
|
244
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box.xml
|
245
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_and_custom_no_aliases.xml
|
246
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_storage.xml
|
239
247
|
- spec/unit/action/set_name_of_domain_spec.rb
|
240
248
|
- spec/unit/action/shutdown_domain_spec.rb
|
241
249
|
- spec/unit/action/start_domain_spec.rb
|
@@ -244,6 +252,10 @@ files:
|
|
244
252
|
- spec/unit/action/start_domain_spec/default_added_tpm_path.xml
|
245
253
|
- spec/unit/action/start_domain_spec/default_added_tpm_version.xml
|
246
254
|
- spec/unit/action/start_domain_spec/existing.xml
|
255
|
+
- spec/unit/action/start_domain_spec/existing_added_nvram.xml
|
256
|
+
- spec/unit/action/start_domain_spec/nvram_domain.xml
|
257
|
+
- spec/unit/action/start_domain_spec/nvram_domain_other_setting.xml
|
258
|
+
- spec/unit/action/start_domain_spec/nvram_domain_removed.xml
|
247
259
|
- spec/unit/action/wait_till_up_spec.rb
|
248
260
|
- spec/unit/action_spec.rb
|
249
261
|
- spec/unit/config_spec.rb
|
@@ -286,10 +298,9 @@ test_files:
|
|
286
298
|
- spec/support/matchers/have_file_content.rb
|
287
299
|
- spec/support/binding_proc.rb
|
288
300
|
- spec/support/environment_helper.rb
|
289
|
-
- spec/support/libvirt_context.rb
|
290
|
-
- spec/support/sharedcontext.rb
|
291
301
|
- spec/support/temporary_dir.rb
|
292
|
-
- spec/
|
302
|
+
- spec/support/sharedcontext.rb
|
303
|
+
- spec/support/libvirt_context.rb
|
293
304
|
- spec/unit/action/create_domain_spec/default_user_storage_pool.xml
|
294
305
|
- spec/unit/action/create_domain_spec/additional_disks_domain.xml
|
295
306
|
- spec/unit/action/create_domain_spec/custom_disk_settings.xml
|
@@ -304,32 +315,43 @@ test_files:
|
|
304
315
|
- spec/unit/action/start_domain_spec/default_added_tpm_path.xml
|
305
316
|
- spec/unit/action/start_domain_spec/default_added_tpm_version.xml
|
306
317
|
- spec/unit/action/start_domain_spec/existing.xml
|
318
|
+
- spec/unit/action/start_domain_spec/existing_added_nvram.xml
|
319
|
+
- spec/unit/action/start_domain_spec/nvram_domain.xml
|
320
|
+
- spec/unit/action/start_domain_spec/nvram_domain_other_setting.xml
|
321
|
+
- spec/unit/action/start_domain_spec/nvram_domain_removed.xml
|
307
322
|
- spec/unit/action/clean_machine_folder_spec.rb
|
308
|
-
- spec/unit/action/
|
309
|
-
- spec/unit/action/destroy_domain_spec.rb
|
323
|
+
- spec/unit/action/set_name_of_domain_spec.rb
|
310
324
|
- spec/unit/action/destroy_domain_spec/additional_disks_domain.xml
|
311
325
|
- spec/unit/action/destroy_domain_spec/box_multiple_disks.xml
|
312
326
|
- spec/unit/action/destroy_domain_spec/box_multiple_disks_and_additional_and_custom_disks.xml
|
313
327
|
- spec/unit/action/destroy_domain_spec/box_multiple_disks_and_additional_and_custom_disks_no_aliases.xml
|
314
328
|
- spec/unit/action/destroy_domain_spec/box_multiple_disks_and_additional_disks.xml
|
315
329
|
- spec/unit/action/destroy_domain_spec/cdrom_domain.xml
|
330
|
+
- spec/unit/action/forward_ports_spec.rb
|
316
331
|
- spec/unit/action/halt_domain_spec.rb
|
317
|
-
- spec/unit/action/handle_box_image_spec.rb
|
318
|
-
- spec/unit/action/package_domain_spec.rb
|
319
332
|
- spec/unit/action/prepare_nfs_settings_spec.rb
|
320
|
-
- spec/unit/action/set_name_of_domain_spec.rb
|
321
333
|
- spec/unit/action/shutdown_domain_spec.rb
|
322
|
-
- spec/unit/action/
|
323
|
-
- spec/unit/action/create_domain_spec.rb
|
334
|
+
- spec/unit/action/cleanup_on_failure_spec.rb
|
324
335
|
- spec/unit/action/create_domain_volume_spec.rb
|
336
|
+
- spec/unit/action/package_domain_spec.rb
|
337
|
+
- spec/unit/action/start_domain_spec.rb
|
325
338
|
- spec/unit/action/wait_till_up_spec.rb
|
326
|
-
- spec/unit/action/
|
339
|
+
- spec/unit/action/create_domain_spec.rb
|
340
|
+
- spec/unit/action/destroy_domain_spec.rb
|
341
|
+
- spec/unit/action/handle_box_image_spec.rb
|
342
|
+
- spec/unit/action/resolve_disk_settings_spec.rb
|
343
|
+
- spec/unit/action/resolve_disk_settings_spec/default_domain.xml
|
344
|
+
- spec/unit/action/resolve_disk_settings_spec/default_no_aliases.xml
|
345
|
+
- spec/unit/action/resolve_disk_settings_spec/default_system_storage_pool.xml
|
346
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box.xml
|
347
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_and_custom_no_aliases.xml
|
348
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_storage.xml
|
327
349
|
- spec/unit/templates/tpm/version_1.2.xml
|
328
350
|
- spec/unit/templates/tpm/version_2.0.xml
|
351
|
+
- spec/unit/templates/domain_all_settings.xml
|
329
352
|
- spec/unit/templates/domain_cpu_mode_passthrough.xml
|
330
353
|
- spec/unit/templates/domain_custom_cpu_model.xml
|
331
354
|
- spec/unit/templates/domain_defaults.xml
|
332
|
-
- spec/unit/templates/domain_all_settings.xml
|
333
355
|
- spec/unit/templates/domain_spec.rb
|
334
356
|
- spec/unit/util/byte_number_spec.rb
|
335
357
|
- spec/unit/util/resolvers_spec.rb
|