[Users] Add NIC directly to VM (Dedicated)

Matt . yamakasi.014 at gmail.com
Sun Feb 10 09:12:49 EST 2013


Hi Dan,

OK, thanks this is something I need to look into.

What would be another way to accomplish this ? Create two networks for
these nics and VM ?

The issue is that when I add a Nic to a host on 3.2 I need to set an IP.
When I don't set it or at least set it to DHCP I get an error that there IP
is not set right, I also see this in the logs.

Is that part still a bug ?

I get the feeling that it's the way at the moment, or almost, that the Nics
needs an IP, but why ? For an example this is not needed on ESXi, the
Virtual Nic can be bridged to a VM without any settings on the host.

Thanks so far.

Cheers,

Matt


2013/2/10 Dan Kenigsberg <danken at redhat.com>

> On Sun, Feb 10, 2013 at 12:19:57PM +0100, Matt . wrote:
> > Hi,
> >
> > For setting up a firewall in a VM I would like to add 2 of my 4 nics
> > directly to a VM.
> >
> > In my previous setup I thought I have done that, but at the moment I
> cannot
> > figure this out and cannot find the docs to accomplish this.
> >
> > I would like to dedicate those 2 nics to my firewall VM's to avoid
> sharing
> > them using a network per accident to other VM's.
> >
> > How is this be done at the moment ?
>
> AFAIK it can be done only with a vdsm hook. You'd need to define your VM
> with no interface at all, but instead, mark it with a special custom
> property you define. Then, you should write a hook that adds the two
> host interfaces to the VM, by means of either
> http://libvirt.org/formatdomain.html#elementsNICSDirect or
> http://libvirt.org/formatdomain.html#elementsNICSHostdev
>
> Most probably, you would need to pin your firewall VM to a specific
> host.
>
> Writing a hook is not too complex, but it requires understanding of how
> vdsm and libvirt works. You can take
> http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=tree;f=vdsm_hooks/vmfex as a
> reference, or ask for specific guidance here.
>
> Dan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20130210/34693eb1/attachment-0001.html>


More information about the Users mailing list