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.