Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2022 15:43:55 +0200
From:      Ondra Knezour <knezour@weboutsourcing.cz>
To:        freebsd-xen@freebsd.org
Subject:   Better network reporting from FreeBSD VM via xenstore
Message-ID:  <eac38924-3e62-ae7e-ebb1-882cc629aa20@weboutsourcing.cz>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello all,

it seems to me that there is some room to improve how are things about 
networking reported from FreeBSD VM to the hypervisor.

Now we have function xe_ip_if() in /usr/local/sbin/xe-update-guest-attrs 
which just grep for xn interfaces, read one IP address for each which is 
eventually written to the /var/cache/xenstore/attr/ethNUMBER/ip

First - from where the ip node comes? I didn't find any such in 
https://xenbits.xen.org/docs/unstable/misc/xenstore-paths.html

We have

xenstore ls attr
eth0 = ""
  ip = "10.0.0.1"
PVAddons = ""
  MajorVersion = "6"
  MinorVersion = "2"
  MicroVersion = "0"
  BuildVersion = "76888"
  Installed = "1"

But on Linux

xenstore ls | grep attr -A 50
attr = ""
  PVAddons = ""
   BuildVersion = "1"
   Installed = "1"
   MajorVersion = "8"
   MinorVersion = "1"
   MicroVersion = "50"
  vif = ""
   1 = ""
    ipv6 = ""
     0 = "fe80::9c30:52ff:fef1:8711"
    ipv4 = ""
     0 = "10.128.99.15"
   2 = ""
    ipv4 = ""
     0 = "10.0.1.15"
    ipv6 = ""
     0 = "fe80::e833:9cff:fe5e:c21c"
   0 = ""
    ipv4 = ""
     0 = "172.22.1.15"
    ipv6 = ""
     0 = "fe80::c0ff:d7ff:fee2:b5ff"
xenserver = ""
  attr = ""
  device = ""
   vbd3 = ""
    768 = ""
    5696 = ""
   vif = ""
    0 = ""
     static-ip-setting = ""
      mac = "c2:ff:d7:e2:b5:ff"
      error-code = "0"
      error-msg = ""
      enabled = "0"
      enabled6 = "0"
    1 = ""
     static-ip-setting = ""
      mac = "9e:30:52:f1:87:11"
      error-code = "0"
      error-msg = ""
      enabled = "0"
      enabled6 = "0"
    2 = ""
     static-ip-setting = ""
      mac = "ea:33:9c:5e:c2:1c"
      error-code = "0"
      error-msg = ""
      enabled = "0"
      enabled6 = "0"

And secondly - I have multiple interfaces in VM, renamed by VLANs their 
are connected to. Some of them have multiple IPv4 addresses. Some also 
have IPv6 address(es). Bummer, I don't see any of this in pool 
management. And I wouldn't even without interface renames, because we 
report only one IPv4 address. First problem may be solved with some 
creative work with /etc/rc.conf, for example using result of following 
command in adition to simple ifconfig | grep xn

sysrc -a | grep -E "ifconfig_xn[[:digit:]]_name"
ifconfig_xn0_name: vlan1000
ifconfig_xn1_name: vlan1001
ifconfig_xn2_name: vlan2000

or list all ethernet interfaces (ifconfig -l ether) and look for 
ifconfig_xnX_name line for each not(xn). But regarding other missing 
info/nodes, I just don't know. May someone please enlighten me what is 
missing on our side?

uname -a
FreeBSD hostname 13.1-RELEASE FreeBSD 13.1-RELEASE 
releng/13.1-n250148-fc952ac2212 GENERIC amd64

pkg info xe\*
xe-guest-utilities-6.2.0_3
xen-guest-tools-4.14.0



-- 
Best regards

Ondra Knezour


[-- Attachment #2 --]
0	*H
010
	`He0	*H
000
	*H

0e10	UCZ10UaNTRCZ-4711498310U
Česká pošta, s.p.10UPostSignum Root QCA 40
180927073923Z
330927073923Z0i10	UCZ10UaNTRCZ-4711498310U
Česká pošta, s.p.1"0 UPostSignum Qualified CA 40"0
	*H
0
rm2v<b	MR.`sE4JWN7$>]x
i䃊O`R:4u¦[DcaH(0h,r;\xֽ*UFWnV'CԬ۩`R-%#v../|۴[/^̇3jEEק.5_QDFk7;X:I[/&zؐjhN=HFAri
8hqiIŧl[NIFFb60&6S1oY߶?
$:.f.fZ:/U$w -JrqEGH/Do䃁_Tˏ
?Cr&P/fM'^H*._w\df^)iy,Zp1Tw Ԓ|2ɸ{D;r!)pu܎`?#u?Rd>Dd0`0U 00U 00+0Tento certifikat pro elektronickou pecet byl vydan v souladu s narizenim EU c. 910/2014.This is a certificate for electronic seal according to Regulation (EU) No 910/2014.0U00z+n0l07+0+http://crt.postsignum.cz/crt/psrootqca4.crt01+0%http://ocsp.postsignum.cz/OCSP/RQCA4/0U0U#06ipQ5O?P~&)
0U001/-+http://crl.postsignum.cz/crl/psrootqca4.crl020.,http://crl2.postsignum.cz/crl/psrootqca4.crl01/-+http://crl.postsignum.eu/crl/psrootqca4.crl0U(|>68P=!`\ax0
	*H

,bt8+qj:0`C s+Jrg
'i=_'1t0dݮ7X<0.׷O2%(4[ث"lQ!Rll|M>LIkEߒ*T,?xe-M&4M~~hhϸaemYgzP4leZ-}{$CVh
Be!G|6Eyz_<O51oy g3E^9j2ocƭòV=Q}E,rdʷWHwFx%0{#ƌ)ۥlf= N0dF|oںY
05#8eוt4{?L6lFSeSVrO_AXcD8,,"gJq浵UtH(on)%O$QJִL6%9"Qm
8y>'*dx켧7`GWc>=HKq jn#uwZ40M05V0
	*H
0i10	UCZ10UaNTRCZ-4711498310U
Česká pošta, s.p.1"0 UPostSignum Qualified CA 40
210831020041Z
220920020041Z010	UCZ10UaNTRCZ-6888548210U
Ondřej Kněžour1
0U110UOndřej Kněžour10U	Kněžour10U*Ondřej10
UP182360"0
	*H
0
Q	Q1m͠(
 Vwh%#37L߅y,)b\YttT@,2zs{{=f%'O`̴ZufzJiB̩DST7*']
{.S\2kW?cPd 8eWofwjպ	QBGv^2TK%'{v܂+kX6>2h
hv
r!IǢR6q8%~wa00?U806knezour@weboutsourcing.cz	+
11289118610	U00,U #00	gH00+0Tento kvalifikovany certifikat pro elektronicky podpis byl vydan v souladu s narizenim EU c. 910/2014.This is a qualified certificate for electronic signature according to Regulation (EU) No 910/2014.0$+http://www.postsignum.cz0	@0+00F0jF0`0.(https://www.postsignum.cz/pds/pds_en.pdfen0.(https://www.postsignum.cz/pds/pds_cs.pdfcs0F0	F0}+q0o0;+0/http://crt.postsignum.cz/crt/psqualifiedca4.crt00+0$http://ocsp.postsignum.cz/OCSP/QCA4/0U0U%0+
+7
0U#0(|>68P=!`\ax0U00531/http://crl.postsignum.cz/crl/psqualifiedca4.crl06420http://crl2.postsignum.cz/crl/psqualifiedca4.crl0531/http://crl.postsignum.eu/crl/psqualifiedca4.crl0U˛AN8s0/,-6zo7p?%0
	*H
pmN'߀>]PٺpםƮ@JVow_qdʑ5e'G<C}x5nKuتXqR|gNn5uÚHt2+gBޒYCɯcc}@eNVQ3dҝغ34091e qwT
%`˅ݧJ"-;cyQ9{'Z5Pϸ8(5uex-$7
/Mr'MzB@	 vѱn8C)XL8B+\9=f_imWb󋸊5BRdدx@\{%$IWvߪUɽ	}TWh7jza6lHןowp:Uapk1Y?qƳޭ7h/=2}Y]QK)TD#rf7*10{0q0i10	UCZ10UaNTRCZ-4711498310U
Česká pošta, s.p.1"0 UPostSignum Qualified CA 4V0
	`He0	*H
	1	*H
0	*H
	1
220805134356Z0/	*H
	1" rRj`\xēQg Y"0l	*H
	1_0]0	`He*0	`He0
*H
0*H
0
*H
@0+0
*H
(0	+71s0q0i10	UCZ10UaNTRCZ-4711498310U
Česká pošta, s.p.1"0 UPostSignum Qualified CA 4V0*H
	1sq0i10	UCZ10UaNTRCZ-4711498310U
Česká pošta, s.p.1"0 UPostSignum Qualified CA 4V0
	*H
0Y|qIԖJgCۉ"Xi'I#R[JF\*+N|lPD&&O|TND03Gl4p;CnM^֪mdB,Hmf'_j+!Ut#6)|K^rf]r+ǣE6OWʞgfJX|QHzO=mL|=߱i^QpHj~_dV

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eac38924-3e62-ae7e-ebb1-882cc629aa20>