nvidia-smi outputing "no devices were found" on a fresh Ubuntu 18.04 install


I am trying to set up a machine learning environment on a Virtual Machine. The machine has a GTX 1080Ti .The drivers should be forwarded so it should work okay. My coulleague had the same problem, but he doesn’t remember how he fixed it (that means it is possible to find a device).
What I have tried so far:

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
sudo apt install nvidia-driver-430
sudo reboot

After rebooting

karlisvm@karlisvm:~$ sudo lshw -C display
       description: VGA compatible controller
       product: GP102 [GeForce GTX 1080 Ti]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:04:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list
       configuration: driver=nvidia latency=0
       resources: iomemory:80-7f iomemory:80-7f irq:22 memory:90000000-90ffffff memory:800000000-80fffffff memory:810000000-811ffffff ioport:7000(size=128)
karlisvm@karlisvm:~$ nvidia-smi
No devices were found
karlisvm@karlisvm:~$ lsmod | grep nvidia
nvidia_uvm            815104  0
nvidia_drm             45056  0
nvidia_modeset       1110016  1 nvidia_drm
nvidia              18792448  2 nvidia_uvm,nvidia_modeset
drm_kms_helper        167936  1 nvidia_drm
drm                   401408  3 drm_kms_helper,nvidia_drm
ipmi_msghandler        53248  2 ipmi_devintf,nvidia
nvidiafb               49152  0
vgastate               24576  1 nvidiafb
fb_ddc                 16384  1 nvidiafb
i2c_algo_bit           16384  1 nvidiafb

Link to nvidia-bug-report.log.gz

karlisvm@karlisvm:~$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:02.3/0000:04:00.0 ==
modalias : pci:v000010DEd00001B06sv00001458sd0000377Abc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-418 - third-party free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-430 - third-party free recommended
driver   : nvidia-driver-396 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin
[    7.749965] NVRM: GPU 0000:04:00.0: RmInitAdapter failed! (0x26:0xffff:1155)
[    7.751263] NVRM: GPU 0000:04:00.0: rm_init_adapter failed, device minor number 0

Might be a hardware failure or you’ve enable memory encryption. Please try with kernel parameter
if that doesn’t help, try reseating the card, check if it works in another system, RMA.

Ok, missed the VM part. In case of pass-through, you have to hide the hypervisor.