Check libvirt version for cache option directsync; Improve the check_vm_partitions function.