First you will want to make sure to have already configured your Oculus using the software provided with the VR Visor.  


To setup iRacing to use your Oculus, you will need to go to the iRacing UI and click on the helmet at the top right:


Then choose Settings:




Then click the Interface tab at the top and choose Graphics config:




This will open the "Auto-Configure Graphics” setup.Once you get this screen, click on the drop down menu button:



Then in the list, find and select the display you have previously configured for your Oculus:



The last step is to click the "Auto Configure” button:



Once the configuration completes the Sim will use your Oculus the next time you launch it.
Optionally, you may also use the graphics options in Sim to fine tune some visual settings.



In your rendererdx11.ini file (located in your Documents/iRacing folder), in the Oculus Rift section  there is a value called “autoselect”.  Changing this to 1 and you won’t get a pop up anymore if the headset is connected.