vagrant-kvm 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ # 0.1.1 (April 4, 2013)
2
+
3
+ * Debian compatibility fix (thanks mfournier).
4
+
1
5
  # 0.1.0 (April 2, 2013)
2
6
 
3
7
  * Initial release.
data/README.md CHANGED
@@ -4,8 +4,9 @@ This is a [Vagrant](http://www.vagrantup.com) 1.1+ plugin that adds a KVM
4
4
  provider to Vagrant, allowing Vagrant to control and provision KVM/QEMU VM.
5
5
 
6
6
  **NOTE:** This plugin requires Vagrant 1.1+
7
+
7
8
  **NOTE:** This plugin requires QEMU 1.2+, it has only been tested on Fedora 18
8
- at the moment.
9
+ and Debian Wheezy at the moment.
9
10
 
10
11
  ## Features/Limitations
11
12
 
@@ -14,6 +15,8 @@ at the moment.
14
15
  * Uses NFS for sync folders
15
16
  * Only works with 1 VM per Vagrantfile for now
16
17
  * Only works with private networking for now
18
+ * Requires "libvirt" group membership to run vagrant (Debian/Ubuntu only)
19
+ * Requires backporting qemu and libvirt from experimental (Debian) or raring (Ubuntu)
17
20
 
18
21
  ## Usage
19
22
 
@@ -24,7 +27,7 @@ shown below.
24
27
  ```
25
28
  $ vagrant plugin install vagrant-kvm
26
29
  ...
27
- $ vagrant up --provider=aws
30
+ $ vagrant up --provider=kvm
28
31
  ...
29
32
  ```
30
33
 
@@ -95,6 +95,12 @@ module VagrantPlugins
95
95
  end
96
96
 
97
97
  def as_libvirt
98
+ # RedHat and Debian-based systems have different executable names
99
+ # depending on version/architectures
100
+ qemu_bin = [ '/usr/bin/qemu-kvm' ]
101
+ qemu_bin << '/usr/bin/qemu-system-x86_64' if @arch.match(/64$/)
102
+ qemu_bin << '/usr/bin/qemu-system-i386' if @arch.match(/^i.86$/)
103
+
98
104
  xml = KvmTemplateRenderer.render("libvirt_domain", {
99
105
  :name => @name,
100
106
  :uuid => @uuid,
@@ -103,7 +109,8 @@ module VagrantPlugins
103
109
  :arch => @arch,
104
110
  :disk => @disk,
105
111
  :mac => format_mac(@mac),
106
- :network => @network
112
+ :network => @network,
113
+ :qemu_bin => qemu_bin.detect { |binary| File.exists? binary }
107
114
  })
108
115
  xml
109
116
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ProviderKvm
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -20,7 +20,7 @@
20
20
  <on_reboot>restart</on_reboot>
21
21
  <on_crash>restart</on_crash>
22
22
  <devices>
23
- <emulator>/usr/bin/qemu-kvm</emulator>
23
+ <emulator><%= qemu_bin %></emulator>
24
24
  <disk type='file' device='disk'>
25
25
  <driver name='qemu' type='raw'/>
26
26
  <source file='<%= disk %>'/>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-kvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-02 00:00:00.000000000 Z
12
+ date: 2013-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri