I would like to identify each KVM instance as it is started up, and one of the ways that i figured i can do this is pass IP address into the KVM in the command line arguments. However, i can't seem to do that for some reason. I used the following command:

kvm -smp 1 -vnc :3 -net net=10.0.2.2 -daemonize -drive file="master.qcow2" "$@"

Where it gives me an error:

No type specified for -net

Anyone have any solution for this problem or the more general problem of identifying kvm instances?

thanks a lot!

Jason

link|improve this question

67% accept rate
What do you mean by "identify"? – sciurus May 12 '11 at 2:05
feedback

1 Answer

-net nic[,model=<adapter_model>][,macaddr=<mac>][...] This is the actual code, no IP address can be specified here. a VM is actually a standalone machine, which behaves like a physical host. If you absolutely need to specify IPs per VM, you can specify the MAC, and set up your DHCP to assign the right IP to the assigned MAC

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.