From nobody Fri Aug 05 13:43:55 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 4Lzmz91ggLz4Y10r for ; Fri, 5 Aug 2022 13:44:05 +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 4Lzmz767mnz3LZq for ; Fri, 5 Aug 2022 13:44:03 +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 E3F30E513 for ; Fri, 5 Aug 2022 15:43:55 +0200 (CEST) Message-ID: Date: Fri, 5 Aug 2022 15:43:55 +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.11.0 Content-Language: en-US To: freebsd-xen@freebsd.org From: Ondra Knezour Subject: Better network reporting from FreeBSD VM via xenstore Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms090704070902000106000004" X-Rspamd-Queue-Id: 4Lzmz767mnz3LZq 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)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[weboutsourcing.cz]; ASN(0.00)[asn:35236, ipnet:109.205.72.0/21, country:CZ]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-xen@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ATTACHMENT(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-xen@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N This is a cryptographically signed message in MIME format. --------------ms090704070902000106000004 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------ms090704070902000106000004 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: Elektronicky podpis S/MIME MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC EAUwggewMII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