view qemu-system-arm @ 10:be7ae6f2993b

Running libvirt
author innparusu
date Sat, 27 Jan 2018 19:26:44 +0900
parents fa68a049532a
children
line wrap: on
line source

#!/bin/bash
#
# Quick'n'dirty qemu-system-arm wrapper
#
# This is a temporary wrapper script to enable 
# qemu-system-arm 0.12.3 to be managed by libvirt 0.7.6
# (Fedora 13 Alpha). To use it:
# 1. mv /usr/bin/qemu-system-arm /usr/bin/qemu-system-arm.bin
# 2. save this script as /usr/bin/qemu-system-arm with 
#    appropriate permissions
#
# Chris Tyler 2010-03-11
#

LOGFILE=/dev/null
# LOGFILE=/tmp/aaa.log

ARGS="$(echo "$*"|                                              \
        sed     -e "s/pci.[0-9]*/pci/g"                         \
                -e "s/bus=scsi[^,]*//g"                         \
                -e "s/-vga cirrus//g"                         \
                -e "s/if=none,/if=scsi,/g"                      \
                -e "s/-device scsi-disk[^ ]*//g"                \
                -e "s/-device rtl[^ ]*mac=\([a-fA-F0-9:]*\)[^ ]*/-net nic,macaddr=\1,vlan=0,name=nic.0/g"                       \
                -e "s/-device [^ ]*//g"                         \
)"

echo "Date: $(date)" >>$LOGFILE
echo "Original args: $ARGS" >>$LOGFILE
echo "Edited args: $ARGS" >>$LOGFILE

/bin/qemu-system-arm.bin $ARGS

RESULT=$?
echo "Result code: $RESULT" >>$LOGFILE
# (echo "ID: ";id) >>/tmp/qemu.log

exit $?