From owner-freebsd-virtualization@freebsd.org Tue Jul 14 07:53:22 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AD163598C8 for ; Tue, 14 Jul 2020 07:53:22 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.netfence.it (net-2-44-121-52.cust.vodafonedsl.it [2.44.121.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailserver.netfence.it", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5XnX2w4gz4Lt1; Tue, 14 Jul 2020 07:53:19 +0000 (UTC) (envelope-from ml@netfence.it) Received: from guardian.ventu (net-2-37-176-5.cust.vodafonedsl.it [2.37.176.5]) (authenticated bits=0) by soth.netfence.it (8.15.2/8.15.2) with ESMTPSA id 06E7r8Mr068191 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 14 Jul 2020 09:53:09 +0200 (CEST) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.netfence.it: Host net-2-37-176-5.cust.vodafonedsl.it [2.37.176.5] claimed to be guardian.ventu Subject: Re: bhyve, Windows guest and trim support To: freebsd-virtualization@freebsd.org References: <4e0c7427-8bb4-37d6-b717-181d5c9b66d3@freebsd.org> <20200707154025.wm6u4abbrz5tesha@nexus.home.palmen-it.de> <75f28176-c22a-8742-e86c-d73609cd5463@netfence.it> <20200712131347.cjvr4cpbo3rsgnik@nexus.home.palmen-it.de> From: Andrea Venturoli Message-ID: <2cd7021a-daac-dad8-9fa3-27dc9fc38181@netfence.it> Date: Tue, 14 Jul 2020 09:53:08 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200712131347.cjvr4cpbo3rsgnik@nexus.home.palmen-it.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.83 X-Rspamd-Queue-Id: 4B5XnX2w4gz4Lt1 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=netfence.it; spf=pass (mx1.freebsd.org: domain of ml@netfence.it designates 2.44.121.52 as permitted sender) smtp.mailfrom=ml@netfence.it X-Spamd-Result: default: False [-3.61 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:2.44.121.52]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.986]; NEURAL_HAM_MEDIUM(-1.06)[-1.057]; NEURAL_HAM_SHORT(-0.77)[-0.771]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[netfence.it,none]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:30722, ipnet:2.44.0.0/16, country:IT]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 07:53:22 -0000 On 2020-07-12 15:13, Felix Palmen wrote: > * Andrea Venturoli [20200707 18:18]: >> I have yet to try this, but, as I said, I switched temporaly to ahci-hd and >> used the instructions at the following link to reclaim space (without the >> need to start a new zvol): >> >> https://winaero.com/blog/trim-ssd-windows-10/ > > Thanks for this hint, I can now confirm this also works with virtio-blk > (applied Allan's patch to 12.1). REFER for the zvol backing my Windows > Server 2016 dropped from 315G to 72.5G. Hmm... I applied the same patch and, still using virtio-blk, when trying to retrim, Windows says "Optimize-Volume : The volume optimization operation requested is not supported by the hardware backing the volume." Seems like the guest doesn't think TRIM support is available. Do I have to set anything? I have the following in the machine config (I'm using vm-bhyve): disk0_type="virtio-blk" disk0_name="disk0" disk0_dev="zvol" disk0_opts="sectorsize=512" bye & Thanks av.