Set it up as an external instrument in Cubase. In my set up with hardware, if I put the latency too tight or too loose the timing goes wrong
What is happening is something along these lines. The buffer in your sound card/daw set up means your computer plays everything later. Normally the problem we get, say with singing or playing VST's is we hear the sound later, creating monitoring issues due to latency. With midi and recording the midi with the DAW triggering the midi, though, it's the opposite. As when you'd play it live, record the midi notes via a keyboard, those midi notes would record intime, Cubase compensates for the latency settings, because of this when recording the audio via a loop back as such in the DAW it records the audio early. As the midi recorded is triggering the hardware, the hardware comes into Cubase and is sent out again (this should be intime) but when you record that to an audio track back into Cubase, the newly recorded track will be ahead of time.
I just fried my head trying to put that in words, might not come across right. I'm just messing about with the same in my own studio. My Virus is a TI so not with that but I have a Nord and Novation to patch in the same as how you'd do the C.
The way we used to do it was to record, mix down to a separate PC, Cubase only every produced midi for the hardware and prerecorded audio. The timing with audio tracks is flawless this way but no fun. It introduced the inability to add vst effects to your hardware, with out mixing down first.