diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-01-12 12:10:32 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-01-12 23:45:44 +0900 |
commit | 9c73f9d51150361104b25a4047ae3ea192162fd5 (patch) | |
tree | 6e6cb43a9350ab11f50a291a382a0923cb1d218a /spec | |
parent | 80016f010607e89ea978d89f7220937a19224c0e (diff) | |
download | vyos-integration-test-9c73f9d51150361104b25a4047ae3ea192162fd5.tar.gz vyos-integration-test-9c73f9d51150361104b25a4047ae3ea192162fd5.zip |
Add .travis.yml
Diffstat (limited to 'spec')
-rw-r--r-- | spec/one_node/Vagrantfile | 11 | ||||
-rw-r--r-- | spec/site_to_site_vpn/Vagrantfile | 11 |
2 files changed, 20 insertions, 2 deletions
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| diff --git a/spec/site_to_site_vpn/Vagrantfile b/spec/site_to_site_vpn/Vagrantfile index bfa380c..316889f 100644 --- a/spec/site_to_site_vpn/Vagrantfile +++ b/spec/site_to_site_vpn/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| |