Hi all Is it possible to specify which vif device a domU VM should use? I see that it sometimes change around, depending on which order they were started in. So, how do I tell XEN to always use the same vif for the same domU ? -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Rudi, the vif name depends on the id of the domain. It is named following this pattern: vif<domid>.<interface> For example: If you have a domain test with the id 13 and two network interfaces, you will see the both following vifs in dom0: vif13.0 vif13.1 Regards, Jan -- Artfiles New Media GmbH | Spaldingstr. 160 b | 20097 Hamburg Tel: 040 - 32 02 72 90 | Fax: 040 - 32 02 72 95 E-Mail: support@artfiles.de | Web: http://www.artfiles.de Geschäftsführer Carsten Bals | Handelsregister Hamburg - HRB 81478 Rudi Ahlers wrote:> Hi all > > Is it possible to specify which vif device a domU VM should use? I see that > it sometimes change around, depending on which order they were started in. > So, how do I tell XEN to always use the same vif for the same domU ? > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Aug 13, 2008 at 2:03 PM, Jan Marquardt <jm@artfiles.de> wrote:> Hi Rudi, > > the vif name depends on the id of the domain. It is named following this > pattern: vif<domid>.<interface> > > For example: > > If you have a domain test with the id 13 and two network interfaces, you > will see the both following vifs in dom0: > > vif13.0 > vif13.1 > > > Regards, > > Jan > > -- > Artfiles New Media GmbH | Spaldingstr. 160 b | 20097 Hamburg > Tel: 040 - 32 02 72 90 | Fax: 040 - 32 02 72 95 > E-Mail: support@artfiles.de | Web: http://www.artfiles.de > Geschäftsführer Carsten Bals | Handelsregister Hamburg - HRB 81478 > > > Rudi Ahlers wrote: > >> Hi all >> >> Is it possible to specify which vif device a domU VM should use? I see >> that >> it sometimes change around, depending on which order they were started in. >> So, how do I tell XEN to always use the same vif for the same domU ? >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> >Hi Jan The domain ID changes from time to time, depending on which order the domains were started / restarted So, this is not very reliable, especially for cacti stats - which uses the device name for traffic graphs # xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 14884.2 vm01 63 511 2 -b---- 12311.3 #xm create pluto Using config file "/etc/xen/pluto". Started domain pluto # xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 14891.3 pluto 67 256 2 -b---- 0.2 vm01 63 511 2 -b---- 12313.5 [root@venus ~]# xm shutdown vm01 [root@venus ~]# xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 14917.6 pluto 67 255 2 -b---- 9.6 [root@venus ~]# xm create vm01 Using config file "/etc/xen/vm01". Started domain vm01 [root@venus ~]# xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 14918.4 pluto 67 255 2 -b---- 9.6 vm01 68 512 2 -b---- 0.2 [root@venus~]# So, I''d rather want to give the devices their own names, same as you do with Linux (eth0 / eth0:1 / eth0:2 / etc) -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Hi Jan > > The domain ID changes from time to time, depending on which order the > domains were started / restarted > So, this is not very reliable, especially for cacti stats - which usesthe> device name for traffic graphsThat''s going to be tricky. If netfront could publish something into the /sys entry for the device, eg domain_name=Pluto, then udev could take care of the device renaming, but netfront doesn''t do that and I''m not even sure if that level of device driver has visibility to the /sys entries. And it would probably break the /etc/xen/scripts/* code. There are two approaches you could take: 1. Add some code to the appropriate script in /etc/xen/scripts to rename the device when the domain is created via the ''ip link set vifX.0 name pluto0'' command. This might be tricky as the interface name (as vifX.0) is used in many places in those scripts and renaming it will confuse them. 2. Make cacti smarter about how it determines the interface name. I''m not familiar with cacti but under mrtg, if you are on the local machine (eg not using SNMP), you could just write a script to return the required results. Depending on how flexible cacti is, I''d take the latter approach. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 13/08/2008 13:13, Rudi Ahlers wrote:> The domain ID changes from time to time, depending on which order the > domains were started / restarted > So, this is not very reliable, especially for cacti stats - which uses > the device name for traffic graphsInstall snmpd on each domU and let cacti poll the NICs from the domU rather than the dom0 (especially if you''ll be measuring cpu/memory/disk usage of each domU as well). _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Aug 13, 2008 at 01:24:12PM +0200, Rudi Ahlers wrote: Hi,> Is it possible to specify which vif device a domU VM should use? I see that > it sometimes change around, depending on which order they were started in. > So, how do I tell XEN to always use the same vif for the same domU ?Yes, it is. You are looking for option ''vifname''. Example from one of my domU config files: vif = [ ''ip=192.168.10.11,vifname=monitor.0,mac=00:16:3e:05:ee:04'' ] Kupson _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Aug 13, 2008 at 3:51 PM, Rafał Kupka <rkupka+Listy.Xen@pronet.com.pl<rkupka%2BListy.Xen@pronet.com.pl>> wrote:> On Wed, Aug 13, 2008 at 01:24:12PM +0200, Rudi Ahlers wrote: > Hi, > > > Is it possible to specify which vif device a domU VM should use? I see > that > > it sometimes change around, depending on which order they were started > in. > > So, how do I tell XEN to always use the same vif for the same domU ? > > Yes, it is. You are looking for option 'vifname'. > > Example from one of my domU config files: > vif = [ > 'ip=192.168.10.11,vifname=monitor.0,mac=00:16:3e:05:ee:04' > ] > > Kupson > > _______________________________________________ >AHA! that's what I'm looking for,thank you :) -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers wrote:> Hi all > > Is it possible to specify which vif device a domU VM should use? I see > that it sometimes change around, depending on which order they were > started in. So, how do I tell XEN to always use the same vif for the > same domU ? > > -- > > Kind Regards > Rudi Ahlers > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-usersSome xen versions supports "vifname=name" to be used in vif = section of guest config file. This support has been abnormal, as this was introduced in 2.x, removed from 3.0.1 re-added to 3.0.3. So not sure current version has this support or not. --Sadique _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users