Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide usbs into VMs #996

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Provide usbs into VMs #996

merged 1 commit into from
Jun 23, 2023

Conversation

xpivarc
Copy link
Member

@xpivarc xpivarc commented Apr 6, 2023

In order to test usb pass-through we need
few usb devices available in the VM.

Usage:
export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 30M"

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Apr 6, 2023
@kubevirt-bot kubevirt-bot requested review from awels and enp0s3 April 6, 2023 10:31
@xpivarc
Copy link
Member Author

xpivarc commented Apr 6, 2023

/cc @victortoso @alicefr @vladikr

@@ -151,5 +157,10 @@ exec qemu-system-x86_64 -enable-kvm -drive format=qcow2,file=${next},if=virtio,c
-vnc :${n} -cpu host,migratable=no,+invtsc -m ${MEMORY} -smp ${CPU} \
-serial pty -M q35,accel=kvm,kernel_irqchip=split \
-device intel-iommu,intremap=on,caching-mode=on -device intel-hda -device hda-duplex -device AC97 \
-device qemu-xhci,id=bus1 -device qemu-xhci,id=bus2 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to have it always enabled? Otherwise, we could add an option as its the case for SCSI and NVMe emulation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it on demand I don't have a problem with it.

@victortoso
Copy link
Member

As Alice mentioend, not sure if we want it always enabled but 3 usb storage devices with xhci controller should be enough to basic tests of usb passthrough.

@alicefr
Copy link
Member

alicefr commented May 2, 2023

As Alice mentioend, not sure if we want it always enabled but 3 usb storage devices with xhci controller should be enough to basic tests of usb passthrough.

@xpivarc do you mind replicate what I did for nvme and SCSI? This allows to add any arbitrary numbers for devices

In order to test usb pass-through we need
few usb devices available in the VM.

In order to use it, export following before cluster-up:

export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 30M"

Signed-off-by: L. Pivarc <[email protected]>
@xpivarc
Copy link
Member Author

xpivarc commented Jun 22, 2023

@victortoso @alicefr PTAL

@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Jun 22, 2023

@xpivarc: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
check-up-kind-1.25-vgpu 424b6a0 link false /test check-up-kind-1.25-vgpu
check-provision-k8s-1.24 424b6a0 link true /test check-provision-k8s-1.24

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@victortoso victortoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better than previous version

cluster-provision/gocli/cmd/run.go Show resolved Hide resolved
cluster-provision/gocli/cmd/run.go Show resolved Hide resolved
@alicefr
Copy link
Member

alicefr commented Jun 22, 2023

Looks good, thanks @xpivarc
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 22, 2023
@xpivarc
Copy link
Member Author

xpivarc commented Jun 22, 2023

@brianmcarey @dhiller

Copy link
Member

@brianmcarey brianmcarey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brianmcarey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2023
@kubevirt-bot kubevirt-bot merged commit f661bfe into kubevirt:main Jun 23, 2023
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Jun 24, 2023
[f661bfe Provide usbs into VMs](kubevirt/kubevirtci#996)
[013718a Bump provisioning image to fedora 38](kubevirt/kubevirtci#1024)
[0d63ec2 pman: Update info about BYPASS_PMAN_CHANGE_CHECK](kubevirt/kubevirtci#1030)
[0c6367c Fix duplicate mount error during provisioning](kubevirt/kubevirtci#1032)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Jun 25, 2023
[f661bfe Provide usbs into VMs](kubevirt/kubevirtci#996)
[013718a Bump provisioning image to fedora 38](kubevirt/kubevirtci#1024)
[0d63ec2 pman: Update info about BYPASS_PMAN_CHANGE_CHECK](kubevirt/kubevirtci#1030)
[0c6367c Fix duplicate mount error during provisioning](kubevirt/kubevirtci#1032)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Jun 26, 2023
[f661bfe Provide usbs into VMs](kubevirt/kubevirtci#996)
[013718a Bump provisioning image to fedora 38](kubevirt/kubevirtci#1024)
[0d63ec2 pman: Update info about BYPASS_PMAN_CHANGE_CHECK](kubevirt/kubevirtci#1030)
[0c6367c Fix duplicate mount error during provisioning](kubevirt/kubevirtci#1032)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 29, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfi.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 29, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfi.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 30, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 30, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 30, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 30, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 30, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jun 30, 2023
This commit adds basic functional testing to USB host passthrough
using NodeConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/project-infra that referenced this pull request Jul 6, 2023
This is possible since:
  kubevirt/kubevirtci#996

The follow CI would benefit from it:
  kubevirt/kubevirt#10015

Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/project-infra that referenced this pull request Jul 6, 2023
For sig-compute in 1.26 and 1.27 only.

This is possible since:
  kubevirt/kubevirtci#996

The follow CI would benefit from it:
  kubevirt/kubevirt#10015

Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/project-infra that referenced this pull request Jul 10, 2023
For sig-compute in 1.26 and 1.27 only.

This is possible since:
  kubevirt/kubevirtci#996

The follow CI would benefit from it:
  kubevirt/kubevirt#10015

Signed-off-by: Victor Toso <[email protected]>
kubevirt-bot pushed a commit to kubevirt/project-infra that referenced this pull request Jul 11, 2023
For sig-compute in 1.26 and 1.27 only.

This is possible since:
  kubevirt/kubevirtci#996

The follow CI would benefit from it:
  kubevirt/kubevirt#10015

Signed-off-by: Victor Toso <[email protected]>
victortoso pushed a commit to victortoso/kubevirt that referenced this pull request Jul 11, 2023
This commit adds basic functional testing to USB host pass through
using USBDevicesConfig.

Thanks to KubeVirtCI kubevirt#996 [0], we can create emulated USB
storage devices in the node to use for functional test.

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
akalenyu pushed a commit to akalenyu/kubevirt that referenced this pull request Jul 13, 2023
[f661bfe Provide usbs into VMs](kubevirt/kubevirtci#996)
[013718a Bump provisioning image to fedora 38](kubevirt/kubevirtci#1024)
[0d63ec2 pman: Update info about BYPASS_PMAN_CHANGE_CHECK](kubevirt/kubevirtci#1030)
[0c6367c Fix duplicate mount error during provisioning](kubevirt/kubevirtci#1032)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Aug 7, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Aug 7, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Aug 11, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Aug 11, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Sep 16, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Sep 16, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Sep 19, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
victortoso added a commit to victortoso/kubevirt that referenced this pull request Sep 19, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
VirrageS pushed a commit to VirrageS/kubevirt that referenced this pull request Nov 17, 2023
[f661bfe Provide usbs into VMs](kubevirt/kubevirtci#996)
[013718a Bump provisioning image to fedora 38](kubevirt/kubevirtci#1024)
[0d63ec2 pman: Update info about BYPASS_PMAN_CHANGE_CHECK](kubevirt/kubevirtci#1030)
[0c6367c Fix duplicate mount error during provisioning](kubevirt/kubevirtci#1032)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
VirrageS pushed a commit to VirrageS/kubevirt that referenced this pull request Nov 17, 2023
The test takes inspiration on PCI's tests/vmi_hostdev_test.go

Since the introduction of emulated USB devices [0], this can be tested
locally with:

 > export KUBEVIRT_PROVIDER=k8s-1.26-centos9
 > export KUBEVIRTCI_TAG=latest
 > export KUBEVIRT_PROVIDER_EXTRA_ARGS="--usb 20M --usb 40M"
 > make cluster-up

[0] kubevirt/kubevirtci#996

Signed-off-by: Luboslav Pivarc <[email protected]>
Signed-off-by: Victor Toso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants