0

1) What's the use of the addr value when specifying a new network interface on QEMU/KVM ?

Example: qemu -hda deb.img -net nic,addr=192.168.1.10

2) Is there a way to specify directly the IP address of a network interface ?

(Directly means at the moment we launch the guest)

1

-net nic is a deprecated syntax though it still works; -netdev replaced it. The addr parameter to -net nic is the PCI bus address, not the network address.

No, you can't tell the guest OS what IP to assign itself from the command line. You can use dhcp or slaac to notifying the guest of its network config.

You will also want to set appropriate nft or iptables and ebtables rules to prevent guest OSes from doing anything nefarious.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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