[libvirt] libvirt equivalent config for a kvm command line

Cole Robinson crobinso at redhat.com
Thu Nov 20 14:27:58 UTC 2008


Rajkumar S wrote:
> Hi,
> 
> I had been running kvm in a previous version of Ubuntu with the
> following command line:
> 
>  /usr/bin/kvm
> -hda /mnt/kvm/vm-images-work/nanobsd.img
> -net nic,vlan=26,macaddr=52:54:00:12:34:26 -net tap,vlan=26,ifname=tap26
> -net nic,vlan=27,macaddr=52:54:00:12:34:27 -net tap,vlan=27,ifname=tap27
> -net nic,vlan=28,macaddr=52:54:00:12:34:28 -net tap,vlan=28,ifname=tap28
> -m 640 -vnc :26 -usbdevice tablet
> 

<snip>

> 
> Which produces the following command line.
> 
>  /usr/bin/kvm -S -M pc -m 256 -smp 1 -name nanobsd -monitor pty
> -localtime -boot c
> -drive file=/mnt/kvm/vm-images-work/nanotest.img,if=ide,index=0,boot=on
> -net nic,macaddr=52:54:00:12:34:31,vlan=0 -net
> tap,fd=28,script=,vlan=0,ifname=vnet5
> -net nic,macaddr=52:54:00:12:34:32,vlan=1 -net
> tap,fd=29,script=,vlan=1,ifname=vnet6
> -net nic,macaddr=52:54:00:12:34:33,vlan=2 -net
> tap,fd=30,script=,vlan=2,ifname=vnet7
> -serial vc -parallel none -usb -vnc  192.168.3.3:31
> 
> Problem with this configuration is that the screen freezes after
> couple of minuets of booting, I am not sure if this is the problem
> with the serial console or actual execution. I can see the serial
> console in ctrl-alt-2, but the window size changes. The image works
> perfectly in normal PC as well as if I use the previous command line.
> I guess I am missing some thing here, but I would be very happy if I
> can get the old behaviour back :)
> 

Could be memory related: previous config had 640 Mb, new config only has
256.

If that isn't the issue, I'd say just boot the new kvm command directly,
and remove pieces to see if there is a blatant culprit: ex. revert the
-drive line to use -hda, try with 0/1/2 nics, etc.

- Cole




More information about the libvir-list mailing list