diff options
author | Dan Radez <dradez@redhat.com> | 2017-05-05 16:51:02 -0400 |
---|---|---|
committer | Dan Radez <dradez@redhat.com> | 2017-06-22 16:37:59 -0400 |
commit | 586110a27dc11e89a5ff3552f3215e8a0716aa92 (patch) | |
tree | e1fa6054d3f8077f114675d8de2b5da4a302a374 /lib/virtual-setup-functions.sh | |
parent | ff9beeb45e7d25aedf2d25644497b0468a96ee16 (diff) |
Adding conditionals dependent on arch
There are x86 specific build items that can't be used when building on
aarch64. Adding conditionals so that the items only get built in when
building on x86_64.
There are aarch64 specific settings that need to be set for deployment.
JIRA: APEX-381
Change-Id: I63e1c99d5d22bbb523c88be7e973a6c834a38b01
Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'lib/virtual-setup-functions.sh')
-rwxr-xr-x | lib/virtual-setup-functions.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/virtual-setup-functions.sh b/lib/virtual-setup-functions.sh index ac7b507b..8e15ef5d 100755 --- a/lib/virtual-setup-functions.sh +++ b/lib/virtual-setup-functions.sh @@ -81,7 +81,7 @@ EOF cpu: $vcpus memory: $ramsize disk: 41 - arch: "x86_64" + arch: "$(uname -i)" capabilities: "$capability" EOF vbmc add baremetal$i --port 623$i @@ -139,11 +139,17 @@ function define_vm () { kernel_args='--kernel-arg console=ttyS0 --kernel-arg root=/dev/sda' fi + if [ "$(uname -i)" == 'aarch64' ]; then + diskbus='scsi' + else + diskbus='sata' + fi + # create the VM $LIB/configure-vm --name $1 \ --bootdev $2 \ --image "$volume_path" \ - --diskbus sata \ + --diskbus $diskbus \ --arch $(uname -i) \ --cpus $vcpus \ --memory $ramsize \ |