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.