Accueil > Virtualisation > Windows 10 et Virtualbox > Problème Sur certaines machines VirtualBox...
Problème Sur certaines machines VirtualBox...
lundi 1er avril 2024, par
Problème
Sur certaines machines VirtualBox dans Windows 10, il y a création d’une pléthode de drivers "host only Ethernet Adapters", et c’est malpropre.
Solution
A revérifier, mais ce n’est qu’une piste.
To remove one VirtualBox Host-Only adapter under Windows, you may use the Microsoft utility of Windows Device Console (Devcon.exe) to enable and disable drivers, and may create icons for these commands on the desktop.
This utility is part of the Windows Driver Kit, Visual Studio, or the Windows SDK for desktop apps, but can be downloaded from DevCon-Installer.
Here is an (untested !) PowerShell script for removing all such virtual network adapters that I found on Github Remove-VirtualBoxHostOnlyNetworkInterfaces.ps1 :
$devcon = "path-to-devcon.exe"
Get-NetAdapter `
| Where-Object {$_.Virtual} `
| Where-Object {$_.DriverFileName -like 'VBox*.sys'} `
| ForEach-Object {
Write-Host "Removing the $($_.InterfaceAlias) interface..."
$result = &$devcon remove "@$($_.PnPDeviceID)"
if (!($result -eq '1 device(s) were removed.')) {
throw "failed to remove the network interface $($_.InterfaceAlias): $result"
}
}
Liens
Voir en ligne : VirtualBox - création a répétition de pilotes Ethernet