public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM Management : Public Bridge setup
@ 2008-08-09  2:18 jd
  2008-08-09 15:43 ` Anthony Liguori
  2008-08-12  3:12 ` Alberto Treviño
  0 siblings, 2 replies; 5+ messages in thread
From: jd @ 2008-08-09  2:18 UTC (permalink / raw)
  To: KVM List

Hi
  The /etc/qemu-if script seems to be taking the interface as a parameter, is there a way to pass the bridge name to the script as well. Thus from the command line one can pass the bridge that one whats to attach to.
  (One can potentially one script for each bridge and pass the script name to qemu... but it seems bit unnecessary.)

Thanks
/Jd


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: KVM Management : Public Bridge setup
  2008-08-09  2:18 KVM Management : Public Bridge setup jd
@ 2008-08-09 15:43 ` Anthony Liguori
  2008-08-09 21:19   ` jd
  2008-08-12  3:12 ` Alberto Treviño
  1 sibling, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-08-09 15:43 UTC (permalink / raw)
  To: jdsw2002; +Cc: KVM List

jd wrote:
> Hi
>   The /etc/qemu-if script seems to be taking the interface as a parameter, is there a way to pass the bridge name to the script as well. Thus from the command line one can pass the bridge that one whats to attach to.
>   (One can potentially one script for each bridge and pass the script name to qemu... but it seems bit unnecessary.)
>   

Environmental variables passed to the QEMU process can be used by the 
scripts.  For instance, if you use $BRIDGE_NAME in the script, then you 
would start QEMU with:

BRIDGE_NAME=br1 qemu-system-x86_64 ....

Regards,

Anthony Liguori

> Thanks
> /Jd
>
>
>       
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: KVM Management : Public Bridge setup
  2008-08-09 15:43 ` Anthony Liguori
@ 2008-08-09 21:19   ` jd
  0 siblings, 0 replies; 5+ messages in thread
From: jd @ 2008-08-09 21:19 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: KVM List

cool..... why didnt I think of that.

Will try that out. Thanks.
/Jd


--- On Sat, 8/9/08, Anthony Liguori <anthony@codemonkey.ws> wrote:

> From: Anthony Liguori <anthony@codemonkey.ws>
> Subject: Re: KVM Management : Public Bridge setup
> To: jdsw2002@yahoo.com
> Cc: "KVM List" <kvm@vger.kernel.org>
> Date: Saturday, August 9, 2008, 8:43 AM
> jd wrote:
> > Hi
> >   The /etc/qemu-if script seems to be taking the
> interface as a parameter, is there a way to pass the bridge
> name to the script as well. Thus from the command line one
> can pass the bridge that one whats to attach to.
> >   (One can potentially one script for each bridge and
> pass the script name to qemu... but it seems bit
> unnecessary.)
> >   
> 
> Environmental variables passed to the QEMU process can be
> used by the 
> scripts.  For instance, if you use $BRIDGE_NAME in the
> script, then you 
> would start QEMU with:
> 
> BRIDGE_NAME=br1 qemu-system-x86_64 ....
> 
> Regards,
> 
> Anthony Liguori
> 
> > Thanks
> > /Jd
> >
> >
> >       
> > --
> > To unsubscribe from this list: send the line
> "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at 
> http://vger.kernel.org/majordomo-info.html
> >


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: KVM Management : Public Bridge setup
  2008-08-09  2:18 KVM Management : Public Bridge setup jd
  2008-08-09 15:43 ` Anthony Liguori
@ 2008-08-12  3:12 ` Alberto Treviño
  2008-08-12 17:39   ` jd
  1 sibling, 1 reply; 5+ messages in thread
From: Alberto Treviño @ 2008-08-12  3:12 UTC (permalink / raw)
  To: jdsw2002@yahoo.com; +Cc: KVM List

On Friday 08 August 2008 08:18:26 pm jd wrote:
>   The /etc/qemu-if script seems to be taking the interface as a
> parameter, is there a way to pass the bridge name to the script as well.
> Thus from the command line one can pass the bridge that one whats to
> attach to. (One can potentially one script for each bridge and pass the
> script name to qemu... but it seems bit unnecessary.)

I name my tap devices (using ifname=...) as follows:

  tap.br0.05.1

where
  tap  -- this is a tap device
  br0  -- the name of the bridge
  05   -- the ID of the VM (each of my VM's has a unique numeric ID)
  1    -- The NIC # on the VM (1, 2, 3, or 4 depending on # of NIC's)

Then on my scripts I can extract the bridge name and use it.  This also has 
the advantage of helping me know just by the name what bridge this devices 
is hooked up to, what VM it belongs to, and which NIC it is inside the VM.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: KVM Management : Public Bridge setup
  2008-08-12  3:12 ` Alberto Treviño
@ 2008-08-12 17:39   ` jd
  0 siblings, 0 replies; 5+ messages in thread
From: jd @ 2008-08-12 17:39 UTC (permalink / raw)
  To: Alberto Treviño; +Cc: KVM List

Neat. 

Thanks
/Jd


--- On Mon, 8/11/08, Alberto Treviño <alberto@byu.edu> wrote:

> From: Alberto Treviño <alberto@byu.edu>
> Subject: Re: KVM Management : Public Bridge setup
> To: "jdsw2002@yahoo.com" <jdsw2002@yahoo.com>
> Cc: "KVM List" <kvm@vger.kernel.org>
> Date: Monday, August 11, 2008, 8:12 PM
> On Friday 08 August 2008 08:18:26 pm jd wrote:
> >   The /etc/qemu-if script seems to be taking the
> interface as a
> > parameter, is there a way to pass the bridge name to
> the script as well.
> > Thus from the command line one can pass the bridge
> that one whats to
> > attach to. (One can potentially one script for each
> bridge and pass the
> > script name to qemu... but it seems bit unnecessary.)
> 
> I name my tap devices (using ifname=...) as follows:
> 
>   tap.br0.05.1
> 
> where
>   tap  -- this is a tap device
>   br0  -- the name of the bridge
>   05   -- the ID of the VM (each of my VM's has a
> unique numeric ID)
>   1    -- The NIC # on the VM (1, 2, 3, or 4 depending on #
> of NIC's)
> 
> Then on my scripts I can extract the bridge name and use
> it.  This also has 
> the advantage of helping me know just by the name what
> bridge this devices 
> is hooked up to, what VM it belongs to, and which NIC it is
> inside the VM.
> --
> To unsubscribe from this list: send the line
> "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-12 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-09  2:18 KVM Management : Public Bridge setup jd
2008-08-09 15:43 ` Anthony Liguori
2008-08-09 21:19   ` jd
2008-08-12  3:12 ` Alberto Treviño
2008-08-12 17:39   ` jd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox