What do you mean by 'detect'? Detect what? You need to have config files for your machines. If you have them backed up too, then move them to /etc/qemu-server for KVM and to /etc/vz/conf and make sure they reflect new paths etc.
Alternatively, if you did a proper back-up using vzdump then you can simply restore them using qmrestore and vzrestore.
|