From 6f45f107c9c02d6d1fb3f579cb6eb0dc4fef3390 Mon Sep 17 00:00:00 2001 From: Anastasiia Date: Mon, 5 Mar 2018 17:39:29 +0100 Subject: [PATCH 1/2] Remove nested section in domain template --- lib/vagrant-libvirt/templates/domain.xml.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb index ee159ad..fc23b61 100644 --- a/lib/vagrant-libvirt/templates/domain.xml.erb +++ b/lib/vagrant-libvirt/templates/domain.xml.erb @@ -8,10 +8,6 @@ <% if @cpu_mode != 'host-passthrough' %> <% if @cpu_mode == 'custom' %><%= @cpu_model %><% end %> - <% if @nested %> - - - <% end %> <% @cpu_features.each do |cpu_feature| %> <% end %> From d05690d269f617db83fd94adf38cdf1f84fe5148 Mon Sep 17 00:00:00 2001 From: Anastasiia Date: Fri, 9 Mar 2018 18:01:48 +0100 Subject: [PATCH 2/2] Merging svm and vmx cpu_features parameters --- lib/vagrant-libvirt/templates/domain.xml.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb index fc23b61..63afa75 100644 --- a/lib/vagrant-libvirt/templates/domain.xml.erb +++ b/lib/vagrant-libvirt/templates/domain.xml.erb @@ -8,6 +8,14 @@ <% if @cpu_mode != 'host-passthrough' %> <% if @cpu_mode == 'custom' %><%= @cpu_model %><% end %> + <% if @nested %> + <% if @cpu_features.select{|x| x[:name] == 'vmx'}.empty? %> + + <% end %> + <% if @cpu_features.select{|x| x[:name] == 'svm'}.empty? %> + + <% end %> + <% end %> <% @cpu_features.each do |cpu_feature| %> <% end %>