From 9c73f9d51150361104b25a4047ae3ea192162fd5 Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Thu, 12 Jan 2017 12:10:32 +0900 Subject: Add .travis.yml --- spec/one_node/Vagrantfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'spec/one_node') diff --git a/spec/one_node/Vagrantfile b/spec/one_node/Vagrantfile index bfa380c..0c9e6f7 100644 --- a/spec/one_node/Vagrantfile +++ b/spec/one_node/Vagrantfile @@ -4,7 +4,16 @@ configs = YAML.load_file('config.yaml') Vagrant.configure('2') do |config| config.vm.provider :libvirt do |libvirt| - libvirt.cpu_mode = 'host-passthrough' + cpuinfo = File.read('/proc/cpuinfo') + if cpuinfo =~ /vmx|svm/ + libvirt.cpu_mode = 'host-passthrough' + else + libvirt.driver = 'qemu' + libvirt.cpu_mode = 'custom' + libvirt.cpu_model = 'Nehalem' + libvirt.cpu_feature name: 'svm', policy: 'disable' +# libvirt.cpu_feature name: 'vmx', policy: 'force' + end end configs.keys.each do |host| config.vm.define host.to_sym do |c| -- cgit v1.2.3