Recently I downloaded VirtualBox to setup a Windows 10 Virtual Machine on my Macbook Pro. I bought a new 32gb PNY flash drive to boot Windows 10. Everything worked great until I shut everything down. Now my Mac doesn't recognize the flash drive (even disk utility gives me nothing). My USB ports are both fine and the flash drive still works with Windows machines. My question is two-fold, can I fix this and more importantly, can I prevent it from happening again?
You probably enabled a USB device filter in the VM and added the PNY flash drive. After configuring it like this the USB device is invisible for the host (also in Disk Utility). Choose the USB device in the VM settings -> Ports -> USB, hit the red minus-button and quit VirtualBox and the PNY will reappear.