Bug 1645069 - Creating VM with custom PCI address for VirtIO disks fails
Summary: Creating VM with custom PCI address for VirtIO disks fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 1.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 1.4
Assignee: Vladik Romanovsky
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-01 10:56 UTC by Kedar Bidarkar
Modified: 2019-02-26 13:24 UTC (History)
6 users (show)

Fixed In Version: 1.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-26 13:24:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Tested with custom PCI address with q35 "machine type". (7.44 KB, text/plain)
2019-01-14 15:35 UTC, Kedar Bidarkar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt issues 1668 0 None None None 2018-11-05 14:32:38 UTC
Red Hat Product Errata RHEA-2019:0417 0 None None None 2019-02-26 13:24:20 UTC

Description Kedar Bidarkar 2018-11-01 10:56:42 UTC
Description of problem:

Creating VM with custom PCI address for VirtIO disks fails.


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

CNV-1.3


How reproducible:

Create a VMI via the vm-spec:

spec:
  domain:
    devices:
      disks:
      - disk:
          bus: virtio
          pciAddress: 0000:04:10.0
        name: registrydisk
        volumeName: registryvolume



Steps to Reproduce:
1. Specify custom pciAddress for virtio disk as mentioned above.
2. 
3.

Actual results:

VM creation fails with custom pciAddress for virtio disks, with the below message as seen from the "oc describe vmi <vm-name>"

---
Status:
  Conditions:
    Message:               server error. command Launcher.Sync failed: virError(Code=27, Domain=20, Message='XML error: Invalid PCI address 0000:04:10.0. slot must be <= 0')
---

Events:
  Type     Reason              Age                From                                                   Message
  ----     ------              ----               ----                                                   -------

Warning  SyncFailed          7s (x12 over 18s)  virt-handler, cnv-executor-kbidarka-node2.example.com  server error. command Launcher.Sync failed: virError(Code=27, Domain=20, Message='XML error: Invalid PCI address 0000:04:10.0. slot must be <= 0')
---

Cannot provide/attach  domain xml file from virt-launcher as it does not exist.


Expected results:

VM creation should work successfully with custom pciAddress for virtio disks.

Additional info:

1) https://libvirt.org/formatdomain.html#elementsAddress
2) https://github.com/kubevirt/kubevirt/pull/1484

Comment 1 Fabian Deutsch 2018-11-02 15:05:18 UTC
I do not consider this a bug.

Libvirt clearly explains what constraints are on the addresses, and KubeVirt is just passing this message back to the user.
And thsi is also happening today.

To be clear: We try to avoid to replicate libvirts validation functionality inside of KubeVirt, thus instead we should imrpove to deliver these libvirt validation feedback to the user.

Comment 2 Kedar Bidarkar 2018-11-06 09:50:19 UTC
Agreed the symptoms may appear to consider this not a bug, but rather issue with Libvirt constrains.

I raised this bug for the symptoms initially, while working with PCI Address for virtio disks, as no matter what values I used it failed always.

LAter, after investigating the symptoms reported in this bug, it was realized the actual issue to be this, https://github.com/kubevirt/kubevirt/issues/1668#issuecomment-435895100

Now, this bug is required to track this particular issue. :)

Comment 3 Fabian Deutsch 2018-11-06 11:50:31 UTC
Right.

This bug is about removing the blacklisting of certain PCI addresses. Which is currently in place.

Comment 8 Kedar Bidarkar 2018-11-06 13:50:57 UTC
ok, I was testing with chipset "q35" and issue is with this , will proceed with testing this with "pc".

Comment 9 Fabian Deutsch 2018-11-27 13:25:12 UTC
Vladik, was this addressed by one of the patches in that area?

Comment 10 Vladik Romanovsky 2018-11-27 17:58:10 UTC
(In reply to Fabian Deutsch from comment #9)
> Vladik, was this addressed by one of the patches in that area?

Fabian, I've backported the fix in https://github.com/kubevirt/kubevirt/pull/1674

Comment 11 Vladik Romanovsky 2018-11-27 18:02:24 UTC
oh, sorry, I was fixed in https://github.com/kubevirt/kubevirt/pull/1669

Comment 12 Fabian Deutsch 2018-11-27 19:58:39 UTC
Okay this is in v0.10 and not backported, thus in 1.4

https://github.com/kubevirt/kubevirt/commit/391753ddffb7a770bb7372196c0860e08ec5c775

Comment 13 Kedar Bidarkar 2019-01-14 15:35:56 UTC
Created attachment 1520560 [details]
Tested with custom PCI address with q35 "machine type".

Comment 14 Kedar Bidarkar 2019-01-14 15:36:41 UTC
This works fine now with machine type: "q35"

VERIFIED With CNV-1.4

Comment 17 errata-xmlrpc 2019-02-26 13:24: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/RHEA-2019:0417


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