[virt-tools-list] Add an option allowing the use of a defined tap device with "virt-install"
Cole Robinson
crobinso at redhat.com
Mon Mar 5 00:07:08 UTC 2012
On 03/04/2012 06:47 PM, Tina Rakotoarivelo wrote:
> Hello,
>
> We use KVM with libvirt on a scientific instrument designed to supports
> experiment-driven research in all areas of computer science related to
> large-scale parallel or distributed systems.
>
> Our users do not have root access on the production environment. A script
> based on "sudo" is available to create tap devices (tap0...tapn). So they can
> run their guest VMs with "kvm" or "virsh" commands using the defined tap
> devices and a defined range of MAC adresses (we have an ACL for DHCP requests
> from all VMs).
>
> Now, we want to allow the users to use "virt-install" with a tap device
> already created.
> So we want to evaluate if adding that option to "virt-install" is difficult or
> not?
>
It shouldn't be too difficult, I think what you want is to generate libvirt
XMl like
<interface type='ethernet'>
<target dev='tap0'/>
</interface>
You'd want to extend the virt-install --network option to look like
--network ethernet,target=tap0
You can see the existing --network parsing code here:
http://git.fedorahosted.org/git?p=python-virtinst.git;a=blob;f=virtinst/cli.py;h=738bc006b6050fb72ca52c678a0f06939db6ae11;hb=HEAD#l1617
So you'd need to extend that, and probably add some bits to
virtinst/VirtualNetworkInterface.py to generate the needed xml. If you do all
that I can help with tests + man page additions.
Thanks,
Cole
More information about the virt-tools-list
mailing list