summaryrefslogtreecommitdiffstats
path: root/patches/fuel-library
diff options
context:
space:
mode:
authorFlorin Dumitrascu <florin.dumitrascu@enea.com>2016-03-13 18:49:38 +0100
committerFlorin Dumitrascu <florin.dumitrascu@enea.com>2016-03-13 17:55:05 +0000
commitc715e7bb460f499f4fd20f7ab000d7a6d670636a (patch)
tree79ec69ccb6f19278ac7f0d025fdab9e0f2cbe57b /patches/fuel-library
parent1732427ab05ed1301bf9d53fcf47128f44d04811 (diff)
Initial code commit
This brings initial code base for Armband project that allows building an OPNFV Fuel 8 iso based on Brahmaputra components to be deployed on arm64 servers. Signed-off-by: Stanislaw Kardach <kda@semihalf.com> Signed-off-by: Alexandru Avadanii <alexandru.avadanii@enea.com> Signed-off-by: Florin Dumitrascu <florin.dumitrascu@enea.com> JIRA:FUEL-39
Diffstat (limited to 'patches/fuel-library')
-rw-r--r--patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch273
-rw-r--r--patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch39
-rw-r--r--patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch33
-rw-r--r--patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch122
4 files changed, 467 insertions, 0 deletions
diff --git a/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch b/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch
new file mode 100644
index 00000000..56796d48
--- /dev/null
+++ b/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch
@@ -0,0 +1,273 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Sun, 21 Feb 2016 16:29:52 +0100
+Subject: [PATCH] Add arm64 templates to cobbler and nailgun
+
+Add grub template import to cobbler server manifest
+
+Add arm64 templates to cobbler and nailgun
+---
+ deployment/puppet/cobbler/manifests/server.pp | 27 +++++++++++++++
+ .../puppet/cobbler/templates/dnsmasq.template.erb | 2 ++
+ .../cobbler/templates/efidefault.template.erb | 5 +++
+ .../cobbler/templates/grubprofile.template.erb | 16 +++++++++
+ .../cobbler/templates/grubsystem.template.erb | 16 +++++++++
+ .../templates/preseed/ubuntu-1404.preseed.erb | 2 ++
+ .../puppet/nailgun/manifests/auxiliaryrepos.pp | 12 ++++---
+ deployment/puppet/nailgun/manifests/cobbler.pp | 38 +++++++++++++++++-----
+ .../puppet/nailgun/manifests/cobbler/preseed.pp | 13 ++++++++
+ 9 files changed, 119 insertions(+), 12 deletions(-)
+ create mode 100644 deployment/puppet/cobbler/templates/efidefault.template.erb
+ create mode 100644 deployment/puppet/cobbler/templates/grubprofile.template.erb
+ create mode 100644 deployment/puppet/cobbler/templates/grubsystem.template.erb
+ create mode 100644 deployment/puppet/nailgun/manifests/cobbler/preseed.pp
+
+diff --git a/deployment/puppet/cobbler/manifests/server.pp b/deployment/puppet/cobbler/manifests/server.pp
+index bdb1ae7..0523404 100644
+--- a/deployment/puppet/cobbler/manifests/server.pp
++++ b/deployment/puppet/cobbler/manifests/server.pp
+@@ -288,6 +288,33 @@ class cobbler::server (
+ notify => [Service[$cobbler_service], Exec['cobbler_sync']],
+ }
+
++ file { '/etc/cobbler/pxe/efidefault.template':
++ content => template('cobbler/efidefault.template.erb'),
++ owner => 'root',
++ group => 'root',
++ mode => '0644',
++ require => Package[$cobbler::packages::cobbler_package],
++ notify => [Service[$cobbler_service], Exec['cobbler_sync']],
++ }
++
++ file { '/etc/cobbler/pxe/grubprofile.template':
++ content => template('cobbler/grubprofile.template.erb'),
++ owner => 'root',
++ group => 'root',
++ mode => '0644',
++ require => Package[$cobbler::packages::cobbler_package],
++ notify => [Service[$cobbler_service], Exec['cobbler_sync']],
++ }
++
++ file { '/etc/cobbler/pxe/grubsystem.template':
++ content => template('cobbler/grubsystem.template.erb'),
++ owner => 'root',
++ group => 'root',
++ mode => '0644',
++ require => Package[$cobbler::packages::cobbler_package],
++ notify => [Service[$cobbler_service], Exec['cobbler_sync']],
++ }
++
+ exec { '/var/lib/tftpboot/chain.c32':
+ command => 'cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/chain.c32',
+ unless => 'test -e /var/lib/tftpboot/chain.c32',
+diff --git a/deployment/puppet/cobbler/templates/dnsmasq.template.erb b/deployment/puppet/cobbler/templates/dnsmasq.template.erb
+index 3a96ac1..8d3e753 100644
+--- a/deployment/puppet/cobbler/templates/dnsmasq.template.erb
++++ b/deployment/puppet/cobbler/templates/dnsmasq.template.erb
+@@ -33,5 +33,7 @@ dhcp-no-override
+ # by assigning IPs one by one instead of using hash algorithm.
+ dhcp-sequential-ip
+
++dhcp-match=set:arm64,93,11
++dhcp-boot=net:arm64,grub/grub-aarch64.efi,boothost,<%= @next_server %>
+ dhcp-option=6,<%= @name_server %>
+ $insert_cobbler_system_definitions
+diff --git a/deployment/puppet/cobbler/templates/efidefault.template.erb b/deployment/puppet/cobbler/templates/efidefault.template.erb
+new file mode 100644
+index 0000000..af09eb8
+--- /dev/null
++++ b/deployment/puppet/cobbler/templates/efidefault.template.erb
+@@ -0,0 +1,5 @@
++set default=1
++set timeout=5
++tr -s ipxe_mac ':' '-' $net_default_mac
++
++$grub_menu_items
+diff --git a/deployment/puppet/cobbler/templates/grubprofile.template.erb b/deployment/puppet/cobbler/templates/grubprofile.template.erb
+new file mode 100644
+index 0000000..9a191bc
+--- /dev/null
++++ b/deployment/puppet/cobbler/templates/grubprofile.template.erb
+@@ -0,0 +1,16 @@
++set default=1
++set timeout=5
++tr -s ipxe_mac ':' '-' $net_default_mac
++
++menuentry '$profile_name' {
++ echo 'Network status:'
++ net_ls_cards
++ net_ls_addr
++ net_ls_routes
++
++ echo 'Loading Linux ...'
++ linux (tftp)$kernel_path $kernel_options BOOTIF=01-$ipxe_mac
++ echo 'Loading initial ramdisk ...'
++ initrd (tftp)$initrd_path
++ echo 'Booting bootstrap image ...'
++}
+diff --git a/deployment/puppet/cobbler/templates/grubsystem.template.erb b/deployment/puppet/cobbler/templates/grubsystem.template.erb
+new file mode 100644
+index 0000000..9a191bc
+--- /dev/null
++++ b/deployment/puppet/cobbler/templates/grubsystem.template.erb
+@@ -0,0 +1,16 @@
++set default=1
++set timeout=5
++tr -s ipxe_mac ':' '-' $net_default_mac
++
++menuentry '$profile_name' {
++ echo 'Network status:'
++ net_ls_cards
++ net_ls_addr
++ net_ls_routes
++
++ echo 'Loading Linux ...'
++ linux (tftp)$kernel_path $kernel_options BOOTIF=01-$ipxe_mac
++ echo 'Loading initial ramdisk ...'
++ initrd (tftp)$initrd_path
++ echo 'Booting bootstrap image ...'
++}
+diff --git a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb
+index fd6dda3..65c6c69 100644
+--- a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb
++++ b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb
+@@ -66,9 +66,11 @@ d-i apt-setup/mirror/error select Retry
+ # Use network mirror
+ d-i apt-setup/use_mirror boolean true
+
++<% if @arch == 'amd64' %>
+ # Select architecture to amd64. That's very important to dpkg, since
+ # by default we have both amd64 and i386.
+ d-i apt-setup/multiarch string amd64
++<% end %>
+
+ # You can choose to install restricted and universe software, or to install
+ # software from the backports repository.
+diff --git a/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp b/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
+index 41a2570..720943d 100644
+--- a/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
++++ b/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
+@@ -48,17 +48,21 @@ class nailgun::auxiliaryrepos(
+
+ exec { 'create_ubuntu_repo_dirs':
+ path => '/bin:/sbin:/usr/bin:/usr/sbin',
+- command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/\"",
++ command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-{amd64,arm64}/\"",
+ unless => "test -d ${ubuntu_dir}/pool && \
+ test -d ${ubuntu_dir}/dists/auxiliary/main/binary-amd64 && \
+- test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64",
++ test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64 && \
++ test -d ${ubuntu_dir}/dists/auxiliary/main/binary-arm64 && \
++ test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64",
+ }
+
+ exec { 'create_ubuntu_repo_Packages':
+ path => '/bin:/sbin:/usr/bin:/usr/sbin',
+- command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/Packages\"",
++ command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-{amd64,arm64}/Packages\"",
+ unless => "test -f ${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Packages && \
+- test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Packages",
++ test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Packages && \
++ test -f ${ubuntu_dir}/dists/auxiliary/main/binary-arm64/Packages && \
++ test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64/Packages",
+ }
+
+ file { $release_files:
+diff --git a/deployment/puppet/nailgun/manifests/cobbler.pp b/deployment/puppet/nailgun/manifests/cobbler.pp
+index a11498c..95a9497 100644
+--- a/deployment/puppet/nailgun/manifests/cobbler.pp
++++ b/deployment/puppet/nailgun/manifests/cobbler.pp
+@@ -43,7 +43,7 @@ class nailgun::cobbler(
+ $bootstrap_profile = $bootstrap_flavor ? {
+ /(?i)centos/ => 'bootstrap',
+ /(?i)ubuntu/ => 'ubuntu_bootstrap',
+- default => 'bootstrap',
++ default => 'ubuntu_bootstrap',
+ }
+
+ if $::osfamily == 'RedHat' {
+@@ -133,12 +133,9 @@ class nailgun::cobbler(
+ require => Class['::cobbler::server'],
+ }
+
+- file { '/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed':
+- content => template('cobbler/preseed/ubuntu-1404.preseed.erb'),
+- owner => 'root',
+- group => 'root',
+- mode => '0644',
+- require => Class['::cobbler::server'],
++ nailgun::cobbler::preseed { 'ubuntu_1404_x86_64.preseed':
++ path =>'/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed',
++ arch => "amd64",
+ } ->
+
+ cobbler_distro { 'ubuntu_1404_x86_64':
+@@ -151,6 +148,21 @@ class nailgun::cobbler(
+ require => Class['::cobbler::server'],
+ }
+
++ nailgun::cobbler::preseed { 'ubuntu_1404_arm64.preseed':
++ path => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed',
++ arch => "arm64",
++ } ->
++
++ cobbler_distro { 'ubuntu_1404_arm64':
++ kernel => "${repo_root}/ubuntu/x86_64/images/linux",
++ initrd => "${repo_root}/ubuntu/x86_64/images/initrd.gz",
++ arch => 'x86_64', # Makes Cobbler choose PXE
++ breed => 'ubuntu',
++ osversion => 'trusty',
++ ksmeta => '',
++ require => Class['::cobbler::server'],
++ }
++
+ cobbler_profile { 'centos-x86_64':
+ kickstart => '/var/lib/cobbler/kickstarts/centos-x86_64.ks',
+ kopts => 'biosdevname=0 sshd=1 dhcptimeout=120',
+@@ -171,6 +183,16 @@ class nailgun::cobbler(
+ require => Cobbler_distro['ubuntu_1404_x86_64'],
+ }
+
++ cobbler_profile { 'ubuntu_1404_arm64':
++ kickstart => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed',
++ kopts => 'console=ttyAMA0,115200 console=ttyS0,115200 net.ifnames=0 biosdevname=0 netcfg/choose_interface=eth0 netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20',
++ distro => 'ubuntu_1404_arm64',
++ ksmeta => '',
++ menu => false,
++ server => $real_server,
++ require => Cobbler_distro['ubuntu_1404_arm64'],
++ }
++
+ cobbler_distro { 'bootstrap':
+ kernel => "${repo_root}/bootstrap/linux",
+ initrd => "${repo_root}/bootstrap/initramfs.img",
+@@ -205,7 +227,7 @@ class nailgun::cobbler(
+ distro => 'ubuntu_bootstrap',
+ menu => true,
+ kickstart => '',
+- kopts => extend_kopts($bootstrap_meta['extend_kopts'], "console=ttyS0,9600 console=tty0 panic=60 ethdevice-timeout=${bootstrap_ethdevice_timeout} boot=live toram components fetch=http://${server}:8080/bootstraps/active_bootstrap/root.squashfs biosdevname=0 url=${nailgun_api_url} mco_user=${mco_user} mco_pass=${mco_pass}"),
++ kopts => extend_kopts($bootstrap_meta['extend_kopts'], "console=ttyAMA0,115200 console=ttyS0,115200 panic=60 ethdevice-timeout=${bootstrap_ethdevice_timeout} boot=live toram components fetch=http://${server}:8080/bootstraps/active_bootstrap/root.squashfs biosdevname=0 url=${nailgun_api_url} mco_user=${mco_user} mco_pass=${mco_pass}"),
+ ksmeta => '',
+ server => $real_server,
+ require => Cobbler_distro['ubuntu_bootstrap'],
+diff --git a/deployment/puppet/nailgun/manifests/cobbler/preseed.pp b/deployment/puppet/nailgun/manifests/cobbler/preseed.pp
+new file mode 100644
+index 0000000..93c71ba
+--- /dev/null
++++ b/deployment/puppet/nailgun/manifests/cobbler/preseed.pp
+@@ -0,0 +1,13 @@
++define nailgun::cobbler::preseed(
++ $path,
++ $arch = "amd64",
++) {
++
++ file { $path:
++ content => template('cobbler/preseed/ubuntu-1404.preseed.erb'),
++ owner => 'root',
++ group => 'root',
++ mode => '0644',
++ require => Class['::cobbler::server'],
++ }
++}
+--
+1.9.1
+
diff --git a/patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch b/patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch
new file mode 100644
index 00000000..0bf54a2c
--- /dev/null
+++ b/patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch
@@ -0,0 +1,39 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Wed, 24 Feb 2016 20:05:25 +0100
+Subject: [PATCH] Add arm64 for auxiliary repos
+
+---
+ deployment/puppet/nailgun/files/Release-auxiliary | 2 +-
+ deployment/puppet/nailgun/manifests/auxiliaryrepos.pp | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/deployment/puppet/nailgun/files/Release-auxiliary b/deployment/puppet/nailgun/files/Release-auxiliary
+index 2d5ce58..03f84b8 100644
+--- a/deployment/puppet/nailgun/files/Release-auxiliary
++++ b/deployment/puppet/nailgun/files/Release-auxiliary
+@@ -3,6 +3,6 @@ Label: auxiliary
+ Suite: auxiliary
+ Codename: auxiliary
+ Date: Mon, 15 Apr 2015 00:00:01 UTC
+-Architectures: amd64
++Architectures: amd64 arm64
+ Components: main restricted
+ Description: Auxiliary
+diff --git a/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp b/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
+index 720943d..91adb3e 100644
+--- a/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
++++ b/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
+@@ -40,7 +40,9 @@ class nailgun::auxiliaryrepos(
+ $release_files = [
+ "${ubuntu_dir}/dists/auxiliary/Release",
+ "${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Release",
+- "${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release"]
++ "${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release",
++ "${ubuntu_dir}/dists/auxiliary/main/binary-arm64/Release",
++ "${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64/Release"]
+
+ Exec['create_ubuntu_repo_dirs'] ->
+ Exec['create_ubuntu_repo_Packages'] ->
+--
+1.9.1
+
diff --git a/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch b/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch
new file mode 100644
index 00000000..00cd3c7a
--- /dev/null
+++ b/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch
@@ -0,0 +1,33 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Wed, 24 Feb 2016 20:07:06 +0100
+Subject: [PATCH] Make qemu-kvm architecture aware
+
+---
+ deployment/puppet/openstack/manifests/compute.pp | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/deployment/puppet/openstack/manifests/compute.pp b/deployment/puppet/openstack/manifests/compute.pp
+index b2339bc..4f380b8 100644
+--- a/deployment/puppet/openstack/manifests/compute.pp
++++ b/deployment/puppet/openstack/manifests/compute.pp
+@@ -169,10 +169,15 @@ class openstack::compute (
+ before => Augeas['libvirt-conf'],
+ }
+
++ # Guard against some exotic distros with their `uname -m`
++ $arch = $::architecture ? {
++ 'arm64', 'aarch64' => 'aarch64',
++ default => 'x86_64',
++ }
+ # From legacy libvirt.pp
+ exec { 'symlink-qemu-kvm':
+- command => '/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64',
+- creates => '/usr/bin/qemu-system-x86_64',
++ command => "/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-${arch}",
++ creates => "/usr/bin/qemu-system-${arch}",
+ }
+
+ package { 'avahi':
+--
+1.9.1
+
diff --git a/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch b/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch
new file mode 100644
index 00000000..0ea66f66
--- /dev/null
+++ b/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch
@@ -0,0 +1,122 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Wed, 24 Feb 2016 20:08:24 +0100
+Subject: [PATCH] Make TestVM creation architecture aware
+
+This depends on cirros-testvm package to contain both amd64 and arm64
+images.
+---
+ deployment/puppet/openstack/manifests/img/cirros.pp | 8 ++++++--
+ .../puppet/osnailyfacter/modular/generate_vms/generate_vms.pp | 11 +++++++++++
+ deployment/puppet/osnailyfacter/templates/vm_libvirt.erb | 5 ++++-
+ files/fuel-migrate/fuel-migrate | 5 ++++-
+ 4 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/deployment/puppet/openstack/manifests/img/cirros.pp b/deployment/puppet/openstack/manifests/img/cirros.pp
+index 84e202e..57ae256 100644
+--- a/deployment/puppet/openstack/manifests/img/cirros.pp
++++ b/deployment/puppet/openstack/manifests/img/cirros.pp
+@@ -9,6 +9,10 @@ class openstack::img::cirros (
+ $img_name = 'cirros',
+ $os_name = 'cirros',
+ ) {
++ $arch = $::architecture ? {
++ 'arm64', 'aarch64' => 'aarch64',
++ default => 'x86_64',
++ }
+
+ package { 'cirros-testvm':
+ ensure => "present"
+@@ -17,14 +21,14 @@ class openstack::img::cirros (
+ case $::osfamily {
+ 'RedHat': {
+ exec { 'upload-img':
+- command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /opt/vm/cirros-x86_64-disk.img",
++ command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /opt/vm/cirros-${arch}-disk.img",
+ unless => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index && (/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index | grep ${img_name})",
+
+ }
+ }
+ 'Debian': {
+ exec { 'upload-img':
+- command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /usr/share/cirros-testvm/cirros-x86_64-disk.img",
++ command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /usr/share/cirros-testvm/cirros-${arch}-disk.img",
+ unless => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index && (/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index | grep ${img_name})",
+
+ }
+diff --git a/deployment/puppet/osnailyfacter/modular/generate_vms/generate_vms.pp b/deployment/puppet/osnailyfacter/modular/generate_vms/generate_vms.pp
+index 6d5426a..da5954e 100644
+--- a/deployment/puppet/osnailyfacter/modular/generate_vms/generate_vms.pp
++++ b/deployment/puppet/osnailyfacter/modular/generate_vms/generate_vms.pp
+@@ -11,6 +11,17 @@ define vm_config {
+ $details = $name
+ $id = $details['id']
+
++ case $::architecture {
++ 'arm64', 'aarch64': {
++ $machine_arch = 'aarch64'
++ $machine_type = 'virt'
++ }
++ default: {
++ $machine_arch = 'x86_64'
++ $machine_type = 'pc-i440fx-trusty'
++ }
++ }
++
+ file { "${template_dir}/template_${id}_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..decf3ab 100644
+--- a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
++++ b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
+@@ -3,7 +3,7 @@
+ <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='<%= @machine_arch %>' machine='<%= @machine_type %>'>hvm</type>
+ <boot dev='network'/>
+ <boot dev='hd'/>
+ </os>
+@@ -11,6 +11,9 @@
+ <acpi/>
+ <apic/>
+ <pae/>
++ <% if $machine_arch == 'arm64' { %>
++ <gic version='3' />
++ <% } %>
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+diff --git a/files/fuel-migrate/fuel-migrate b/files/fuel-migrate/fuel-migrate
+index fad9436..667d4a7 100755
+--- a/files/fuel-migrate/fuel-migrate
++++ b/files/fuel-migrate/fuel-migrate
+@@ -175,6 +175,8 @@ create_vm(){
+ exit 1
+ fi
+ fi
++ # figure out atchitecture of the destination
++ arch="$(virsh -c "${dkvm_uri}" nodeinfo | awk '/CPU model:/ { print $3}')"
+ # create disk
+ ssh "${dkvm_ip}" qemu-img create -f raw "${dkvm_folder}/${fvm_name}.img" "${fvm_disk_size}"
+ # make template for virsh
+@@ -184,13 +186,14 @@ create_vm(){
+ <memory unit='MiB'>${fvm_ram}</memory>
+ <vcpu >${fvm_cpu}</vcpu>
+ <os>
+- <type arch='x86_64' >hvm</type>
++ <type arch='${arch}' >hvm</type>
+ <boot dev='hd'/>
+ <boot dev='network'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
++ ${arch/aarch64/<gic version='3'\/>}
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+--
+1.9.1
+