virt: Fix a bug in set_kernel_console

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #1704 from liyangfnst/console_fix

virt: Fix a bug in set_kernel_console