New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support libvirt provider #138

Merged
merged 1 commit into from Dec 3, 2015

Conversation

Projects
None yet
2 participants
@strzibny
Collaborator

strzibny commented Dec 2, 2015

Second attempt at libvirt support (issue #20).

We can't fork from Vagrant process when using libvirt provider, so we shell out using Open3. It's not the most elegant perhaps, but seems to do the work....

@strzibny

This comment has been minimized.

Show comment
Hide comment
@strzibny

strzibny Dec 2, 2015

Collaborator

@phinze @purpleidea Please try...I already merged a wrong code once :/.

Collaborator

strzibny commented Dec 2, 2015

@phinze @purpleidea Please try...I already merged a wrong code once :/.

@praveenkumar

This comment has been minimized.

Show comment
Hide comment
@praveenkumar

praveenkumar Dec 3, 2015

I did testing on Fedora-23 and this is working as you described in your blogpost https://nts.strzibny.name/dns-for-your-vagrant-needs-with-landrush-libvirt-and-dnsmasq/ , I just changed .local to .vm as tld and didn't have to do avahi related changes.

System details

[prkumar@localhost cdk2_ose]$ uname -a
Linux dhcp193-61.pnq.redhat.com 4.2.6-300.fc23.x86_64 #1 SMP Tue Nov 10 19:32:21 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[prkumar@localhost cdk2_ose]$ rpm -qa | grep libvirt
libvirt-daemon-config-network-1.2.18.1-2.fc23.x86_64
libvirt-client-1.2.18.1-2.fc23.x86_64
libvirt-gobject-0.2.2-1.fc23.x86_64
libvirt-daemon-driver-nwfilter-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-qemu-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-storage-1.2.18.1-2.fc23.x86_64
libvirt-python-1.2.18-1.fc23.x86_64
rubygem-fog-libvirt-0.0.2-2.fc23.noarch
libvirt-daemon-1.2.18.1-2.fc23.x86_64
libvirt-glib-0.2.2-1.fc23.x86_64
libvirt-gconfig-0.2.2-1.fc23.x86_64
libvirt-daemon-driver-nodedev-1.2.18.1-2.fc23.x86_64
rubygem-ruby-libvirt-0.5.2-4.fc23.x86_64
libvirt-daemon-kvm-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-secret-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-interface-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-network-1.2.18.1-2.fc23.x86_64
vagrant-libvirt-0.0.30-5.fc23.noarch

Landrush in action:-

[prkumar@localhost cdk2_ose]$ vagrant landrush ls
cdk.vm                  10.1.2.2
2.2.1.10.in-addr.arpa           cdk.vm
[prkumar@localhost cdk2_ose]$ ping cdk.vm
PING cdk.vm (10.1.2.2) 56(84) bytes of data.
64 bytes from 10.1.2.2: icmp_seq=1 ttl=64 time=0.211 ms
64 bytes from 10.1.2.2: icmp_seq=2 ttl=64 time=0.368 ms
^C
--- cdk.vm ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.211/0.289/0.368/0.080 ms
[prkumar@localhost cdk2_ose]$ ping nodejs-example-default.cdk.vm
PING nodejs-example-default.cdk.vm (10.1.2.2) 56(84) bytes of data.
64 bytes from 10.1.2.2: icmp_seq=1 ttl=64 time=0.170 ms
64 bytes from 10.1.2.2: icmp_seq=2 ttl=64 time=0.116 ms
^C
--- nodejs-example-default.cdk.vm ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.116/0.143/0.170/0.027 ms

praveenkumar commented Dec 3, 2015

I did testing on Fedora-23 and this is working as you described in your blogpost https://nts.strzibny.name/dns-for-your-vagrant-needs-with-landrush-libvirt-and-dnsmasq/ , I just changed .local to .vm as tld and didn't have to do avahi related changes.

System details

[prkumar@localhost cdk2_ose]$ uname -a
Linux dhcp193-61.pnq.redhat.com 4.2.6-300.fc23.x86_64 #1 SMP Tue Nov 10 19:32:21 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[prkumar@localhost cdk2_ose]$ rpm -qa | grep libvirt
libvirt-daemon-config-network-1.2.18.1-2.fc23.x86_64
libvirt-client-1.2.18.1-2.fc23.x86_64
libvirt-gobject-0.2.2-1.fc23.x86_64
libvirt-daemon-driver-nwfilter-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-qemu-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-storage-1.2.18.1-2.fc23.x86_64
libvirt-python-1.2.18-1.fc23.x86_64
rubygem-fog-libvirt-0.0.2-2.fc23.noarch
libvirt-daemon-1.2.18.1-2.fc23.x86_64
libvirt-glib-0.2.2-1.fc23.x86_64
libvirt-gconfig-0.2.2-1.fc23.x86_64
libvirt-daemon-driver-nodedev-1.2.18.1-2.fc23.x86_64
rubygem-ruby-libvirt-0.5.2-4.fc23.x86_64
libvirt-daemon-kvm-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-secret-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-interface-1.2.18.1-2.fc23.x86_64
libvirt-daemon-driver-network-1.2.18.1-2.fc23.x86_64
vagrant-libvirt-0.0.30-5.fc23.noarch

Landrush in action:-

[prkumar@localhost cdk2_ose]$ vagrant landrush ls
cdk.vm                  10.1.2.2
2.2.1.10.in-addr.arpa           cdk.vm
[prkumar@localhost cdk2_ose]$ ping cdk.vm
PING cdk.vm (10.1.2.2) 56(84) bytes of data.
64 bytes from 10.1.2.2: icmp_seq=1 ttl=64 time=0.211 ms
64 bytes from 10.1.2.2: icmp_seq=2 ttl=64 time=0.368 ms
^C
--- cdk.vm ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.211/0.289/0.368/0.080 ms
[prkumar@localhost cdk2_ose]$ ping nodejs-example-default.cdk.vm
PING nodejs-example-default.cdk.vm (10.1.2.2) 56(84) bytes of data.
64 bytes from 10.1.2.2: icmp_seq=1 ttl=64 time=0.170 ms
64 bytes from 10.1.2.2: icmp_seq=2 ttl=64 time=0.116 ms
^C
--- nodejs-example-default.cdk.vm ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.116/0.143/0.170/0.027 ms

strzibny added a commit that referenced this pull request Dec 3, 2015

@strzibny strzibny merged commit 8e0410b into vagrant-landrush:master Dec 3, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@njam njam referenced this pull request Mar 13, 2016

Closed

Support for vagrant-libvirt #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment