Skip to content

Commit dacbef7

Browse files
committed
Use virtio-scsi instead ide
1 parent 6e22208 commit dacbef7

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

cloudify_libvirt/templates/domain.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<controller type="pci" index="0" model="pci-root">
1919
<alias name="pci.0"/>
2020
</controller>
21-
<controller type="ide" index="0">
22-
<alias name="ide0"/>
23-
<address function="0x1" type="pci" domain="0x0000" slot="0x01" bus="0x00"/>
21+
<controller type="scsi" index="0" model="virtio-scsi">
22+
<alias name="scsi0"/>
23+
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
2424
</controller>
2525
<emulator>/usr/bin/qemu-system-x86_64</emulator>
2626
{% for network in networks %}
@@ -44,13 +44,13 @@
4444
<disk device="disk" type="file">
4545
<target dev="{{ disk.dev }}" bus="{{ disk.bus }}"/>
4646
<source file="{{ disk.file }}"/>
47-
<driver type="{{ disk.type }}" name="qemu"/>
47+
<driver type="{{ disk.type }}"/>
4848
</disk>
4949
{% endfor %}
5050
</devices>
5151
<on_crash>restart</on_crash>
5252
<on_reboot>restart</on_reboot>
53-
<vcpu placement="static">1</vcpu>
53+
<vcpu placement="static">{% if vcpu is defined %}{{ vcpu }}{% else %}1{% endif %}</vcpu>
5454
<features>
5555
<pae/>
5656
<acpi/>

examples/scripts/vm_preconfigure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
disks = ctx.source.instance.runtime_properties["params"]['disks']
2121

2222
disks.append({
23-
'bus': 'ide',
24-
'dev': 'hda',
23+
'bus': 'scsi',
24+
'dev': 'sda',
2525
'file': ctx.target.instance.runtime_properties.get('vm_image'),
2626
'type': 'qcow2'
2727
})
2828

2929
disks.append({
30-
'bus': 'ide',
31-
'dev': 'hdb',
30+
'bus': 'scsi',
31+
'dev': 'sdb',
3232
'file': ctx.target.instance.runtime_properties.get('vm_cloudinit'),
3333
'type': 'raw'
3434
})

examples/templates/domain-arm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<disk device="disk" type="file">
5454
<target dev="{{ disk.dev }}" bus="{{ disk.bus }}"/>
5555
<source file="{{ disk.file }}"/>
56-
<driver type="{{ disk.type }}" name="qemu"/>
56+
<driver type="{{ disk.type }}"/>
5757
</disk>
5858
{% endfor %}
5959
</devices>

examples/vm_fabric.amd64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ node_templates:
7373
create:
7474
inputs:
7575
params:
76+
vcpu: 2
7677
memmory_size: 524288
7778
networks:
7879
- network: { get_attribute: [common_network, resource_id] }

0 commit comments

Comments
 (0)