virt: Fix a bug in set_kernel_console

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>