Re: KVM Management : Public Bridge setup

2008-08-12 Thread jd
Neat. 

Thanks
/Jd


--- On Mon, 8/11/08, Alberto Treviño <[EMAIL PROTECTED]> wrote:

> From: Alberto Treviño <[EMAIL PROTECTED]>
> Subject: Re: KVM Management : Public Bridge setup
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Cc: "KVM List" 
> 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 [EMAIL PROTECTED]
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


  
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM Management : Public Bridge setup

2008-08-11 Thread Alberto Treviño
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM Management : Public Bridge setup

2008-08-09 Thread jd
cool. why didnt I think of that.

Will try that out. Thanks.
/Jd


--- On Sat, 8/9/08, Anthony Liguori <[EMAIL PROTECTED]> wrote:

> From: Anthony Liguori <[EMAIL PROTECTED]>
> Subject: Re: KVM Management : Public Bridge setup
> To: [EMAIL PROTECTED]
> Cc: "KVM List" 
> 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 [EMAIL PROTECTED]
> > More majordomo info at 
> http://vger.kernel.org/majordomo-info.html
> >


  
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM Management : Public Bridge setup

2008-08-09 Thread Anthony Liguori

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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


KVM Management : Public Bridge setup

2008-08-08 Thread jd
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


  
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html