aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-02 00:10:03 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-02 00:10:14 +0100
commit6ccfee59ea7225cfc46227e7e874835dc75dc575 (patch)
tree14b66160817b2b6151eed0dba4c7cf35fbc7ada8 /mcp/scripts/lib.sh
parentf74201bebff81f8719b3ffe593e8d7ded50730a8 (diff)
Revert "[FN VMs] remove graphics"
RHEL family virtualization tools reserve 02:00 PCI slot for VGA, even if 'nographics' is specified when creating the VM (in case the user wants to later hook a video card, which usually *requires* PCI slot2). Debian systems do not follow this rule (tested with libvirt 1.x, 2.x, 3.x), hence 1st NIC lands on PCI slot 2 (and get eth name 'ens2'). To align the behavior across all possible jumpserver distros, bring back the virtio video. This reverts commit 738f6c3b68d1179de1ff790f9e72c25f10874da4. Change-Id: Ifd855c12e04aec1ff0ab047b13f8081365741889 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib.sh')
-rw-r--r--mcp/scripts/lib.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 2038badfd..d2ffaa659 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -336,6 +336,13 @@ function create_vms {
IFS='|' read -r -a vnodes <<< "$1"; shift
local vnode_networks=("$@")
+ # AArch64: prepare arch specific arguments
+ local virt_extra_args=""
+ if [ "$(uname -i)" = "aarch64" ]; then
+ # No Cirrus VGA on AArch64, use virtio instead
+ virt_extra_args="$virt_extra_args --video=virtio"
+ fi
+
# create vms with specified options
for serialized_vnode_data in "${vnodes[@]}"; do
IFS=',' read -r -a vnode_data <<< "${serialized_vnode_data}"
@@ -356,9 +363,10 @@ function create_vms {
--cpu host-passthrough --accelerate ${net_args} \
--disk path="${image_dir}/mcp_${vnode_data[0]}.qcow2",format=qcow2,bus=virtio,cache=none,io=native \
--os-type linux --os-variant none \
- --boot hd --nographics --console pty --autostart --noreboot \
+ --boot hd --vnc --console pty --autostart --noreboot \
--disk path="${image_dir}/mcp_${vnode_data[0]}.iso",device=cdrom \
- --noautoconsole
+ --noautoconsole \
+ ${virt_extra_args}
done
}