You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/07/09 07:46:24 UTC

[GitHub] [cloudstack] ustcweizhou commented on a change in pull request #3319: Use IDE as the bus type for root disks and VIRTIO for data disks when platform emulator strings start with Windows* except Windows PV

ustcweizhou commented on a change in pull request #3319: Use IDE as the bus type for root disks and VIRTIO for data disks when platform emulator strings start with Windows* except Windows PV
URL: https://github.com/apache/cloudstack/pull/3319#discussion_r301439769
 
 

 ##########
 File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ##########
 @@ -3198,12 +3202,15 @@ public boolean isCentosHost() {
             return DiskDef.DiskBus.IDE;
         } else if (platformEmulator.startsWith("Other PV Virtio-SCSI")) {
             return DiskDef.DiskBus.SCSI;
-        } else if (platformEmulator.startsWith("Ubuntu") || platformEmulator.startsWith("Fedora 13") || platformEmulator.startsWith("Fedora 12") || platformEmulator.startsWith("Fedora 11") ||
-                platformEmulator.startsWith("Fedora 10") || platformEmulator.startsWith("Fedora 9") || platformEmulator.startsWith("CentOS 5.3") || platformEmulator.startsWith("CentOS 5.4") ||
-                platformEmulator.startsWith("CentOS 5.5") || platformEmulator.startsWith("CentOS") || platformEmulator.startsWith("Fedora") ||
-                platformEmulator.startsWith("Red Hat Enterprise Linux 5.3") || platformEmulator.startsWith("Red Hat Enterprise Linux 5.4") ||
-                platformEmulator.startsWith("Red Hat Enterprise Linux 5.5") || platformEmulator.startsWith("Red Hat Enterprise Linux 6") || platformEmulator.startsWith("Debian GNU/Linux") ||
-                platformEmulator.startsWith("FreeBSD 10") || platformEmulator.startsWith("Oracle") || platformEmulator.startsWith("Other PV")) {
+        } else if (platformEmulator.startsWith("Ubuntu") ||
+                platformEmulator.startsWith("Fedora") ||
+                platformEmulator.startsWith("CentOS") ||
+                platformEmulator.startsWith("Red Hat Enterprise Linux") ||
+                platformEmulator.startsWith("Debian GNU/Linux") ||
+                platformEmulator.startsWith("FreeBSD") ||
+                platformEmulator.startsWith("Oracle") ||
+                platformEmulator.startsWith("Windows PV") ||
 
 Review comment:
   actually the platformEmulator is "Other PV" if guest os type is "Windows PV".
   so line 3212 is not needed
   
   ```
   mysql> select * from guest_os where display_name='Windows PV';
   +-----+-------------+------+--------------------------------------+--------------+---------------------+---------+-----------------+---------+
   | id  | category_id | name | uuid                                 | display_name | created             | removed | is_user_defined | display |
   +-----+-------------+------+--------------------------------------+--------------+---------------------+---------+-----------------+---------+
   | 160 |           6 | NULL | e1990eb3-4b9d-11e3-8346-2c44fd7a3378 | Windows PV   | 2016-07-27 10:48:33 | NULL    |               0 |       0 |
   +-----+-------------+------+--------------------------------------+--------------+---------------------+---------+-----------------+---------+
   1 row in set (0.00 sec)
   
   mysql> select * from guest_os_hypervisor where guest_os_id=160;
   +------+-----------------+---------------+-------------+--------------------+--------------------------------------+---------------------+---------+-----------------+
   | id   | hypervisor_type | guest_os_name | guest_os_id | hypervisor_version | uuid                                 | created             | removed | is_user_defined |
   +------+-----------------+---------------+-------------+--------------------+--------------------------------------+---------------------+---------+-----------------+
   | 1264 | KVM             | Other PV      |         160 | default            | e768e05d-53d6-11e6-8d7a-2c44fd7a3454 | 2016-07-27 10:48:35 | NULL    |               0 |
   | 2114 | LXC             | Other PV      |         160 | default            | e965179c-53d6-11e6-8d7a-2c44fd7a3454 | 2016-07-27 10:48:38 | NULL    |               0 |
   +------+-----------------+---------------+-------------+--------------------+--------------------------------------+---------------------+---------+-----------------+
   2 rows in set (0.00 sec)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services