Veeam Object reference not set to an instance of an object

I wanted to share an issue recently I ran into with Veeam 9.5 running a restore job on a production VM into a test/development environment. Â I received the error in Veeam Object reference not set to an instance of an object. Â I had ran into issues similiar to this before with IDs in vCenter and such causing issues. Â However, in this case I was creating an entirely new VM so that shouldn’t have been an issue. Â Also, in trying the restore on multiple standalone hosts and datastores, the error remained the same. Â This was definitely out of the ordinary.
Veeam Object reference not set to an instance of an object
As mentioned above, I had tried several things, that had not worked:
- Restore to different hosts
- Restore to different datastores
- Restoring directly to a host instead of through vCenter to rule out a vCenter issue
However, something peculiar stood out in the “restore.log” for the restore operation:
[23.11.2016 11:25:34] <01> Error Failed to restore vm. Name: [TEST]
[23.11.2016 11:25:34] <01> Error Object reference not set to an instance of an object. (System.NullReferenceException)
[23.11.2016 11:25:34] <01> Error at Veeam.Backup.Core.CVmxFile.EjectFloppyImages()
Error ejecting floppy image? Â So in looking at the properties of the VM I found this, a floppy image was mounted! Â As it turns out, the VM that was having issues restoring, was being backed up in a state of installing VMware tools. Â For whatever reason we have all seen it, VMware tools doesn’t properly eject the media. Â So, the Veeam backup was failing as I was trying to restore the VM on a different host and the floppy image didn’t exist to eject.
I have confirmed with Veeam this is an issue. Â If you have a floppy image mounted it will cause a restore to fail on the target host. Â You can however, export the raw disks to a folder and bring the VM online that way, however, this is less than ideal.
Thoughts
It seems like a minor point that a floppy image would cause an entire VM to fail.  Hopefully, this is an issue that Veeam will address.  It would seem a check could be put in place where a restore would at least move past this more gracefully on a VM restore.  So, if you have received the error veeam object reference not set to an instance of an object, take a look at your mounted media.