Description of problem: Creating a VMI with input device 'tablet', but without specifying 'bus' attribute (not mandatory), would fail. The VMI will not start. ksimon : Enabling of usb device is done before the check if tablet has a usb bus; if tablet doesn't contain usb bus, usb controller is never enabled. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create VMI from yaml: --- apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance metadata: labels: special: tabletpc-empty name: tabletpc-empty spec: domain: devices: inputs: - type: tablet name: tablet0 disks: - disk: bus: virtio name: containerdisk - disk: bus: virtio name: cloudinitdisk machine: type: "" resources: requests: memory: 1024M terminationGracePeriodSeconds: 0 volumes: - containerDisk: image: kubevirt/fedora-cloud-container-disk-demo name: containerdisk - cloudInitNoCloud: userData: |- #cloud-config password: fedora chpasswd: { expire: False } name: cloudinitdisk 2. Check the VMI status oc get vmi Actual results: VMI fails to start $ oc get vmi NAME AGE PHASE tabletpc-empty 34m Failed Expected results: VMI should be created with the default bus (usb) Additional info: $ oc describe vmi tabletpc-empty Name: tabletpc-empty Namespace: default Labels: kubevirt.io/nodeName=host-172-16-0-18 special=tabletpc-empty Annotations: kubevirt.io/latest-observed-api-version=v1alpha3 kubevirt.io/storage-observed-api-version=v1alpha3 API Version: kubevirt.io/v1alpha3 Kind: VirtualMachineInstance Metadata: Creation Timestamp: 2019-09-25T11:36:19Z Finalizers: foregroundDeleteVirtualMachine Generation: 3039 Resource Version: 1169350 Self Link: /apis/kubevirt.io/v1alpha3/namespaces/default/virtualmachineinstances/tabletpc-empty UID: b16629f0-df88-11e9-9289-fa163e7e99b4 Spec: Domain: Devices: Disks: Disk: Bus: virtio Name: containerdisk Disk: Bus: virtio Name: cloudinitdisk Inputs: Name: tablet0 Type: tablet Interfaces: Bridge: Name: default Features: Acpi: Enabled: true Firmware: Uuid: e0f367a7-b27a-49c9-8356-27e888867716 Machine: Type: q35 Resources: Requests: Cpu: 100m Memory: 1024M Networks: Name: default Pod: Termination Grace Period Seconds: 0 Volumes: Container Disk: Image: kubevirt/fedora-cloud-container-disk-demo Image Pull Policy: Always Name: containerdisk Cloud Init No Cloud: User Data: #cloud-config password: fedora chpasswd: { expire: False } Name: cloudinitdisk Status: Conditions: Last Probe Time: <nil> Last Transition Time: <nil> Message: cannot migrate VMI with a bridge interface connected to a pod network Reason: InterfaceNotLiveMigratable Status: False Type: LiveMigratable Interfaces: Ip Address: 10.130.0.166 Name: default Migration Method: BlockMigration Node Name: host-172-16-0-18 Phase: Failed Qos Class: Burstable Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 34m virtualmachine-controller Created virtual machine pod virt-launcher-tabletpc-empty-g2r24 Warning SyncFailed 34m (x25 over 34m) virt-handler, host-172-16-0-18 server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=20, Message='unsupported configuration: Can't add USB input device. USB bus is disabled')" Warning SyncFailed 29m (x7 over 29m) virt-handler, host-172-16-0-18 failed to detect VMI pod: dial unix /var/run/kubevirt/sockets/b16629f0-df88-11e9-9289-fa163e7e99b4_sock: connect: connection refused
Martin, wdyt?
This PR will fix it: https://github.com/kubevirt/kubevirt/pull/2742
Does htis bug happen with VMs created from the UI or templates?
The fix was merged to upsteam kubevirt as https://github.com/kubevirt/kubevirt/pull/2742
VMI creation with input device 'tablet', but without specifying 'bus' attribute, succeeds (using the above yaml). # oc get vmi NAME AGE PHASE IP NODENAME tabletpc-empty 12m Running 10.129.1.75 working-slgsd-master-0 dumpxml - bus is using the default ('usb'): <input type='tablet' bus='usb'> <alias name='ua-tablet0'/> <address type='usb' bus='0' port='1'/> </input> Verified on: # oc get csv -n openshift-cnv NAME DISPLAY VERSION REPLACES PHASE kubevirt-hyperconverged-operator.v2.2.0 Container-native virtualization Operator 2.2.0 kubevirt-hyperconverged-operator.v2.1.0 Succeeded local-storage-operator.v4.3.3 Local Storage 4.3.3 local-storage-operator.v4.3.0 Succeeded
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-2020:0307