summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorStanislaw Kardach <stanislaw.kardach@cavium.com>2016-05-24 11:24:27 +0200
committerStanislaw Kardach <stanislaw.kardach@cavium.com>2016-05-24 11:24:27 +0200
commitea26f65dd99a1d23fb640051025f741e08eed0e9 (patch)
tree2f14dfc143e9a4d3551f87c8be7a76d05a1545b9 /patches
parent60e889e01fd6baafa9dd6123cab5dec891c44ce3 (diff)
Correct libvirt template patch
Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch56
1 files changed, 22 insertions, 34 deletions
diff --git a/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch b/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch
index 37b10879..417727ec 100644
--- a/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch
+++ b/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch
@@ -1,15 +1,16 @@
+From ec3299c72eae195106092a646409564b5b3eb560 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
Date: Wed, 24 Feb 2016 20:08:24 +0100
-Subject: [PATCH] Make TestVM creation architecture aware
+Subject: [PATCH 10/20] 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/manifests/generate_vms/vm_config.pp | 11 +++++++++++
- deployment/puppet/osnailyfacter/templates/vm_libvirt.erb | 9 ++++++++-
- files/fuel-migrate/fuel-migrate | 5 ++++-
- 4 files changed, 29 insertions(+), 4 deletions(-)
+ deployment/puppet/openstack/manifests/img/cirros.pp | 8 ++++++--
+ .../osnailyfacter/manifests/generate_vms/vm_config.pp | 11 +++++++++++
+ deployment/puppet/osnailyfacter/templates/vm_libvirt.erb | 15 ++++++++++++++-
+ files/fuel-migrate/fuel-migrate | 5 ++++-
+ 4 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/deployment/puppet/openstack/manifests/img/cirros.pp b/deployment/puppet/openstack/manifests/img/cirros.pp
index 84e202e..cff06e0 100644
@@ -44,10 +45,10 @@ index 84e202e..cff06e0 100644
}
diff --git a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp
-index 6d5426a..da5954e 100644
+index 70fef32..dfefcbe 100644
--- a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp
+++ b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp
-@@ -11,6 +11,17 @@ define vm_config {
+@@ -4,6 +4,17 @@ define osnailyfacter::generate_vms::vm_config(
$details = $name
$id = $details['id']
@@ -66,19 +67,25 @@ index 6d5426a..da5954e 100644
owner => 'root',
group => 'root',
diff --git a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
-index ae2ba5b..2d030d9 100644
+index ae2ba5b..64e716d 100644
--- a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
+++ b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
-@@ -3,7 +3,7 @@
+@@ -3,14 +3,23 @@
<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>
++ <% 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>
-@@ -11,6 +11,9 @@
+ <features>
<acpi/>
<apic/>
<pae/>
@@ -88,7 +95,7 @@ index ae2ba5b..2d030d9 100644
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
-@@ -57,7 +60,11 @@
+@@ -57,7 +66,11 @@
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<video>
@@ -101,10 +108,10 @@ index ae2ba5b..2d030d9 100644
<memballoon model='virtio'>
</memballoon>
diff --git a/files/fuel-migrate/fuel-migrate b/files/fuel-migrate/fuel-migrate
-index fad9436..667d4a7 100755
+index a215e0a..7d5b6cd 100755
--- a/files/fuel-migrate/fuel-migrate
+++ b/files/fuel-migrate/fuel-migrate
-@@ -175,6 +175,8 @@ create_vm(){
+@@ -176,6 +176,8 @@ create_vm(){
exit 1
fi
fi
@@ -113,7 +120,7 @@ index fad9436..667d4a7 100755
# 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(){
+@@ -185,13 +187,14 @@ create_vm(){
<memory unit='MiB'>${fvm_ram}</memory>
<vcpu >${fvm_cpu}</vcpu>
<os>
@@ -129,22 +136,3 @@ index fad9436..667d4a7 100755
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
---- deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
-+++ deployment/puppet/osnailyfacter/templates/vm_libvirt.erb
-@@ -3,9 +3,15 @@
- <memory unit='GiB'><%= @details['mem'] %></memory>
- <vcpu placement='static'><%= @details['cpu'] %></vcpu>
- <os>
-- <type arch='<%= @machine_arch %>' machine='<%= @machine_type %>'>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/>