How to start virtual host using qemu-kvm from command line in F7?

Jan Andrejkovic jandrejkovic at gmail.com
Mon Aug 27 12:25:40 UTC 2007


Hello,

I have latest stable and updated F7 and I installed another linux as virtual
host using virt-manager and all is working fine.
The only problem I have is this - when I restart my virtual system (from
inside) it is not started automatically so I have to start it again manually
using virt-manager.
The same problem arises when my F7 host is rebooted.

As a workaround for this problem I would like to place a short script into
cron which will check if a process with my virtual linux is running and if
not, it will start it.
(As the unique identifier for my process I will use MAC address parameter
for qemu-kvm.)

So I found how the virt-manager is starting qemu-kvm:
/usr/bin/qemu-kvm -M pc -m 384 -smp 1 -monitor pty -boot c -hda
/home/myhome/KVM/linux_image_i386 -net nic,macaddr=00:11:22:33:44:55,vlan=0
-net tap,fd=10,script=,vlan=0 -usb -vnc 127.0.0.1:0

And I tried to do the similar thing from command line (but without
graphics):
/usr/bin/qemu-kvm -M pc -m 384 -smp 1 -monitor pty -boot c -hda
/home/myhome/KVM/linux_image_i386 -net nic,macaddr=00:11:22:33:44:55,vlan=0
-net tap,fd=10,script=,vlan=0 -usb -nographics

The problem is that despite the virtual host starts, the networking is never
working, howver when I start it from virt-manager it is working fine.
I also tried arguments -no-rtc and -daemonize but with no luck.

My goal is to have IP connectivity to my virtual host - I do not need
graphic vnc window for my virtual host on F7.

Can you please advise me what additional steps I have to do to, so when I
start it from comand line, the result will be the same as using
virt-manager?
(I also assume that once it is running from command line properly,
virt-manager will not "see" it - but this would be not a problem for me.)

Thank you very much,

Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/test/attachments/20070827/cdfb983a/attachment.html 


More information about the test mailing list