[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] Add an option allowing the use of a defined tap device with "virt-install"

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'/>

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:


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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]