lib/vagrant-libvirt/action/start_domain.rb in vagrant-libvirt-0.0.37 vs lib/vagrant-libvirt/action/start_domain.rb in vagrant-libvirt-0.0.38
- old
+ new
@@ -52,14 +52,16 @@
disk_target.attributes['bus'] = config.disk_bus
disk_target.parent.delete_element("#{disk_target.parent.xpath}/address")
end
# Iterface type
- REXML::XPath.each(xml_descr, '/domain/devices/interface/model') do |iface_model|
- if iface_model.attributes['type'] != config.nic_model_type
- descr_changed = true
- iface_model.attributes['type'] = config.nic_model_type
+ unless config.nic_model_type.nil?
+ REXML::XPath.each(xml_descr, '/domain/devices/interface/model') do |iface_model|
+ if iface_model.attributes['type'] != config.nic_model_type
+ descr_changed = true
+ iface_model.attributes['type'] = config.nic_model_type
+ end
end
end
# vCpu count
if config.cpus.to_i != libvirt_domain.vcpus.length
@@ -218,9 +220,15 @@
video_model.attributes['type'] = config.video_type
video_model.attributes['vram'] = config.video_vram
end
end
end
+
+ # Sound device
+ if config.sound_type
+ sound = REXML::XPath.first(xml_descr,'/domain/devices/sound/model')
+ end
+
# dtb
if config.dtb
dtb = REXML::XPath.first(xml_descr, '/domain/os/dtb')
if dtb.nil?