Bug 1336437 - [RFE] Set Disk Interface when creating new VMs in RHEV Compute Resource
Summary: [RFE] Set Disk Interface when creating new VMs in RHEV Compute Resource
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.1.8
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On: 1665134
Blocks: 1738894
TreeView+ depends on / blocked
 
Reported: 2016-05-16 13:06 UTC by Vladimir Vasilev
Modified: 2020-04-14 13:22 UTC (History)
10 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.19.6.3-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:22:16 UTC
Target Upstream Version:


Attachments (Terms of Use)
Storage form (33.41 KB, image/png)
2018-07-09 10:14 UTC, Shira Maximov
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 21762 Normal Closed Expose underlying disk options for oVirt provider 2020-04-14 13:37:12 UTC
Red Hat Bugzilla 1430824 None CLOSED [RFE] support virtio-scsi disks in host-specific bootdisk 2019-10-29 17:12:52 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:22:44 UTC

Internal Links: 1430824

Description Vladimir Vasilev 2016-05-16 13:06:08 UTC
Description of problem:
When creating new RHEL (not sure about rest) VMs in RHEV Compute Resource by default the disk interface is "virtio". Since RHEV 6.4 "virtio-scsi" was introduced which is an improved version. It will be nice if one can select which interface to use directly in Satellite

Version-Release number of selected component (if applicable):
6.1.X

How reproducible:
100%

Steps to Reproduce:
1. Create new RHEL7 VM from Satellite to RHEV Compute Resource
2. Check the disk interface for this VM

Actual results:
It's always "virtio"

Expected results:
Be able to select between different interfaces (ide, virtio, virtio-scsi as of now).

Additional info:
Info about virtio-scsi itself - https://access.redhat.com/solutions/300563

Comment 1 Shira Maximov 2018-07-05 12:25:53 UTC
I'm closing this issue on WORKSFORME because this feature already exists.

Comment 2 Vladimir Vasilev 2018-07-09 08:37:20 UTC
Where can I set it? I don't see any changes in 6.3.1, there's Size, Storage domain, Preallocate disk and Bootable.

Comment 3 Shira Maximov 2018-07-09 10:14:54 UTC
Created attachment 1457433 [details]
Storage form

you can find the disk interface under `Storage` (in virtual machine tab)

Comment 4 Vladimir Vasilev 2018-07-09 15:55:26 UTC
This does not exist in 6.3.1. Is it part of a minor update which we did not applied yet?

Comment 5 Shira Maximov 2018-07-10 13:36:00 UTC
Looks like this will only be available in 6.4

Comment 8 Lukáš Hellebrandt 2019-01-07 14:51:36 UTC
I checked this through WebUI and creating, importing and associating host works as expected.

How can I create a volume and specify its type through Hammer? I can't find it in help.

Comment 9 Shira Maximov 2019-01-07 15:00:03 UTC
hey, please run 'hammer host create --help', 
part of the output is as following:
  oVirt:
    --compute-attributes:
      cluster
      template            Hardware profile to use
      cores               Integer value, number of cores
      memory              Amount of memory, integer value in bytes
      start               Boolean (expressed as 0 or 1), whether to start the machine or not

    --interface:
      compute_name        Eg. eth0
      compute_network     Select one of available networks for a cluster

    --volume:
      size_gb             Volume size in GB, integer value
      storage_domain      Select one of available storage domains
      bootable            Boolean, only one volume can be bootable

Comment 10 Lukáš Hellebrandt 2019-01-07 15:03:52 UTC
I still can't see how to specify interface type. Which is what this BZ is about. Note, network interface type != disk interface type.

Comment 11 Shira Maximov 2019-01-07 15:29:10 UTC
It's missing from hammer, please open a new BZ for hammer.

Comment 12 Lukáš Hellebrandt 2019-01-08 09:42:06 UTC
The functionality should be available through WebUI & Hammer & API. I think this BZ clearly failed verification so instead of verifying it and opening a new one, I'm setting this one back to assigned.

Comment 13 Bryan Kearney 2019-01-08 13:34:50 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/21762 has been resolved.

Comment 14 Lukáš Hellebrandt 2019-01-08 14:00:55 UTC
Bryan, I think you (or more likely, your bot) changed the status by mistake. Setting back to ASSIGNED.

Comment 15 Bryan Kearney 2019-01-08 14:06:38 UTC
Setting FailedQA so that the script will not reset this.

Comment 16 Shira Maximov 2019-01-08 16:52:56 UTC
Lukas,
The functionality is in hammer, but it missing from the help. 
if you will add interface=<your interface (for example id)> under --volume section that will work, 
please try and let me know if it worked for you.

Comment 17 Lukáš Hellebrandt 2019-01-10 14:30:07 UTC
It works for API v3.

It doesn't work for API v4 due to bug 1665134.

Setting this back to ASSIGNED due to missing help content.

Comment 18 Bryan Kearney 2019-01-25 17:16:56 UTC
Back to Shira.

Comment 20 orabin 2019-03-04 16:23:14 UTC
The bug this depends on was updated and the error there needs to be fixed but was a result of wrong parameters so it should not block testing for this bug.

From the other bug it seems all that is missing here is the documentation in hammer.

Comment 22 Lukáš Hellebrandt 2020-01-27 14:28:51 UTC
Setting back to ASSIGNED due to the same reason as mentioned in comment 17 (missing Hammer help content).

Comment 23 Shira Maximov 2020-01-28 08:01:02 UTC
The help was added in the fix https://bugzilla.redhat.com/show_bug.cgi?id=1738894 : 
  oVirt:
    --volume:
      size_gb             Volume size in GB, integer value
      storage_domain      ID or name of storage domain
      bootable            Boolean, only one volume can be bootable
      preallocate         Boolean, set true to preallocate
      wipe_after_delete   Boolean, set true to wipe disk after delete
      interface           Disk interface name, must be ide, virto or virto_scsi

    --interface:
      compute_name        Compute name, e.g. eth0
      compute_network     Select one of available networks for a cluster, must be an ID or a name
      compute_interface   Interface type

    --compute-attributes:
      cluster             ID or name of cluster to use
      template            Hardware profile to use
      cores               Integer value, number of cores
      sockets             Integer value, number of sockets
      memory              Amount of memory, integer value in bytes
      start               Boolean (expressed as 0 or 1), whether to start the machine or not

Lukas, can you check again ?

Comment 24 Lukáš Hellebrandt 2020-01-28 09:58:21 UTC
Shira, I can check again and again but in Sat 6.7 snap 11, the help doesn't contain it:

# hammer host create --help
...
  oVirt:
    --volume:
      size_gb             Volume size in GB, integer value
      storage_domain      ID of storage domain
      bootable            Boolean, only one volume can be bootable
      preallocate         Boolean, set true to preallocate
      wipe_after_delete   Boolean, set true to wipe disk after delete

    --interface:
      compute_name        Compute name, e.g. eth0
      compute_network     Select one of available networks for a cluster, must be an ID
      compute_interface   Interface type

    --compute-attributes:
      cluster             ID of cluster to use
      template            Hardware profile to use
      cores               Integer value, number of cores
      sockets             Integer value, number of sockets
      memory              Amount of memory, integer value in bytes
      start               Boolean (expressed as 0 or 1), whether to start the machine or not
...

Comment 25 Shira Maximov 2020-01-28 10:24:05 UTC
lukas, under --interface you have compute_interface which is the interface type.

Comment 26 Lukáš Hellebrandt 2020-01-28 12:17:06 UTC
Please, see my comment 10.

Comment 27 Shira Maximov 2020-01-28 12:56:05 UTC
I opened a merged request to cherry-pick

Comment 29 Lukáš Hellebrandt 2020-02-13 14:28:47 UTC
Verified with Sat 6.7 snap 11. Used both WebUI and Hammer to create a host with volume of specified type:

hammer host create --compute-resource-id 1 --organization-id 1 --location-id 2 --name rhev3cli7 --domain-id 1 --subnet-id 1 --operatingsystem 'RedHat 7.7' --architecture x86_64 --provision-method image --image-id 1 --interface "compute_name=test,compute_network=<ID>,compute_interface=VirtIO" --volume "size_gb=20,storage_domain=<ID>,bootable=false,preallocate=false,wipe_after_delete=false,interface=ide"

The Hammer help now contains:

  oVirt:
    --volume:
      size_gb             Volume size in GB, integer value
      storage_domain      ID of storage domain
      bootable            Boolean, only one volume can be bootable
      preallocate         Boolean, set true to preallocate
      wipe_after_delete   Boolean, set true to wipe disk after delete
      interface           Disk interface name, must be ide, virto or virto_scsi

Comment 32 errata-xmlrpc 2020-04-14 13:22:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454


Note You need to log in before you can comment on or make changes to this bug.