vagrant-libvirt 0.8.2 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +51 -2079
- data/lib/vagrant-libvirt/action/create_domain.rb +57 -94
- data/lib/vagrant-libvirt/action/create_network_interfaces.rb +1 -1
- data/lib/vagrant-libvirt/action/create_networks.rb +3 -3
- data/lib/vagrant-libvirt/action/destroy_domain.rb +21 -5
- data/lib/vagrant-libvirt/action/destroy_networks.rb +2 -2
- data/lib/vagrant-libvirt/action/handle_box_image.rb +3 -1
- data/lib/vagrant-libvirt/action/package_domain.rb +1 -5
- data/lib/vagrant-libvirt/action/remove_libvirt_image.rb +3 -1
- data/lib/vagrant-libvirt/action/resolve_disk_settings.rb +181 -0
- data/lib/vagrant-libvirt/action/snapshot_delete.rb +26 -0
- data/lib/vagrant-libvirt/action/snapshot_restore.rb +22 -0
- data/lib/vagrant-libvirt/action/snapshot_save.rb +27 -0
- data/lib/vagrant-libvirt/action/start_domain.rb +80 -11
- data/lib/vagrant-libvirt/action.rb +53 -1
- data/lib/vagrant-libvirt/cap/snapshots.rb +12 -0
- data/lib/vagrant-libvirt/cap/synced_folder_9p.rb +4 -4
- data/lib/vagrant-libvirt/cap/synced_folder_virtiofs.rb +4 -4
- data/lib/vagrant-libvirt/config.rb +104 -6
- data/lib/vagrant-libvirt/driver.rb +108 -46
- data/lib/vagrant-libvirt/errors.rb +23 -3
- data/lib/vagrant-libvirt/plugin.rb +7 -3
- data/lib/vagrant-libvirt/provider.rb +1 -1
- data/lib/vagrant-libvirt/templates/domain.xml.erb +32 -6
- data/lib/vagrant-libvirt/util/byte_number.rb +0 -1
- data/lib/vagrant-libvirt/util/compat.rb +23 -0
- data/lib/vagrant-libvirt/util/domain_flags.rb +15 -0
- data/lib/vagrant-libvirt/util/unindent.rb +7 -0
- data/lib/vagrant-libvirt/util.rb +1 -0
- data/lib/vagrant-libvirt/version +1 -1
- data/locales/en.yml +28 -4
- data/spec/acceptance/additional_storage_spec.rb +32 -0
- data/spec/acceptance/package_domain_spec.rb +90 -0
- data/spec/acceptance/provider_settings_spec.rb +54 -0
- data/spec/acceptance/simple_vm_provision_via_shell_spec.rb +31 -0
- data/spec/acceptance/snapshots_spec.rb +41 -0
- data/spec/acceptance/support-skeletons/package_complex/Vagrantfile.testbox +14 -0
- data/spec/acceptance/support-skeletons/package_complex/scripts/sysprep.sh +32 -0
- data/spec/acceptance/support-skeletons/package_simple/Vagrantfile.testbox +10 -0
- data/spec/acceptance/two_disks_spec.rb +29 -0
- data/spec/acceptance/use_qemu_agent_for_connectivity_spec.rb +35 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/acceptance/configuration.rb +21 -0
- data/spec/support/acceptance/context.rb +70 -0
- data/spec/support/acceptance/isolated_environment.rb +41 -0
- data/spec/support/libvirt_acceptance_context.rb +64 -0
- data/spec/support/libvirt_context.rb +4 -0
- data/spec/support/sharedcontext.rb +1 -0
- data/spec/unit/action/cleanup_on_failure_spec.rb +0 -2
- data/spec/unit/action/create_domain_spec/sysinfo.xml +66 -0
- data/spec/unit/action/create_domain_spec/sysinfo_only_required.xml +49 -0
- data/spec/unit/action/create_domain_spec.rb +188 -140
- 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/forward_ports_spec.rb +0 -1
- data/spec/unit/action/handle_box_image_spec.rb +31 -14
- data/spec/unit/action/package_domain_spec.rb +0 -5
- data/spec/unit/action/remove_libvirt_image_spec.rb +43 -0
- 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 +385 -0
- data/spec/unit/action/start_domain_spec/clock_timer_removed.xml +38 -0
- data/spec/unit/action/start_domain_spec/clock_timer_rtc_tsc.xml +39 -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 +122 -22
- data/spec/unit/action/wait_till_up_spec.rb +0 -2
- data/spec/unit/action_spec.rb +88 -3
- data/spec/unit/cap/synced_folder_9p_spec.rb +120 -0
- data/spec/unit/cap/synced_folder_virtiofs_spec.rb +120 -0
- data/spec/unit/config_spec.rb +153 -6
- data/spec/unit/driver_spec.rb +3 -1
- data/spec/unit/plugin_spec.rb +42 -0
- data/spec/unit/templates/domain_all_settings.xml +15 -6
- data/spec/unit/templates/domain_scsi_bus_storage.xml +44 -0
- data/spec/unit/templates/domain_scsi_device_storage.xml +44 -0
- data/spec/unit/templates/domain_scsi_multiple_controllers_storage.xml +130 -0
- data/spec/unit/templates/domain_spec.rb +105 -21
- data/spec/unit/util/byte_number_spec.rb +1 -1
- metadata +169 -79
- data/spec/unit/provider_spec.rb +0 -11
data/spec/unit/config_spec.rb
CHANGED
@@ -577,24 +577,28 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
|
577
577
|
|
578
578
|
def assert_invalid
|
579
579
|
subject.finalize!
|
580
|
-
errors = subject.validate(machine)
|
581
|
-
|
580
|
+
errors = subject.validate(machine).values.first
|
581
|
+
expect(errors).to_not be_empty
|
582
|
+
errors
|
582
583
|
end
|
583
584
|
|
584
585
|
def assert_valid
|
585
586
|
subject.finalize!
|
586
|
-
errors = subject.validate(machine)
|
587
|
-
|
587
|
+
errors = subject.validate(machine).values.first
|
588
|
+
expect(errors).to be_empty
|
588
589
|
end
|
589
590
|
|
590
591
|
describe '#validate' do
|
592
|
+
before do
|
593
|
+
allow(machine).to receive(:provider_config).and_return(subject)
|
594
|
+
allow(machine).to receive(:ui).and_return(ui)
|
595
|
+
end
|
596
|
+
|
591
597
|
it 'is valid with defaults' do
|
592
598
|
assert_valid
|
593
599
|
end
|
594
600
|
|
595
601
|
context 'with disks defined' do
|
596
|
-
before { expect(machine).to receive(:provider_config).and_return(subject).at_least(:once) }
|
597
|
-
|
598
602
|
it 'is valid if relative path used for disk' do
|
599
603
|
subject.storage :file, path: '../path/to/file.qcow2'
|
600
604
|
assert_valid
|
@@ -630,6 +634,73 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
|
630
634
|
end
|
631
635
|
end
|
632
636
|
|
637
|
+
context 'with public_network defined' do
|
638
|
+
let(:libvirt_client) { instance_double(::Libvirt::Connect) }
|
639
|
+
let(:host_devices) { [
|
640
|
+
instance_double(Libvirt::Interface),
|
641
|
+
instance_double(Libvirt::Interface),
|
642
|
+
] }
|
643
|
+
before do
|
644
|
+
machine.config.vm.network :public_network, dev: 'eth0', ip: "192.168.2.157"
|
645
|
+
expect(machine).to receive_message_chain('provider.driver.connection.client').and_return(libvirt_client)
|
646
|
+
expect(libvirt_client).to receive(:list_all_interfaces).and_return(host_devices)
|
647
|
+
expect(host_devices[0]).to receive(:name).and_return('eth0')
|
648
|
+
expect(host_devices[1]).to receive(:name).and_return('virbr0')
|
649
|
+
end
|
650
|
+
|
651
|
+
it 'should validate use of existing device' do
|
652
|
+
assert_valid
|
653
|
+
end
|
654
|
+
|
655
|
+
context 'when default device not on host' do
|
656
|
+
before do
|
657
|
+
machine.config.vm.network :public_network, dev: 'eno1', ip: "192.168.2.157"
|
658
|
+
end
|
659
|
+
|
660
|
+
it 'should be invalid' do
|
661
|
+
assert_invalid
|
662
|
+
end
|
663
|
+
end
|
664
|
+
|
665
|
+
context 'when using excluded host device' do
|
666
|
+
before do
|
667
|
+
machine.config.vm.network :public_network, dev: 'virbr0', ip: "192.168.2.157"
|
668
|
+
end
|
669
|
+
|
670
|
+
it 'should be invalid' do
|
671
|
+
assert_invalid
|
672
|
+
end
|
673
|
+
|
674
|
+
context 'when user overrides to allow device' do
|
675
|
+
before do
|
676
|
+
subject.host_device_exclude_prefixes = []
|
677
|
+
end
|
678
|
+
|
679
|
+
it 'should validate' do
|
680
|
+
assert_valid
|
681
|
+
end
|
682
|
+
end
|
683
|
+
end
|
684
|
+
end
|
685
|
+
|
686
|
+
context 'with nvram defined' do
|
687
|
+
before do
|
688
|
+
subject.nvram = '/path/to/some/nvram'
|
689
|
+
end
|
690
|
+
|
691
|
+
it 'should be invalid as loader not set' do
|
692
|
+
assert_invalid
|
693
|
+
end
|
694
|
+
|
695
|
+
context 'with loader defined' do
|
696
|
+
it 'should be valid' do
|
697
|
+
subject.loader = '/path/to/some/loader'
|
698
|
+
|
699
|
+
assert_valid
|
700
|
+
end
|
701
|
+
end
|
702
|
+
end
|
703
|
+
|
633
704
|
context 'with cpu_mode and cpu_model defined' do
|
634
705
|
it 'should discard model if mode is passthrough' do
|
635
706
|
subject.cpu_mode = 'host-passthrough'
|
@@ -644,6 +715,60 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
|
644
715
|
assert_valid
|
645
716
|
end
|
646
717
|
end
|
718
|
+
|
719
|
+
context 'with sysinfo defined' do
|
720
|
+
context 'when invalid block name provided' do
|
721
|
+
it 'should be invalid' do
|
722
|
+
subject.sysinfo = {'bad bios': {'vendor': 'some vendor'}}
|
723
|
+
|
724
|
+
errors = assert_invalid
|
725
|
+
expect(errors).to include(match(/invalid sysinfo element 'bad bios';/))
|
726
|
+
end
|
727
|
+
end
|
728
|
+
|
729
|
+
context 'when invalid element name provided' do
|
730
|
+
it 'should be invalid' do
|
731
|
+
subject.sysinfo = {'bios': {'bad vendor': 'some vendor'}}
|
732
|
+
|
733
|
+
errors = assert_invalid
|
734
|
+
expect(errors).to include(match(/'sysinfo.bios' does not support entry name 'bad vendor'/))
|
735
|
+
end
|
736
|
+
end
|
737
|
+
|
738
|
+
context 'when empty element value provided' do
|
739
|
+
it 'should succeed with a warning' do
|
740
|
+
expect(ui).to receive(:warn).with(/Libvirt Provider: sysinfo.bios.vendor is nil or empty/)
|
741
|
+
subject.sysinfo = {'bios': {'vendor': ''}}
|
742
|
+
|
743
|
+
assert_valid
|
744
|
+
end
|
745
|
+
end
|
746
|
+
|
747
|
+
context 'when handling "oem strings"' do
|
748
|
+
it 'should succeed' do
|
749
|
+
subject.sysinfo = {'oem strings': ['string 1']}
|
750
|
+
|
751
|
+
assert_valid
|
752
|
+
end
|
753
|
+
|
754
|
+
context 'when empty entries' do
|
755
|
+
it 'should succeed with a warning' do
|
756
|
+
expect(ui).to receive(:warn).with(/Libvirt Provider: 'sysinfo.oem strings' contains an empty/)
|
757
|
+
subject.sysinfo = {'oem strings': ['']}
|
758
|
+
|
759
|
+
assert_valid
|
760
|
+
end
|
761
|
+
end
|
762
|
+
|
763
|
+
context 'when non string passed' do
|
764
|
+
it 'should be invalid' do
|
765
|
+
subject.sysinfo = {'oem strings': [true]}
|
766
|
+
|
767
|
+
assert_invalid
|
768
|
+
end
|
769
|
+
end
|
770
|
+
end
|
771
|
+
end
|
647
772
|
end
|
648
773
|
|
649
774
|
describe '#merge' do
|
@@ -707,5 +832,27 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
|
707
832
|
include(name: 'hpet'))
|
708
833
|
end
|
709
834
|
end
|
835
|
+
|
836
|
+
context 'sysinfo' do
|
837
|
+
it 'should merge' do
|
838
|
+
one.sysinfo = {
|
839
|
+
'bios' => {'vendor': 'Some Vendor'},
|
840
|
+
'system' => {'manufacturer': 'some manufacturer'},
|
841
|
+
'oem strings' => ['string 1'],
|
842
|
+
}
|
843
|
+
two.sysinfo = {
|
844
|
+
'bios' => {'vendor': 'Another Vendor'},
|
845
|
+
'system' => {'serial': 'AABBCCDDEE'},
|
846
|
+
'oem strings' => ['string 2'],
|
847
|
+
}
|
848
|
+
|
849
|
+
subject.finalize!
|
850
|
+
expect(subject.sysinfo).to eq(
|
851
|
+
'bios' => {'vendor': 'Another Vendor'},
|
852
|
+
'system' => {'manufacturer': 'some manufacturer', 'serial': 'AABBCCDDEE'},
|
853
|
+
'oem strings' => ['string 1', 'string 2'],
|
854
|
+
)
|
855
|
+
end
|
856
|
+
end
|
710
857
|
end
|
711
858
|
end
|
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
|
@@ -195,7 +197,7 @@ describe VagrantPlugins::ProviderLibvirt::Driver do
|
|
195
197
|
allow(machine.provider_config).to receive(:qemu_use_session).and_return(true)
|
196
198
|
end
|
197
199
|
|
198
|
-
it 'should
|
200
|
+
it 'should retrieve the address via the system dhcp-leases API' do
|
199
201
|
expect(domain).to receive(:mac).and_return("52:54:00:8b:dc:5f")
|
200
202
|
expect(subject).to receive(:system_connection).and_return(system_connection1)
|
201
203
|
expect(system_connection1).to receive(:list_all_networks).and_return(networks)
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'support/sharedcontext'
|
5
|
+
|
6
|
+
require 'vagrant-libvirt/plugin'
|
7
|
+
|
8
|
+
|
9
|
+
describe VagrantPlugins::ProviderLibvirt::Plugin do
|
10
|
+
subject { described_class.new }
|
11
|
+
|
12
|
+
include_context 'unit'
|
13
|
+
|
14
|
+
describe '#action_hook remove_libvirt_image' do
|
15
|
+
before do
|
16
|
+
# set up some dummy boxes
|
17
|
+
box_path = File.join(env[:env].boxes.directory, 'vagrant-libvirt-VAGRANTSLASH-test', '0.0.1')
|
18
|
+
['libvirt', 'virtualbox'].each do |provider|
|
19
|
+
provider_path = File.join(box_path, provider)
|
20
|
+
FileUtils.mkdir_p(provider_path)
|
21
|
+
metadata = {'provider': provider}
|
22
|
+
File.open(File.join(provider_path, 'metadata.json'), "w") { |f| f.write metadata.to_json }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should call the action hook after box remove' do
|
27
|
+
expect(VagrantPlugins::ProviderLibvirt::Action).to receive(:remove_libvirt_image).and_return(Vagrant::Action::Builder.new)
|
28
|
+
expect {
|
29
|
+
env[:env].action_runner.run(
|
30
|
+
Vagrant::Action.action_box_remove, {
|
31
|
+
box_name: 'vagrant-libvirt/test',
|
32
|
+
box_provider: 'libvirt',
|
33
|
+
box_version: '0.0.1',
|
34
|
+
force_confirm_box_remove: true,
|
35
|
+
box_remove_all_versions: false,
|
36
|
+
ui: ui,
|
37
|
+
}
|
38
|
+
)
|
39
|
+
}.to_not raise_error
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -23,7 +23,16 @@
|
|
23
23
|
<kernel></kernel>
|
24
24
|
<initrd></initrd>
|
25
25
|
<cmdline></cmdline>
|
26
|
+
<smbios mode='sysinfo'/>
|
26
27
|
</os>
|
28
|
+
<sysinfo type='smbios'>
|
29
|
+
<system>
|
30
|
+
<entry name='serial'>AAAAAAAA</entry>
|
31
|
+
</system>
|
32
|
+
<oemStrings>
|
33
|
+
<entry>AAAAAAAA</entry>
|
34
|
+
</oemStrings>
|
35
|
+
</sysinfo>
|
27
36
|
<features>
|
28
37
|
<acpi/>
|
29
38
|
<apic/>
|
@@ -99,7 +108,7 @@
|
|
99
108
|
</graphics>
|
100
109
|
<video>
|
101
110
|
<model type='cirrus' vram='16384' heads='1'>
|
102
|
-
|
111
|
+
<acceleration accel3d='yes'/>
|
103
112
|
</model>
|
104
113
|
</video>
|
105
114
|
<rng model='virtio'>
|
@@ -112,20 +121,20 @@
|
|
112
121
|
</hostdev>
|
113
122
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
114
123
|
<source>
|
115
|
-
|
124
|
+
<address domain='0x0001' bus='0x03' slot='0x00' function='0x0'/>
|
116
125
|
</source>
|
117
126
|
</hostdev>
|
118
127
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
119
128
|
<source>
|
120
|
-
|
129
|
+
<address domain='0x0002' bus='0x04' slot='0x00' function='0x0'/>
|
121
130
|
</source>
|
122
131
|
<address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
|
123
132
|
</hostdev>
|
124
133
|
<hostdev mode='subsystem' type='usb'>
|
125
134
|
<source startupPolicy='mandatory'>
|
126
|
-
|
127
|
-
|
128
|
-
|
135
|
+
<vendor id='0x1234'/>
|
136
|
+
<product id='0xabcd'/>
|
137
|
+
<address bus='1' device='2'/>
|
129
138
|
</source>
|
130
139
|
</hostdev>
|
131
140
|
<redirdev bus='usb' type='tcp'>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<domain type='' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
2
|
+
<name></name>
|
3
|
+
<title></title>
|
4
|
+
<description></description>
|
5
|
+
<uuid></uuid>
|
6
|
+
<memory></memory>
|
7
|
+
<vcpu>1</vcpu>
|
8
|
+
<cpu mode='host-model'>
|
9
|
+
<model fallback='allow'></model>
|
10
|
+
</cpu>
|
11
|
+
<os>
|
12
|
+
<type>hvm</type>
|
13
|
+
<kernel></kernel>
|
14
|
+
<initrd></initrd>
|
15
|
+
<cmdline></cmdline>
|
16
|
+
</os>
|
17
|
+
<features>
|
18
|
+
<acpi/>
|
19
|
+
<apic/>
|
20
|
+
<pae/>
|
21
|
+
</features>
|
22
|
+
<clock offset='utc'>
|
23
|
+
</clock>
|
24
|
+
<devices>
|
25
|
+
<disk type='file' device='disk'>
|
26
|
+
<alias name='ua-box-volume-0'/>
|
27
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
28
|
+
<source file='/var/lib/libvirt/images/test.qcow2'/>
|
29
|
+
<target dev='vda' bus='scsi'/>
|
30
|
+
</disk>
|
31
|
+
<controller type='scsi' model='virtio-scsi' index='0'/>
|
32
|
+
<serial type='pty'>
|
33
|
+
<target port='0'/>
|
34
|
+
</serial>
|
35
|
+
<console type='pty'>
|
36
|
+
<target port='0'/>
|
37
|
+
</console>
|
38
|
+
<input type='mouse' bus='ps2'/>
|
39
|
+
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
40
|
+
<video>
|
41
|
+
<model type='cirrus' vram='16384' heads='1'/>
|
42
|
+
</video>
|
43
|
+
</devices>
|
44
|
+
</domain>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<domain type='' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
2
|
+
<name></name>
|
3
|
+
<title></title>
|
4
|
+
<description></description>
|
5
|
+
<uuid></uuid>
|
6
|
+
<memory></memory>
|
7
|
+
<vcpu>1</vcpu>
|
8
|
+
<cpu mode='host-model'>
|
9
|
+
<model fallback='allow'></model>
|
10
|
+
</cpu>
|
11
|
+
<os>
|
12
|
+
<type>hvm</type>
|
13
|
+
<kernel></kernel>
|
14
|
+
<initrd></initrd>
|
15
|
+
<cmdline></cmdline>
|
16
|
+
</os>
|
17
|
+
<features>
|
18
|
+
<acpi/>
|
19
|
+
<apic/>
|
20
|
+
<pae/>
|
21
|
+
</features>
|
22
|
+
<clock offset='utc'>
|
23
|
+
</clock>
|
24
|
+
<devices>
|
25
|
+
<disk type='file' device='disk'>
|
26
|
+
<alias name='ua-box-volume-0'/>
|
27
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
28
|
+
<source file='/var/lib/libvirt/images/test.qcow2'/>
|
29
|
+
<target dev='sda' bus='scsi'/>
|
30
|
+
</disk>
|
31
|
+
<controller type='scsi' model='virtio-scsi' index='0'/>
|
32
|
+
<serial type='pty'>
|
33
|
+
<target port='0'/>
|
34
|
+
</serial>
|
35
|
+
<console type='pty'>
|
36
|
+
<target port='0'/>
|
37
|
+
</console>
|
38
|
+
<input type='mouse' bus='ps2'/>
|
39
|
+
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
40
|
+
<video>
|
41
|
+
<model type='cirrus' vram='16384' heads='1'/>
|
42
|
+
</video>
|
43
|
+
</devices>
|
44
|
+
</domain>
|
@@ -0,0 +1,130 @@
|
|
1
|
+
<domain type='' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
2
|
+
<name></name>
|
3
|
+
<title></title>
|
4
|
+
<description></description>
|
5
|
+
<uuid></uuid>
|
6
|
+
<memory></memory>
|
7
|
+
<vcpu>1</vcpu>
|
8
|
+
<cpu mode='host-model'>
|
9
|
+
<model fallback='allow'></model>
|
10
|
+
</cpu>
|
11
|
+
<os>
|
12
|
+
<type>hvm</type>
|
13
|
+
<kernel></kernel>
|
14
|
+
<initrd></initrd>
|
15
|
+
<cmdline></cmdline>
|
16
|
+
</os>
|
17
|
+
<features>
|
18
|
+
<acpi/>
|
19
|
+
<apic/>
|
20
|
+
<pae/>
|
21
|
+
</features>
|
22
|
+
<clock offset='utc'>
|
23
|
+
</clock>
|
24
|
+
<devices>
|
25
|
+
<disk type='file' device='disk'>
|
26
|
+
<alias name='ua-box-volume-0'/>
|
27
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
28
|
+
<source file='/var/lib/libvirt/images/test-1.img'/>
|
29
|
+
<target dev='sda' bus='scsi'/>
|
30
|
+
</disk>
|
31
|
+
<disk type='file' device='disk'>
|
32
|
+
<alias name='ua-box-volume-1'/>
|
33
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
34
|
+
<source file='/var/lib/libvirt/images/test-2.img'/>
|
35
|
+
<target dev='sdb' bus='scsi'/>
|
36
|
+
</disk>
|
37
|
+
<disk type='file' device='disk'>
|
38
|
+
<alias name='ua-box-volume-2'/>
|
39
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
40
|
+
<source file='/var/lib/libvirt/images/test-3.img'/>
|
41
|
+
<target dev='sdc' bus='scsi'/>
|
42
|
+
</disk>
|
43
|
+
<disk type='file' device='disk'>
|
44
|
+
<alias name='ua-box-volume-3'/>
|
45
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
46
|
+
<source file='/var/lib/libvirt/images/test-4.img'/>
|
47
|
+
<target dev='sdd' bus='scsi'/>
|
48
|
+
</disk>
|
49
|
+
<disk type='file' device='disk'>
|
50
|
+
<alias name='ua-box-volume-4'/>
|
51
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
52
|
+
<source file='/var/lib/libvirt/images/test-5.img'/>
|
53
|
+
<target dev='sde' bus='scsi'/>
|
54
|
+
</disk>
|
55
|
+
<disk type='file' device='disk'>
|
56
|
+
<alias name='ua-box-volume-5'/>
|
57
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
58
|
+
<source file='/var/lib/libvirt/images/test-6.img'/>
|
59
|
+
<target dev='sdf' bus='scsi'/>
|
60
|
+
</disk>
|
61
|
+
<disk type='file' device='disk'>
|
62
|
+
<alias name='ua-box-volume-6'/>
|
63
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
64
|
+
<source file='/var/lib/libvirt/images/test-7.img'/>
|
65
|
+
<target dev='sdg' bus='scsi'/>
|
66
|
+
</disk>
|
67
|
+
<disk type='file' device='disk'>
|
68
|
+
<alias name='ua-box-volume-7'/>
|
69
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
70
|
+
<source file='/var/lib/libvirt/images/test-8.img'/>
|
71
|
+
<target dev='sdh' bus='scsi'/>
|
72
|
+
</disk>
|
73
|
+
<disk type='file' device='disk'>
|
74
|
+
<alias name='ua-box-volume-8'/>
|
75
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
76
|
+
<source file='/var/lib/libvirt/images/test-9.img'/>
|
77
|
+
<target dev='sdi' bus='scsi'/>
|
78
|
+
</disk>
|
79
|
+
<disk type='file' device='disk'>
|
80
|
+
<alias name='ua-box-volume-9'/>
|
81
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
82
|
+
<source file='/var/lib/libvirt/images/test-10.img'/>
|
83
|
+
<target dev='sdj' bus='scsi'/>
|
84
|
+
</disk>
|
85
|
+
<disk type='file' device='disk'>
|
86
|
+
<alias name='ua-box-volume-10'/>
|
87
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
88
|
+
<source file='/var/lib/libvirt/images/test-11.img'/>
|
89
|
+
<target dev='sdk' bus='scsi'/>
|
90
|
+
</disk>
|
91
|
+
<disk type='file' device='disk'>
|
92
|
+
<alias name='ua-box-volume-11'/>
|
93
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
94
|
+
<source file='/var/lib/libvirt/images/test-12.img'/>
|
95
|
+
<target dev='sdl' bus='scsi'/>
|
96
|
+
</disk>
|
97
|
+
<disk type='file' device='disk'>
|
98
|
+
<alias name='ua-box-volume-12'/>
|
99
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
100
|
+
<source file='/var/lib/libvirt/images/test-13.img'/>
|
101
|
+
<target dev='sdm' bus='scsi'/>
|
102
|
+
</disk>
|
103
|
+
<disk type='file' device='disk'>
|
104
|
+
<alias name='ua-box-volume-13'/>
|
105
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
106
|
+
<source file='/var/lib/libvirt/images/test-14.img'/>
|
107
|
+
<target dev='sdn' bus='scsi'/>
|
108
|
+
</disk>
|
109
|
+
<disk type='file' device='disk'>
|
110
|
+
<alias name='ua-box-volume-14'/>
|
111
|
+
<driver name='qemu' type='qcow2' cache='unsafe'/>
|
112
|
+
<source file='/var/lib/libvirt/images/test-15.img'/>
|
113
|
+
<target dev='sdo' bus='scsi'/>
|
114
|
+
</disk>
|
115
|
+
<controller type='scsi' model='virtio-scsi' index='0'/>
|
116
|
+
<controller type='scsi' model='virtio-scsi' index='1'/>
|
117
|
+
<controller type='scsi' model='virtio-scsi' index='2'/>
|
118
|
+
<serial type='pty'>
|
119
|
+
<target port='0'/>
|
120
|
+
</serial>
|
121
|
+
<console type='pty'>
|
122
|
+
<target port='0'/>
|
123
|
+
</console>
|
124
|
+
<input type='mouse' bus='ps2'/>
|
125
|
+
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
|
126
|
+
<video>
|
127
|
+
<model type='cirrus' vram='16384' heads='1'/>
|
128
|
+
</video>
|
129
|
+
</devices>
|
130
|
+
</domain>
|