Revision: 22
http://sourceforge.net/p/lxm/code/22
Author: outchy
Date: 2018-04-29 12:16:52 +0000 (Sun, 29 Apr 2018)
Log Message:
-----------
fix warnings with latest versions of QEMU.
Modified Paths:
--------------
kvm-based/trunk/bash_scripts/kvm-start
Modified: kvm-based/trunk/bash_scripts/kvm-start
===================================================================
--- kvm-based/trunk/bash_scripts/kvm-start 2018-04-29 12:08:13 UTC (rev 21)
+++ kvm-based/trunk/bash_scripts/kvm-start 2018-04-29 12:16:52 UTC (rev 22)
@@ -90,6 +90,7 @@
KVM_DISK_UNIT=`ini_get_value "KVM" "kvmdiskunit$INDEX"`
KVM_DISK_MEDIA=`ini_get_value "KVM" "kvmdiskmedia$INDEX"`
KVM_DISK_SNAPSHOT=`ini_get_value "KVM" "kvmdisksnapshot$INDEX"`
+ KVM_DISK_FORMAT=`ini_get_value "KVM" "kvmdiskformat$INDEX"`
if [ -n "$KVM_DISK_IF" ]; then
KVM="$KVM -drive index=$INDEX"
if [ -n "$KVM_DISK_FILE" ]; then
@@ -110,6 +111,9 @@
if [ -n "$KVM_DISK_SNAPSHOT" ]; then
KVM="$KVM,snapshot=$KVM_DISK_SNAPSHOT"
fi
+ if [ -n "$KVM_DISK_FORMAT" ]; then
+ KVM="$KVM,format=$KVM_DISK_FORMAT"
+ fi
INDEX=$[1+$INDEX]
else
break
@@ -158,7 +162,7 @@
KVM="$KVM -usb"
;;
*)
- KVM="$KVM -usb -usbdevice $KVM_USB"
+ KVM="$KVM -usb -device usb-$KVM_USB"
esac
KVM_GRAPHIC=`ini_get_value "KVM" "kvmgraphic"`
@@ -204,7 +208,7 @@
KVM_VLAN=`ini_get_value "KVM" "kvmvlan"`
if [ -z "$KVM_VLAN" ]; then
- KVM_VLAN=0
+ KVM_VLAN=net0
fi
KVM_IFNAME=`ini_get_value "KVM" "kvmifname"`
@@ -213,8 +217,8 @@
fi
KVM_MODEL=`ini_get_value "KVM" "kvmmodel"`
-if [ -n "$KVM_MODEL" ]; then
- KVM_MODEL=",model=$KVM_MODEL"
+if [ -z "$KVM_MODEL" ]; then
+ KVM_MODEL="e1000"
fi
INDEX=1
@@ -235,10 +239,10 @@
KVM="$KVM -net none"
;;
user)
- KVM="$KVM -net nic,vlan=$KVM_VLAN,macaddr=$KVM_MAC$KVM_MODEL -net user,vlan=$KVM_IFNAME"
+ KVM="$KVM -netdev user,id=$KVM_VLAN -device $KVM_MODEL,netdev=$KVM_VLAN,mac=$KVM_MAC"
;;
auto)
- KVM="$KVM -net nic,vlan=$KVM_VLAN,macaddr=$KVM_MAC$KVM_MODEL -net tap,vlan=$KVM_VLAN,ifname=$KVM_NAME"
+ KVM="$KVM -netdev tap,ifname=$KVM_IFNAME,id=$KVM_VLAN -device $KVM_MODEL,netdev=$KVM_VLAN,mac=$KVM_MAC"
;;
esac
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|