[pve-devel] [PATCH many] add cluster-wide hardware device mapping
Gilberto Ferreira
gilberto.nunes32 at gmail.com
Thu Jul 21 14:29:36 CEST 2022
It's nice to hear about this patch.
For now, as a workaround, when I need a usb device (like a stick for
instance), I am using USB Over IP, like you can read in this article
https://www.linux-magazine.com/Issues/2018/208/Tutorial-USB-IP#:~:text=It's%20called%20USB%2FIP%20(read,directly%20to%20the%20client%20machine
.
Perhaps this patch will do the same job?
Gilberto
Em ter., 19 de jul. de 2022 às 10:27, Dominik Csapak <d.csapak at proxmox.com>
escreveu:
> just a quick note, aaron noticed some small things immediately,
>
> root at pam did not see the hardware panel:
>
> access control needs this diff:
>
> ----8<----
> diff --git a/src/PVE/RPCEnvironment.pm b/src/PVE/RPCEnvironment.pm
> index c1b712d..b686c6b 100644
> --- a/src/PVE/RPCEnvironment.pm
> +++ b/src/PVE/RPCEnvironment.pm
> @@ -191,7 +191,7 @@ sub compute_api_permission {
> };
> map { $res->{$_} = {} } keys %$priv_re_map;
>
> - my $required_paths = ['/', '/nodes', '/access/groups', '/vms',
> '/storage', '/sdn'];
> + my $required_paths = ['/', '/nodes', '/access/groups', '/vms',
> '/storage', '/sdn', '/hardware'];
>
> my $checked_paths = {};
> foreach my $path (@$required_paths, keys %{$usercfg->{acl}}) {
> ---->8----
>
> and qemu-server does not build without root without this:
>
> ----8<----
> diff --git a/test/MigrationTest/Shared.pm b/test/MigrationTest/Shared.pm
> index 8ae6a6e..bcbd769 100644
> --- a/test/MigrationTest/Shared.pm
> +++ b/test/MigrationTest/Shared.pm
> @@ -69,6 +69,16 @@ $cluster_module->mock(
> },
> );
>
> +our $hardware_map_module = Test::MockModule->new("PVE::HardwareMap");
> +$hardware_map_module->mock(
> + find_device_on_current_node => sub {
> + return {};
> + },
> + config => sub {
> + return {};
> + },
> +);
> +
> our $ha_config_module = Test::MockModule->new("PVE::HA::Config");
> $ha_config_module->mock(
> vm_is_ha_managed => sub {
> ---->8-----
>
> i'll send a v2 when i get some more feedback
> (i'll also include some tests then)
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
More information about the pve-devel
mailing list