xl and vifname
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CAFivhP=Uw=e8M_JsE2_fRpT5KtqYuKEf_Jdm2aEQz17iT_vHMw@mail.gmail.com
Quoted 2 lines · Florian Heigl
Hi,
Hello,
Quoted 11 lines
2011/12/17 <[email protected]>:
Quoted 4 lines
While using xen 4.1-testing.hg (r23202) I noticed that the 'vifname' config value is not handled by xl, but is handled by xm. Is there a workaround or patch for this? My firewall and scripts depend on static vifnames.
xl does not support vifname as of now.
Except for one type of HVM domU, where it does support vifname.You might want to communicate to xen-devel that you rely on it and all that.
Added xen-devel to CC list ..
Quoted 13 lines
I also think I need vifname support - it's unbearable to work without vifnames if you run a setup with potentially many 100 vifs + vlans + brides + bonds.
(I guess thats how the whole UUID disaster in XenServer happened)I said "think I need" because I DO rely on them, but maybe something happens that makes me suddenly understand that it's better to script against some API to get the information reliably without any problem by changing domIDs and always being up-to-date.
Oh wait, that would be like setting vifname and just looking at the ifconfig output :)
Quoted 7 lines
Florian
Signature · 3 lines
the purpose of libvirt is to provide an abstraction layer hiding all xen features added since 2006 until they were finally understood and copied by the kvm devs.
-- Pasi
+1 to using vifname pretty heavily, sure you can get the job done without but why suffer needlessly? :)
Quoted 42 lines · Pasi Kärkkäinen
Quoted 2 lines · Florian Heigl
Hi,
Hello,
Quoted 10 lines
2011/12/17 <[email protected]>:
Quoted 4 lines
While using xen 4.1-testing.hg (r23202) I noticed that the 'vifname' config value is not handled by xl, but is handled by xm. Is there a workaround or patch for this? My firewall and scripts depend on static vifnames.
xl does not support vifname as of now.
Except for one type of HVM domU, where it does support vifname.You might want to communicate to xen-devel that you rely on it and all
that.
Quoted 1 line
Added xen-devel to CC list ..
Quoted 13 lines
I also think I need vifname support - it's unbearable to work without vifnames if you run a setup with potentially many 100 vifs + vlans + brides + bonds.
(I guess thats how the whole UUID disaster in XenServer happened)I said "think I need" because I DO rely on them, but maybe something happens that makes me suddenly understand that it's better to script against some API to get the information reliably without any problem by changing domIDs and always being up-to-date.
Oh wait, that would be like setting vifname and just looking at the ifconfig output :)Quoted 7 lines
Florian
--
the purpose of libvirt is to provide an abstraction layer hiding all xen features added since 2006 until they were finally understood and copied by the kvm devs.
Quoted 8 lines
-- Pasi
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hello,
Quoted 5 lines · Pasi Kärkkäinen
Quoted 4 lines · Florian Heigl
xl does not support vifname as of now.
Except for one type of HVM domU, where it does support vifname.You might want to communicate to xen-devel that you rely on it and all that.
Ditto here, being able to give a vif a specific name is required.
Cheers,
Andy
Quoted 10 lines · Andy Smith
Hello,
Quoted 5 lines · Pasi Kärkkäinen
Quoted 4 lines · Florian Heigl
xl does not support vifname as of now.
Except for one type of HVM domU, where it does support vifname.You might want to communicate to xen-devel that you rely on it and all that.
Ditto here, being able to give a vif a specific name is required.
I'm a bit confused. xl parses 'vif' names for both HVM and PV guest. I think you're using QEMU as network backend when you run HVM guest?
Well if backend is netback, the vif name is hardcoded as "vif%d.%d" -- see $KERNEL/drivers/net/xen-netback/interface.c:xenvif_alloc. xl has nothing to do with this because the creation of vif is automatically done when FE connects to BE.
A possible solution is that we write user-specified vifname in xenstore entry then BE retrieve the value and use the value as vif name.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Wei,
Quoted 10 lines · Wei Liu
Quoted 1 line · Andy Smith
Ditto here, being able to give a vif a specific name is required.
I'm a bit confused. xl parses 'vif' names for both HVM and PV guest. I think you're using QEMU as network backend when you run HVM guest?
Well if backend is netback, the vif name is hardcoded as "vif%d.%d" -- see $KERNEL/drivers/net/xen-netback/interface.c:xenvif_alloc. xl has nothing to do with this because the creation of vif is automatically done when FE connects to BE.
I haven't followed the thread; I just saw it here on xen-devel that:
"You might want to communicate to xen-devel that you rely on [vifname support]"
Currently we use xm and xend, specify vifname in the PV guest's config in order to get a dom0 network interface of a given name. That functionality is required for us.
If I misunderstood then I apologise; it seemed that it was being indicated that this functionality didn't exist with xm and there were no plans to provide it.
Cheers,
Andy
Quoted 2 lines · Andy Smith
If I misunderstood then I apologise; it seemed that it was being indicated that this functionality didn't exist with xm and there
^^xl
Quoted 1 line
were no plans to provide it.
sigh. :)
Cheers,
Andy, nursing a post Christmas cold.
Quoted 14 lines · Andy Smith
Hi Wei,
Quoted 10 lines · Wei Liu
Quoted 1 line · Andy Smith
Ditto here, being able to give a vif a specific name is required.
I'm a bit confused. xl parses 'vif' names for both HVM and PV guest. I think you're using QEMU as network backend when you run HVM guest?
Well if backend is netback, the vif name is hardcoded as "vif%d.%d" -- see $KERNEL/drivers/net/xen-netback/interface.c:xenvif_alloc. xl has nothing to do with this because the creation of vif is automatically done when FE connects to BE.
Quoted 9 lines
I haven't followed the thread; I just saw it here on xen-devel that:
"You might want to communicate to xen-devel that you rely on [vifname support]"
Currently we use xm and xend, specify vifname in the PV guest's config in order to get a dom0 network interface of a given name. That functionality is required for us.
(Well I'm not very familiar with xm code.)
Does xm serve your purpose -- specifying dom0 network interface of a given name (rather then using vifX.X)?
If it can serve you purpose, can you verify which network backend you are using by running following command:
$ ps aux | egrep '(qemu|net)'
If you get qemu-dm in the result, you're running QEMU. If you get netback/0 in the result, you're running netback.
If you're running netback and you can use you preferred name for the interface, then a similar fix for xl should be possible.
Quoted 4 lines
If I misunderstood then I apologise; it seemed that it was being indicated that this functionality didn't exist with xm and there were no plans to provide it.
I guess "xm" should be "xl". :)
I'm not a toolstack maintainer, I'm only trying to help. Maybe we can wait for a proper answer from the maintainer.
Wei.
Hi Wei,
Quoted 2 lines · Wei Liu
Does xm serve your purpose -- specifying dom0 network interface of a given name (rather then using vifX.X)?
Yes. We need to statically configure the vif names in order to have them be the same every time, and to know which virtual machine configuration they belong to. Not have them change every time the VM is restarted.
(Yes I am aware that it would be possible to translate the vifX.Y string into a domU name and go from there, but that adds a lot of complexity)
Quoted 4 lines
If it can serve you purpose, can you verify which network backend you are using by running following command:
$ ps aux | egrep '(qemu|net)'
This didn't match anything. These are PV domUs and there isn't a process in dom0 for each domU's netback. This is 4.0.1 on Debian stable.
Quoted 2 lines
If you're running netback and you can use you preferred name for the interface, then a similar fix for xl should be possible.
Something like:
vif = [ "mac=00:16:3e:8e:ac:0a, ip=192.168.82.198, vifname=vm-85" ]
has worked for us for ~5 years through Xen 3.x and 4.x.
Cheers,
Andy
Quoted 15 lines · Andy Smith
Hi Wei,
Quoted 2 lines · Wei Liu
Does xm serve your purpose -- specifying dom0 network interface of a given name (rather then using vifX.X)?
Yes. We need to statically configure the vif names in order to have them be the same every time, and to know which virtual machine configuration they belong to. Not have them change every time the VM is restarted.
(Yes I am aware that it would be possible to translate the vifX.Y string into a domU name and go from there, but that adds a lot of complexity)
Quoted 9 lines
Quoted 4 lines
If it can serve you purpose, can you verify which network backend you are using by running following command:
$ ps aux | egrep '(qemu|net)'This didn't match anything. These are PV domUs and there isn't a process in dom0 for each domU's netback. This is 4.0.1 on Debian stable.
What's your dom0 kernel version? The newer kernel (2.6.32 3.X) should have something like netback/0. However, historical kernel doesn't have that.
Hmm... Maybe I misunderstood something here. I skimmed code from 2.6.18 to 3.0, it all hardcodes vif names. Maybe the toolstack alters interface name after creation.
I will spend some time on this and get back to you later.
Quoted 9 lines
Quoted 2 lines
If you're running netback and you can use you preferred name for the interface, then a similar fix for xl should be possible.
Something like:
vif = [ "mac=00:16:3e:8e:ac:0a, ip=192.168.82.198, vifname=vm-85" ]has worked for us for ~5 years through Xen 3.x and 4.x.
Alright, got it.
Wei.
Quoted 7 lines
Cheers,
Andy_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 30 lines · Wei Liu
Quoted 15 lines · Andy Smith
Hi Wei,
Quoted 2 lines · Wei Liu
Does xm serve your purpose -- specifying dom0 network interface of a given name (rather then using vifX.X)?
Yes. We need to statically configure the vif names in order to have them be the same every time, and to know which virtual machine configuration they belong to. Not have them change every time the VM is restarted.
(Yes I am aware that it would be possible to translate the vifX.Y string into a domU name and go from there, but that adds a lot of complexity)
Quoted 9 lines
Quoted 4 lines
If it can serve you purpose, can you verify which network backend you are using by running following command:
$ ps aux | egrep '(qemu|net)'This didn't match anything. These are PV domUs and there isn't a process in dom0 for each domU's netback. This is 4.0.1 on Debian stable.
What's your dom0 kernel version? The newer kernel (2.6.32 3.X) should have something like netback/0. However, historical kernel doesn't have that.
Quoted 5 lines
Hmm... Maybe I misunderstood something here. I skimmed code from 2.6.18 to 3.0, it all hardcodes vif names. Maybe the toolstack alters interface name after creation.
I will spend some time on this and get back to you later.
My guess is that xend used to write a "vifname" node on xenstore in the network backend path with the name of the vif, and the 2.8.16 netback would set the vif name based on that.
However you are right saying that modern pvops kernels are unable to do it.
I think there is no harm in writing the vifname node to xenstore in libxl, that should solve the problem.
Quoted 11 lines
Quoted 9 lines
Quoted 2 lines
If you're running netback and you can use you preferred name for the interface, then a similar fix for xl should be possible.
Something like:
vif = [ "mac=00:16:3e:8e:ac:0a, ip=192.168.82.198, vifname=vm-85" ]has worked for us for ~5 years through Xen 3.x and 4.x.
Alright, got it.
Quoted 7 lines · Stefano Stabellini
My guess is that xend used to write a "vifname" node on xenstore in the network backend path with the name of the vif, and the 2.8.16 netback would set the vif name based on that.
However you are right saying that modern pvops kernels are unable to do it.
I think there is no harm in writing the vifname node to xenstore in libxl, that should solve the problem.
Oops, I have just seen that you have fixed this already!