Libvirt xml devices

Fix some bugs.

And I have had an experiment with serial module, it works well. :)