virt: Repair virt wait function.

Signed-off-by: Jiří Župka <jzupka@redhat.com>