[
https://issues.apache.org/jira/browse/CLOUDSTACK-10160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16268079#comment-16268079
]
ASF GitHub Bot commented on CLOUDSTACK-10160:
---------------------------------------------
rhtyd closed pull request #2341: CLOUDSTACK-10160: Fix typo in Libvirt XML
definition for Virtio-SCSI
URL: https://github.com/apache/cloudstack/pull/2341
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
index ff3eb03ebdf..0f34a92d6d6 100644
---
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
+++
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
@@ -1411,10 +1411,10 @@ public SCSIDef() {
public String toString() {
StringBuilder scsiBuilder = new StringBuilder();
- scsiBuilder.append(String.format("<controller type='scsi'
index='%d' mode='virtio-scsi'>\n", this.index ));
+ scsiBuilder.append(String.format("<controller type='scsi'
index='%d' model='virtio-scsi'>\n", this.index ));
scsiBuilder.append(String.format("<address type='pci'
domain='0x%04X' bus='0x%02X' slot='0x%02X' function='0x%01X'/>\n",
this.domain, this.bus, this.slot, this.function ) );
- scsiBuilder.append("</controller>");
+ scsiBuilder.append("</controller>\n");
return scsiBuilder.toString();
}
}
diff --git
a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
index 8f0f93d31ab..e758dece166 100644
---
a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
+++
b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
@@ -22,6 +22,7 @@
import junit.framework.TestCase;
import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef;
import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ChannelDef;
+import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.SCSIDef;
import com.cloud.utils.Pair;
import java.io.File;
@@ -158,4 +159,13 @@ public void testWatchDogDef() {
assertEquals(def.getAction(), action);
}
+ public void testSCSIDef() {
+ SCSIDef def = new SCSIDef();
+ String str = def.toString();
+ String expected = "<controller type='scsi' index='0'
model='virtio-scsi'>\n" +
+ "<address type='pci' domain='0x0000' bus='0x00' slot='0x09'
function='0x0'/>\n" +
+ "</controller>\n";
+ assertEquals(str, expected);
+ }
+
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> KVM VirtIO-SCSI not defined properly in Libvirt XML
> ---------------------------------------------------
>
> Key: CLOUDSTACK-10160
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10160
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Affects Versions: 4.10.0.0
> Reporter: Wido den Hollander
> Assignee: Wido den Hollander
> Fix For: Future
>
>
> The XML for defining Virtio-SCSI has a typo:
> It defines:
> *<controller type='scsi' index='0' mode='virtio-scsi'>*
> But this should be
> *<controller type='scsi' index='0' model='virtio-scsi'/>*
> Sources:
> - https://libvirt.org/formatdomain.html#elementsControllers
> - https://www.redhat.com/archives/libvirt-users/2014-February/msg00011.html
> A scsi controller has an optional attribute model, which is one of 'auto',
> 'buslogic', 'ibmvscsi', 'lsilogic', 'lsisas1068', 'lsisas1078', 'virtio-scsi'
> or 'vmpvscsi'.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)