From nobody Tue May 7 15:45:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579076859; cv=none; d=zohomail.com; s=zohoarc; b=Jr4TTWuWdfQ95vMrTYUHR2z/rP/ec+cEY+9M8oR5iK7TcQOuLcGIm1kn+kQOBwRGz5l5HHvFlXp62TjDdWRTYWDQaay0RnwPckxErdUL0ygHc30g6Jk/uCJLCvLX5jJrxqbSFivjRhtXjwgTswRPK5fu73g01fisyalsbKLNZ8M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579076859; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eYfUbQ6Llh8r6AyoC14yQZH4YbUoFqwX5Bgrx82RXi8=; b=IA/oCHYRxF9KfiyGP9mjJg5tpc5HQph6/ZOvYN01PQ4tSSSUGQTp+2CBy/6rktu7OcBjcmRzfOCa32AS1iyvTJ9qsr652qFiBMgCS1195hwilf2tUGsMvYxgmmCvAQI7XfhBoMeON3bJMMefoikvato++qpqjVJ/VOX1RWYyWx8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1579076859377273.37712601622195; Wed, 15 Jan 2020 00:27:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-175-9e_c4ZyqOJqEVxUap70YpA-1; Wed, 15 Jan 2020 03:27:37 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7C35A107ACC5; Wed, 15 Jan 2020 08:27:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 261BD19C70; Wed, 15 Jan 2020 08:27:31 +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 2FAD518095FF; Wed, 15 Jan 2020 08:27:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00F8RTSW016790 for ; Wed, 15 Jan 2020 03:27:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 754E35C219; Wed, 15 Jan 2020 08:27:29 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-12-195.pek2.redhat.com [10.72.12.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2691D5C1D6; Wed, 15 Jan 2020 08:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579076858; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eYfUbQ6Llh8r6AyoC14yQZH4YbUoFqwX5Bgrx82RXi8=; b=iVP6Y+qwE/Pk8PpApjWH+2oFTqPAHj/g/PS+BlZjlC501JWBdJwE8xLLyLxd9G1vUmP5yx 4h/Ak+WyNYFoaki4cRAlWT74eeQaiUiMgEf9boJzPqEEITXj4qFgNVewODjopn31SX76Oj 73FXWvdHF/jvfLWQMpG0XI79qdXBd8U= From: Han Han To: libvir-list@redhat.com Date: Wed, 15 Jan 2020 16:24:55 +0800 Message-Id: <20200115082458.4926-2-hhan@redhat.com> In-Reply-To: <20200115082458.4926-1-hhan@redhat.com> References: <20200115082458.4926-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Han Han , devel@ovirt.org Subject: [libvirt] [PATCH 1/4] virsh.rst: Mention media update is not supported in attach-{disk, device} 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 9e_c4ZyqOJqEVxUap70YpA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Han Han --- docs/manpages/virsh.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index c637caa583..92f113fbde 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -4391,9 +4391,7 @@ as the top-level element. See the documentation at libvirt XML format for a device. If *--config* is specified the command alters the persistent domain configuration with the device attach taking effect the next time libvirt starts the domain. -For cdrom and floppy devices, this command only replaces the media -within an existing device; consider using ``update-device`` for this -usage. For passthrough host devices, see also ``nodedev-detach``, +For passthrough host devices, see also ``nodedev-detach``, needed if the PCI device does not use managed mode. =20 If *--live* is specified, affect a running domain. @@ -4408,7 +4406,8 @@ an offline domain, and like *--live* *--config* for a= running domain. =20 ``Note``: using of partial device definition XML files may lead to unexpec= ted results as some fields may be autogenerated and thus match devices other t= han -expected. +expected. It doesn't support replace the media within the existing virtual +cdrom or floppy device. Use ``update-device`` or ``change-media`` instead. =20 =20 attach-disk @@ -4442,9 +4441,7 @@ of the disk source, such as *raw* or *qcow2*. Hyperv= isor default will be used if *subdriver* is not specified. However, the default may not be correct, esp. for QEMU as for security reasons it is configured not to det= ect disk formats. *type* can indicate *lun*, *cdrom* or *floppy* as -alternative to the disk default, although this use only replaces the media -within the existing virtual cdrom or floppy device; consider using -``update-device`` for this usage instead. +alternative to the disk default. *alias* can set user supplied alias. *mode* can specify the two specific mode *readonly* or *shareable*. *sourcetype* can indicate the type of source (block|file) @@ -4476,6 +4473,9 @@ For compatibility purposes, *--persistent* behaves li= ke *--config* for an offline domain, and like *--live* *--config* for a running domain. Likewise, *--shareable* is an alias for *--mode shareable*. =20 +``Note``: It doesn't support replace the media within the existing virtual +cdrom or floppy device. Use ``update-device`` or ``change-media`` instead. + =20 attach-interface ---------------- --=20 2.24.0.rc1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 15:45:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579076870; cv=none; d=zohomail.com; s=zohoarc; b=gcb/j7YkAue5TXDaXbDVTcpWWdK5eXFkkNGvx73UzTGcnspETkV7K0JEhLP57OMwNRLa/b+x2kN0HQwBgkYfDV4uf4FxGxmFHr2sxssLzzXqVpgoqLfn34CVayry/NWVpbxiWeThK7ohbC97AHSrCohRBnvcWNFiMN9mRaFiRhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579076870; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LUnOgZkg5GGTTYPhWMMY8OYz3u8TqOj543kYj2ucoYE=; b=C/BRU5bj2BOj6i2aNkTejOYuxlMVHNVj14MppO9iOlf5umdihhthJSWqvu9EnDWipCkMZtMSGOYwWgC4YMOkOspmTtMxdDy7jSzmNmYaZROeM+Zq3Qzbth5gGS4xIvS5qCKODAorlWuH73Mxeg1VGBtX7sisAz1q04XnxkWKLpU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1579076870292161.8328599991686; Wed, 15 Jan 2020 00:27:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-5GtzTCEhMEGGGzOP5R_UdA-1; Wed, 15 Jan 2020 03:27:47 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E186A107ACCA; Wed, 15 Jan 2020 08:27:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7FEE842BE; Wed, 15 Jan 2020 08:27:41 +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 7A38018089D5; Wed, 15 Jan 2020 08:27:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00F8RWCv016801 for ; Wed, 15 Jan 2020 03:27:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1D3B65C3F8; Wed, 15 Jan 2020 08:27:32 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-12-195.pek2.redhat.com [10.72.12.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id 275AB5C1D6; Wed, 15 Jan 2020 08:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579076869; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LUnOgZkg5GGTTYPhWMMY8OYz3u8TqOj543kYj2ucoYE=; b=JekvgvH+7B44uZGSFQwe0T3su769YVHL0tFW7WCa7Jdw0ATFl1Du4JIgq8Jkeyk2ZPq6lM Ljz17Co0L4p+85RjpBAdTH0IqBCGcbXEgUtN0CUxJTaGCmUIAMkAtaYo4DBqjQCXc+zu3r pzZCMEW+0e3yeLGKPljTvlwZb2V3ufM= From: Han Han To: libvir-list@redhat.com Date: Wed, 15 Jan 2020 16:24:56 +0800 Message-Id: <20200115082458.4926-3-hhan@redhat.com> In-Reply-To: <20200115082458.4926-1-hhan@redhat.com> References: <20200115082458.4926-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Han Han , devel@ovirt.org Subject: [libvirt] [PATCH 2/4] libvirt: Remove comments of media update in virDomainAttachDeviceFlags 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: , 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-MC-Unique: 5GtzTCEhMEGGGzOP5R_UdA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Han Han --- src/libvirt-domain.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index eb66999f07..a6a246c3a4 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -8208,10 +8208,6 @@ virDomainAttachDevice(virDomainPtr domain, const cha= r *xml) * return failure if LIVE is specified but it only supports modifying the * persisted device allocation. * - * For compatibility, this method can also be used to change the media - * in an existing CDROM/Floppy device, however, applications are - * recommended to use the virDomainUpdateDeviceFlag method instead. - * * Be aware that hotplug changes might not persist across a domain going * into S4 state (also known as hibernation) unless you also modify the * persistent domain definition. --=20 2.24.0.rc1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 15:45:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579076865; cv=none; d=zohomail.com; s=zohoarc; b=A8Srv3vKK6B5joAgexisb0o4PD3PYqKdlsnjN6gPjV/Kaua/pDiwdfa8K0HVAXBshHmo4XvltpfX6KFdn1HcYuvMOpKc5D/LReS25cBJeta2MGOy859MgqzLiRAo5ytdouqmraSNYO/JQmeMMHshRLCyRf1+3B7sa5WHHK+fvZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579076865; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=om6yjO9u8u5TWMQT5kx9yAhanDM4qQ3ZIJ5Sr1EjcIo=; b=bU2m79qCOJmmlKR/D62HB+zpgPTkGWMddFGpPV5JedUIrxWlJT5IrnB8Izhxc/Lz2bQmnW07Xd0u1Ws1qnSY4jMm1FNDIN7dLGLrgVKPZZCRnPtsORvPxb0Tfnh5p24oQsIZE25OijHDFNTOKlKEAN+wamZZ5LwrwOjM/O6qxIw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1579076865470446.2335333209635; Wed, 15 Jan 2020 00:27:45 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-ISIKK8KNMoCbe5c8Y5IIHA-1; Wed, 15 Jan 2020 03:27:42 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 18E49107ACC7; Wed, 15 Jan 2020 08:27:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1DFF100E7E3; Wed, 15 Jan 2020 08:27:36 +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 82CBA18089CE; Wed, 15 Jan 2020 08:27:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00F8RYx7016814 for ; Wed, 15 Jan 2020 03:27:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id D7F0B5C541; Wed, 15 Jan 2020 08:27:34 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-12-195.pek2.redhat.com [10.72.12.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id A86F25C296; Wed, 15 Jan 2020 08:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579076864; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=om6yjO9u8u5TWMQT5kx9yAhanDM4qQ3ZIJ5Sr1EjcIo=; b=i88HFZrH/XvRGJf2r4GhwzkwSRO3RmkL9FO5TldVRfn00g6ZA6L87my/Kwb6nWPCxfp+WP 2Hz/36JFmN7QQIE5k4KqqFZpNRrCge5A2yL86qM3eDEFEGBt5DUllKVVpwWXm+4QtPeVg+ ZsTZrWTRVoh1e5i+QgzPG3DGK8mQzug= From: Han Han To: libvir-list@redhat.com Date: Wed, 15 Jan 2020 16:24:57 +0800 Message-Id: <20200115082458.4926-4-hhan@redhat.com> In-Reply-To: <20200115082458.4926-1-hhan@redhat.com> References: <20200115082458.4926-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Han Han , devel@ovirt.org Subject: [libvirt] [PATCH 3/4] qemu: Drop support of media update in live disk attach API 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: ISIKK8KNMoCbe5c8Y5IIHA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" virDomainUpdateDeviceFlags has been introduced since v0.8.0. There is no reason to use virDomainAttachDevice* API to update media for cdrom or floopy device. https://bugzilla.redhat.com/show_bug.cgi?id=3D1788793 Signed-off-by: Han Han --- src/qemu/qemu_hotplug.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 31d455505b..db8cb0e696 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1076,7 +1076,7 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriverP= tr driver, * @vm: domain object * @dev: device to attach (expected type is DISK) * - * Attach a new disk or in case of cdroms/floppies change the media in the= drive. + * Attach a new disk in the drive. * This function handles all the necessary steps to attach a new storage s= ource * to the VM. */ @@ -1088,17 +1088,13 @@ qemuDomainAttachDeviceDiskLive(virQEMUDriverPtr dri= ver, virDomainDiskDefPtr disk =3D dev->data.disk; virDomainDiskDefPtr orig_disk =3D NULL; =20 - /* this API overloads media change semantics on disk hotplug - * for devices supporting media changes */ if ((disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM || disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_FLOPPY) && (orig_disk =3D virDomainDiskByTarget(vm->def, disk->dst))) { - if (qemuDomainChangeEjectableMedia(driver, vm, orig_disk, - disk->src, false) < 0) + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("cdrom/floppy media update isn't supported. " + "Use virDomainUpdateDeviceFlags instead.")); return -1; - - disk->src =3D NULL; - return 0; } =20 return qemuDomainAttachDeviceDiskLiveInternal(driver, vm, dev); --=20 2.24.0.rc1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 15:45:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579076874; cv=none; d=zohomail.com; s=zohoarc; b=mYL4qfydhkBLxyJGx44WlHXdmRh5JofCMNzTFYeCyqd4dlWqBHKq924BBje2HJHfQ1Kwq2Iomt5CM0VkM5EfmFN1zb6YIBLA/F1Vz2zoKKnxaOqeHh6tNgc1jhXR2LUVdg1onWDWFoti1zqzkpK2ACZ7/Ias/7SMRlBFU7vPp98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579076874; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O72duUmPPdPZx5xSjwU1SxwVxngmaZO36bWckGc/TLY=; b=QRG67NWaSq2fNqThli6SWDm/9ZjNyhYUBW3auNEgTkG1qbBhiel6xq9BnxXGXwNBOgxarsbGs+gVpPzTljQoiRvbibJU1YdlVn5KgYEa/xhlwQZZSDaKiDMknylh4UGTi3vF4R/qforipNIgGc5TLYivgyjM8AFrBua4wR+FdiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1579076874128565.497507926557; Wed, 15 Jan 2020 00:27:54 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-ex8CkdA1N1Ka3S6WApk46g-1; Wed, 15 Jan 2020 03:27:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48273185432F; Wed, 15 Jan 2020 08:27:45 +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 22CC519C70; Wed, 15 Jan 2020 08:27:45 +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 D8E648250D; Wed, 15 Jan 2020 08:27:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00F8Rb0O016826 for ; Wed, 15 Jan 2020 03:27:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 876F45C541; Wed, 15 Jan 2020 08:27:37 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-12-195.pek2.redhat.com [10.72.12.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FF625C1D6; Wed, 15 Jan 2020 08:27:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579076873; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=O72duUmPPdPZx5xSjwU1SxwVxngmaZO36bWckGc/TLY=; b=U1YtV9c0LOH5mqd30SA30dXpT1xrEin404QaaUp5Dg6Xtgnp3QUUVUgYNgQG0ligHLzo0o uQsed+j44L5O/7X5hnc+90pgN4QIRDQEnzJaAcvODk/GodqIQjJYfZnQMmQAliogtF2MfO cMSOLd/1xsEQGuC1ZJsnuOF2Bzuaf0E= From: Han Han To: libvir-list@redhat.com Date: Wed, 15 Jan 2020 16:24:58 +0800 Message-Id: <20200115082458.4926-5-hhan@redhat.com> In-Reply-To: <20200115082458.4926-1-hhan@redhat.com> References: <20200115082458.4926-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Han Han , devel@ovirt.org Subject: [libvirt] [PATCH 4/4] libxl: Drop cdrom media update support in live disk attch APIs 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: ex8CkdA1N1Ka3S6WApk46g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Han Han --- src/libxl/libxl_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index f021ec9c5d..b481e950da 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -3030,8 +3030,10 @@ libxlDomainAttachDeviceDiskLive(virDomainObjPtr vm, = virDomainDeviceDefPtr dev) =20 switch (l_disk->device) { case VIR_DOMAIN_DISK_DEVICE_CDROM: - ret =3D libxlDomainChangeEjectableMedia(vm, l_disk); - break; + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, + "%s", _("cdrom update is not supported in this = API. " + "Use virDomainUpdateDeviceFlags instead.")); + goto cleanup; case VIR_DOMAIN_DISK_DEVICE_DISK: if (l_disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_XEN) { if (virDomainDiskIndexByName(vm->def, l_disk->dst, true) >= =3D 0) { --=20 2.24.0.rc1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list