lib/vagrant-mutate/box/libvirt.rb in vagrant-mutate-0.1.5 vs lib/vagrant-mutate/box/libvirt.rb in vagrant-mutate-0.2.0
- old
+ new
@@ -5,13 +5,38 @@
class Libvirt < Box
def initialize(env, name, dir)
super
@provider_name = 'libvirt'
- @supported_input = false,
- @supported_output = true,
- @image_format = 'qcow2',
+ @supported_input = true
+ @supported_output = true
+ @image_format = 'qcow2'
@image_name = 'box.img'
+ end
+
+ # since none of below can be determined from the box
+ # we just generate sane values
+
+ def architecture
+ return 'x86_64'
+ end
+
+ # kvm prefix is 52:54:00
+ def mac_address
+ octets = 3.times.map { rand(255).to_s(16) }
+ return "52:54:00:#{octets[0]}:#{octets[1]}:#{octets[2]}"
+ end
+
+ def cpus
+ return 1
+ end
+
+ def memory
+ return 536870912
+ end
+
+ def disk_interface
+ return 'virtio'
end
end
end
end