aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2011-01-26 18:47:46 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2011-01-26 18:47:46 -0500
commit6ead73b5211ec19ce72a1f8cb5c3d2688c6bdac1 (patch)
treeff9fe5d5918591ef6207f2a4e5092f233c32d9be
parent6625d126b257ad696d59c7237c037b7a3c36b808 (diff)
downloadkvm-manager-6ead73b5211ec19ce72a1f8cb5c3d2688c6bdac1.tar.gz
kvm-manager-6ead73b5211ec19ce72a1f8cb5c3d2688c6bdac1.tar.bz2
added some arguments gleaned from watching libvirt (still need to switch disk and net to virtio, most importantly)
-rwxr-xr-xkvm-manager16
1 files changed, 14 insertions, 2 deletions
diff --git a/kvm-manager b/kvm-manager
index 84795fe..2c7eddf 100755
--- a/kvm-manager
+++ b/kvm-manager
@@ -41,10 +41,13 @@ up() {
NETBOOT="$OWNERHOME/vms/$VMNAME/netboot"
KVMARGS=
+ BOOTCHOICE=c
+
if [ -e "$NETBOOT" ] ; then
- KVMARGS="-boot n"
+ BOOTCHOICE=n
elif [ -e "$CDISO" ] && [ -e $(readlink -f "$CDISO") ] ; then
- KVMARGS="-cdrom $CDISO -boot d"
+ KVMARGS="-cdrom $CDISO"
+ BOOTCHOICE=d
fi
# set up the disks, if needed:
@@ -62,9 +65,18 @@ up() {
exec chpst -u "$OWNER:$OWNERGROUP:kvm" \
/usr/bin/screen -D -m -L -c /etc/screenrc.kvm-manager -S "$VMNAME" -t "$VMNAME" -s /bin/false \
/usr/bin/kvm $KVMARGS \
+ -M "${MACHINE:-pc}" \
+ -enable-kvm \
+ -nodefaults \
-nographic \
-name "$VMNAME" \
-m "$RAM" \
+ -boot "$BOOTCHOICE" \
+ -chardev "socket,id=monitor,path=$OWNERHOME/vms/$VMNAME/monitor,server,nowait" -mon chardev=monitor,mode=readline \
+ -rtc base=utc \
+ -usb \
+ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \
+ -chardev stdio,id=serial0 -device isa-serial,chardev=serial0 \
-smp "${SMP:-1},maxcpus=${MAXCPUS:-8}" \
-net nic,"macaddr=$MAC" \
-net "tap,ifname=$TAP,script=no,downscript=no" \