From nobody Mon Aug 08 12:56:29 2022 X-Original-To: freebsd-xen@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M1bn310Wsz4XtMG for ; Mon, 8 Aug 2022 12:56:39 +0000 (UTC) (envelope-from knezour@weboutsourcing.cz) Received: from mx.weboutsourcing.cz (mx.weboutsourcing.cz [109.205.73.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4M1bn15rJyz3mgq; Mon, 8 Aug 2022 12:56:37 +0000 (UTC) (envelope-from knezour@weboutsourcing.cz) Received: from [172.23.200.66] (unknown [84.246.160.126]) by mx.weboutsourcing.cz (Postfix) with ESMTPSA id D139B112A3; Mon, 8 Aug 2022 14:56:29 +0200 (CEST) Message-ID: <8f0643c5-22b3-c1cf-a7f2-86cada663bc9@weboutsourcing.cz> Date: Mon, 8 Aug 2022 14:56:29 +0200 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-xen List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-xen@freebsd.org X-BeenThere: freebsd-xen@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: Better network reporting from FreeBSD VM via xenstore Content-Language: en-US To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: freebsd-xen@freebsd.org, dinoex@FreeBSD.org References: From: Ondra Knezour In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms000004050702060507060904" X-Rspamd-Queue-Id: 4M1bn15rJyz3mgq X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of knezour@weboutsourcing.cz designates 109.205.73.92 as permitted sender) smtp.mailfrom=knezour@weboutsourcing.cz X-Spamd-Result: default: False [-5.40 / 15.00]; SIGNED_SMIME(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[freebsd-xen@freebsd.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:35236, ipnet:109.205.72.0/21, country:CZ]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[weboutsourcing.cz]; HAS_ATTACHMENT(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N This is a cryptographically signed message in MIME format. --------------ms000004050702060507060904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dne 08.08.2022 v 14:30 Roger Pau Monné napsal(a): > On Fri, Aug 05, 2022 at 03:43:55PM +0200, Ondra Knezour wrote: >> 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 > I think this is all specific to XenServer (a.k.a. Citrix Hypervisor) > and XCP (as being part of the xe-guest-utilities package), but not > used by upstream Xen toolstack (xl), and no one cared to add the used > paths to the upstream documents. > >> We have >> >> [ snip } >> But on Linux >> [ snip ] >> >> You seem to use different commands on FreeBSD and Linux to get the >> entries (`xenstore ls attr` vs `xenstore ls | grep attr -A 50`), so >> it's not really a fair comparison I would say. Only for brevity. There are all entries form FreeBSD guest and only couple relevant from Linux guest, so even if not fair, still favourable for "us" :) >> 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? > I've added dinoex as he is the maintainer of the xe-guest-utilities > package, maybe he has some ideas about how this can be solved. > > You might also want to raise a ticket with the XCP-ng guys [0] about > this, they usually care about OSes not officially supported by > XenServer. > > Thanks, Roger. > > [0] https://github.com/xcp-ng/xcp/issues I just started experimenting and it seems like I am lucky. xenstore-write attr/vif/1/ipv4/0 '11.10.10.10' xenstore-write attr/vif/0/ipv4/1 '22.10.10.10' Only one ovious difference between this and Linux output from previous message is indexing from 0, but after this write I can see both address in both XCP-ng Center and Xen Orchestra. So my question changes to are we willing to add support for multiple IPv4 addresses, IPv6 addresses and renamed interfaces to xe-guest-utilities? dinoex@? :) -- Best regards Ondra Knezour --------------ms000004050702060507060904 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: Elektronicky podpis S/MIME MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhki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