avrdude can’t interface with Atmel-ICE when it’s loaded with the Atmel Studio drivers, it needs libusb drivers, per Atmel ice cannot upload (but debug works) - #12 by pfeerick. Also make sure the USB device wasn’t auto-forwarded to the VM.
Later edit: Zadig fixed the issue on windows with avrdude not detecting the atmel-ice - just replaced the “Atmel-ICE CMSIS-DAP” WinUSB driver with libusb-win32, and it works fine. Atmel studio doesn’t like it, but it will be just a matter of swapping the drivers back if I want to use it.
Not sure about the driver reinstall procedure though once the drivers are replaced using Zadig – might need just a re-insert or executing a driver install from Atmel Studio again to get the old drivers.