OSX: libvirt not working by default
smalenfant opened this issue · 0 comments
I've been introducing myself to molecule and the vagrant integration worked pretty good. As I move to make this something working on my infrastructure, vagrant was not a solution so I tried to use this libvirt module. Since I had to use a "remote" libvirt connection, I hit a few walls. I'd like to contribute here and maybe use this issue as a discussion.
First thing, making libvirt accessible remotely was not well documented. That might be #1 thing to document. Through lot of searches, finally found out how to make it happen.
BTW, I'm doing this from OSX at this time, not quite on linux yet.
1 - Add ?socket=/var/run/libvirt/libvirt-sock
to the qemu line was necessary. But that changes was needed everywhere in create/destroy yaml files.
vars:
qemu_uri: "{{ 'qemu+ssh://'+item.libvirt_user+'@'+item.libvirt_host+'/system' if item.libvirt_host is defined else libvirt_uri }}?socket=/var/run/libvirt/libvirt-sock"
2 - I had to remove the sanity_checks. The problem is that those sanity checks are done "locally" and not on the remote server.
3 - vmport feature in the vm.xml template is not working on Centos 7.
I haven't been able to create a VM yet successfully yet, it is stuck in "booting". Can't find the harddrive.
I'm not sure if this needs changed by default. I'm not sure if it's intended that the create/destroy playbooks have to be modified by the user. Again, I'm new to molecule.