-net tap,script=/home/richard/kvm/scripts/add-iface-to-lan \
        -net nic,macaddr=52:54:00:12:34:56 \
        -serial telnet:127.0.0.1:10001,server,nowait \
        -kernel linux \
        -initrd initrd.gz \
        -append "auto url=http://192.168.11.171/~richard/preseed.cfg console=ttyS0,9600n8 locale=en_US hostname=x domain=x"

Graphics / IO

By default, kvm puts up a SDL output connected to the VGA. Another common option is to just use a serial console.

Networking

Using a tun device lets the network go much faster, and is highly recommended.

        -net tap,script=/home/richard/kvm/scripts/add-iface-to-lan \
        -net nic,macaddr=52:54:00:12:34:56 \

Here is my script add-iface-to_XXX. Name this script with XXX being the bridge name, and the interface will be added to XXX. See also DebianNotes/NetworkInterfaces.

iface="$1"
bridge=`echo $0 | cut -f 2 -d _`

brctl addif $bridge $iface
ip link set up $iface

Serial console

To make Debian spawn a serial console, uncomment this line in /etc/inittab

T0:23:respawn:/sbin/getty -L ttyS0 9600 vt102

Use the -serial KVM option to control the method of connection to the serial console.

To make use of the serial console:

qemu management console

This is the console which you can use to reboot, snapshot, etc. You can spawn it similar to serial consoles

DebianNotes/KVM (last edited 2011-07-25 22:14:10 by RichardDarst)