summaryrefslogtreecommitdiffstats
path: root/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch')
-rw-r--r--patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch22
1 files changed, 8 insertions, 14 deletions
diff --git a/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch b/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch
index 325b51d4..c326c7d8 100644
--- a/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch
+++ b/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch
@@ -48,41 +48,35 @@ index 70fef32..dfefcbe 100644
--- a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp
+++ b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp
@@ -4,6 +4,17 @@ define osnailyfacter::generate_vms::vm_config(
- $details = $name
- $id = $details['id']
-
+ $details,
+ $template_dir = '/var/lib/nova',
+ ) {
+ case $::architecture {
+ 'arm64', 'aarch64': {
+ $machine_arch = 'aarch64'
-+ $machine_type = 'virt'
++ $machine_type = 'virt-2.6'
+ }
+ default: {
+ $machine_arch = 'x86_64'
-+ $machine_type = 'pc-i440fx-trusty'
++ $machine_type = 'pc'
+ }
+ }
+
- file { "${template_dir}/template_${id}_vm.xml":
+ file { "${template_dir}/template_${name}_vm.xml":
owner => 'root',
group => 'root',
diff --git a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
index ae2ba5b..64e716d 100644
--- a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
+++ b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
-@@ -3,14 +3,23 @@
+@@ -3,14 +3,17 @@
<memory unit='GiB'><%= @details['mem'] %></memory>
<vcpu placement='static'><%= @details['cpu'] %></vcpu>
<os>
-- <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
+- <type arch='x86_64' machine='pc'>hvm</type>
+ <type arch='<%= @machine_arch %>' machine='<%= @machine_type %>'>hvm</type>
-+ <% if == 'aarch64' %>
-+ <kernel>/var/lib/nova/<%= @details['id'] %>_vm.kernel</kernel>
-+ <initrd>/var/lib/nova/<%= @details['id'] %>_vm.initramfs</initrd>
-+ <cmdline>root=/dev/vda1 rw rootwait console=tty0 console=ttyS0 console=ttyAMA0</cmdline>
-+ <% else %>
<boot dev='network'/>
<boot dev='hd'/>
-+ <% end %>
</os>
<features>
<acpi/>