From 6ead73b5211ec19ce72a1f8cb5c3d2688c6bdac1 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Wed, 26 Jan 2011 18:47:46 -0500 Subject: added some arguments gleaned from watching libvirt (still need to switch disk and net to virtio, most importantly) --- kvm-manager | 16 ++++++++++++++-- 1 file 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" \ -- cgit v1.2.3