virt: Fix a bug in cgroup module

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