I am trying to create a VM using the virt-install utility and while that is easy enough to do what I would like to be able to do is proving quite difficult.
I would like to be able to specify the domain/bus/slot/function of the ethernet interfaces that I am adding. I realize that I can use virsh edit after the domain is created to modify these settings from the defaults they are given but I was wondering if anyone knows whether or not it can be dome from the command line using the virt-install utility and if it can be done, do you know what the proper syntax is?
Thank you.
Shawn
Yes, you can specify all those on the
virt-install
command line. Checkvirt-install --network=?
for a complete list of what you can specify. These correspond to the attributes set in XML.For instance, if your
<interface>
looks like this:You can specify it like:
You can also, instead of doing an installation, use
--print-xml
to get the generated XML. Then you can customize this to your liking and automate many installations directly without going throughvirt-install
.