From nobody Wed May 14 11:28:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523288764498950.6271686136292; Mon, 9 Apr 2018 08:46:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A3B9860B9; Mon, 9 Apr 2018 15:46:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 715A218399; Mon, 9 Apr 2018 15:46:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 336144CAA1; Mon, 9 Apr 2018 15:46:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w39Fjs21032372 for ; Mon, 9 Apr 2018 11:45:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 89F312026990; Mon, 9 Apr 2018 15:45:54 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 893D62024CA7; Mon, 9 Apr 2018 15:45:53 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 9 Apr 2018 16:45:44 +0100 Message-Id: <20180409154551.22604-2-berrange@redhat.com> In-Reply-To: <20180409154551.22604-1-berrange@redhat.com> References: <20180409154551.22604-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/8] xen: encourage use of xen:///system URI as preferred format X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 09 Apr 2018 15:46:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Historically we have used a bare xen:/// URI for connecting to the legacy Xen driver. The new libxl Xen driver follows the new practice of allowing '/system' as a path, as well as bare '/' for compat with the old Xen driver. This documents xen:///system as the preferred format for Xen, leaving xen:/// as an undocumented feature just for back-compat. Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/drvxen.html.in | 14 +++++++------- docs/remote.html.in | 6 +++--- docs/uri.html.in | 16 ++++++++-------- src/libvirt.c | 8 ++++---- src/libxl/libxl_driver.c | 4 ++-- tools/libvirt-guests.sysconf | 2 +- tools/virsh.pod | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/drvxen.html.in b/docs/drvxen.html.in index b8d190c942..2e45e09527 100644 --- a/docs/drvxen.html.in +++ b/docs/drvxen.html.in @@ -43,11 +43,11 @@

=20
-xen:///                        (local access, direct)
-xen+unix:///                   (local access, via daemon)
-xen://example.com/             (remote access, TLS/x509)
-xen+tcp://example.com/         (remote access, SASl/Kerberos)
-xen+ssh://root@example.com/    (remote access, SSH tunnelled)
+xen:///system                     (local access, direct)
+xen+unix:///system                (local access, via daemon)
+xen://example.com/system          (remote access, TLS/x509)
+xen+tcp://example.com/system      (remote access, SASl/Kerberos)
+xen+ssh://root@example.com/system (remote access, SSH tunnelled)
 
=20

Import and export of libvirt domain XML configs=

@@ -76,7 +76,7 @@ xen+ssh://root@example.com/ (remote access, SSH tunnel= led) which can then be used by libvirt.

=20 -
$ virsh -c xen:/// domxml-from-native xen-xm rhel5.cfg
+    
$ virsh -c xen:///system domxml-from-native xen-xm rhel5.cfg
 <domain type=3D'xen'>
   <name>rhel5pv</name>
   <uuid>8f07fe28-753f-2729-d76d-bdbd892f949a</uuid>
@@ -122,7 +122,7 @@ xen+ssh://root@example.com/    (remote access, SSH tunn=
elled)
       format.
     

=20 -
$ virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml
+    
$ virsh -c xen:///system domxml-to-native xen-xm rhel5pv.xml
 name =3D "rhel5pv"
 uuid =3D "8f07fe28-753f-2729-d76d-bdbd892f949a"
 maxmem =3D 2500
diff --git a/docs/remote.html.in b/docs/remote.html.in
index 8c22778f53..de09975039 100644
--- a/docs/remote.html.in
+++ b/docs/remote.html.in
@@ -130,14 +130,14 @@ to distinguish this from a local URI.
 Some examples:
 

    -
  • xen+ssh://rjones@towada/
    — Connect to a +
  • xen+ssh://rjones@towada/system
    — Connec= t to a remote Xen hypervisor on host towada using ssh transport and = ssh username rjones.
  • -
  • xen://towada/
    — Connect to a +
  • xen://towada/system
    — Connect to a remote Xen hypervisor on host towada using TLS.
  • -
  • xen://towada/?no_verify=3D1
    — Connect t= o a +
  • xen://towada/system?no_verify=3D1
    — Con= nect to a remote Xen hypervisor on host towada using TLS. Do not verify the server's certificate.
  • diff --git a/docs/uri.html.in b/docs/uri.html.in index 5df73613ae..6da9eb9746 100644 --- a/docs/uri.html.in +++ b/docs/uri.html.in @@ -107,7 +107,7 @@ In virt-install use the --connect=3DURI= option: virt-install --connect=3Dtest:///default [other options]

- xen:/// URI + xen:///system URI

This section describes a feature which is new in libvirt > @@ -115,7 +115,7 @@ virt-install --connect=3Dtest:///default [oth= er options]

To access a Xen hypervisor running on the local machine -use the URI xen:///. +use the URI xen:///system.

qemu:///... QEMU and KVM URIs @@ -167,10 +167,10 @@ a NULL URI for a local connection. For example: - xen:/// + xen:///system - xen://oirase/ + xen://oirase/system Connect to the Xen hypervisor running on host oirase using TLS. @@ -187,10 +187,10 @@ a NULL URI for a local connection. For example: - xen:/// + xen:///system - xen+ssh://oirase/ + xen+ssh://oirase/system Connect to the Xen hypervisor running on host oirase by going over an ssh connection. @@ -251,7 +251,7 @@ In any case applications linked to libvirt can continue= to pass user to override the URI, either by constructing one or by allowing the user to type a URI in directly (if that is appropriate). If your application wishes to connect specifically to a Xen hypervisor, then -for future proofing it should choose a full xen= :/// URI. +for future proofing it should choose a full xen= :///system URI.

Legacy: "xen" @@ -259,7 +259,7 @@ for future proofing it should choose a full xen:/// Another legacy URI is to specify name as the string "xen". This will continue to refer to the Xen -hypervisor. However you should prefer a full x= en:/// URI in all future code. +hypervisor. However you should prefer a full x= en:///system URI in all future code.

diff --git a/src/libvirt.c b/src/libvirt.c index b7bcf80224..51acbbf83e 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -954,15 +954,15 @@ virConnectOpenInternal(const char *name, goto failed; } =20 - /* Convert xen -> xen:/// for back compat */ + /* Convert xen -> xen:///system for back compat */ if (name && STRCASEEQ(name, "xen")) - name =3D "xen:///"; + name =3D "xen:///system"; =20 - /* Convert xen:// -> xen:/// because xmlParseURI cannot parse the + /* Convert xen:// -> xen:///system because xmlParseURI cannot parse the * former. This allows URIs such as xen://localhost to work. */ if (name && STREQ(name, "xen://")) - name =3D "xen:///"; + name =3D "xen:///system"; =20 /* * If no URI is passed, then check for an environment string if not diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index de70abaaae..c559bf6514 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -839,7 +839,7 @@ libxlConnectOpen(virConnectPtr conn, if (libxl_driver =3D=3D NULL) return VIR_DRV_OPEN_DECLINED; =20 - if (!(conn->uri =3D virURIParse("xen:///"))) + if (!(conn->uri =3D virURIParse("xen:///system"))) return VIR_DRV_OPEN_ERROR; } else { /* Only xen scheme */ @@ -863,7 +863,7 @@ libxlConnectOpen(virConnectPtr conn, STRNEQ(conn->uri->path, "/") && STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected Xen URI path '%s', try xen:///"), + _("unexpected Xen URI path '%s', try xen:///sys= tem"), NULLSTR(conn->uri->path)); return VIR_DRV_OPEN_ERROR; } diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf index 08204ca039..4e11464d2d 100644 --- a/tools/libvirt-guests.sysconf +++ b/tools/libvirt-guests.sysconf @@ -1,5 +1,5 @@ # URIs to check for running guests -# example: URIS=3D'default xen:/// vbox+tcp://host/system lxc:///' +# example: URIS=3D'default xen:///system vbox+tcp://host/system lxc:///' #URIS=3Ddefault =20 # action taken on host boot diff --git a/tools/virsh.pod b/tools/virsh.pod index 9d69a75244..4d25ac5d9b 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -254,7 +254,7 @@ common are: =20 =3Dover 4 =20 -=3Ditem xen:/// +=3Ditem xen:///system =20 this is used to connect to the local Xen hypervisor =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list