<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qingliezhiquan.com/index.php?action=history&amp;feed=atom&amp;title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6</id>
	<title>ChatGPT 有多强：用 ChatGPT 使 qcow2 容量与实际相符 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qingliezhiquan.com/index.php?action=history&amp;feed=atom&amp;title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6"/>
	<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;action=history"/>
	<updated>2026-07-11T02:39:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;diff=8346&amp;oldid=prev</id>
		<title>Mwroot at 09:21, 29 September 2025</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;diff=8346&amp;oldid=prev"/>
		<updated>2025-09-29T09:21:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:21, 29 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example, you can use SDelete to zero out free space on the C: drive:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example, you can use SDelete to zero out free space on the C: drive:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;powershell&quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;line&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;powershell&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;sdelete -z C:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;sdelete -z C:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key selfmoney_wiki:diff:1.41:old-8345:rev-8346:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
	<entry>
		<id>https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;diff=8345&amp;oldid=prev</id>
		<title>Mwroot at 09:20, 29 September 2025</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;diff=8345&amp;oldid=prev"/>
		<updated>2025-09-29T09:20:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:20, 29 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l22&quot;&gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt;3. Resize the Virtual Disk&amp;lt;/b&amp;gt;: Use the &amp;lt;code&amp;gt;qemu-img&amp;lt;/code&amp;gt; command to resize the qcow2 image file. The following command resizes the image to 50GB (which matches the size of the C:\ disk in your guest):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt;3. Resize the Virtual Disk&amp;lt;/b&amp;gt;: Use the &amp;lt;code&amp;gt;qemu-img&amp;lt;/code&amp;gt; command to resize the qcow2 image file. The following command resizes the image to 50GB (which matches the size of the C:\ disk in your guest):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;bash&quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;line&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;bash&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;qemu-img resize /home/user/Documents/win10.qcow2 50G&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;qemu-img resize /home/user/Documents/win10.qcow2 50G&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt;4. Run a Compaction Operation&amp;lt;/b&amp;gt;: You need to perform a compaction operation to reclaim the unused space. Use the `qemu-img` command with the `convert` subcommand and the &amp;lt;code&amp;gt;--shrink&amp;lt;/code&amp;gt; option:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt;4. Run a Compaction Operation&amp;lt;/b&amp;gt;: You need to perform a compaction operation to reclaim the unused space. Use the `qemu-img` command with the `convert` subcommand and the &amp;lt;code&amp;gt;--shrink&amp;lt;/code&amp;gt; option:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;bash&quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;line&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;bash&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;qemu-img convert -O qcow2 /home/user/Documents/win10.qcow2 /home/user/Documents/win10_compacted.qcow2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;qemu-img convert -O qcow2 /home/user/Documents/win10.qcow2 /home/user/Documents/win10_compacted.qcow2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt;5. Replace the Original Disk Image&amp;lt;/b&amp;gt;: After the compaction is complete, you can replace the original disk image with the compacted version. Be sure to back up the original image first if you haven&amp;#039;t already:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt;5. Replace the Original Disk Image&amp;lt;/b&amp;gt;: After the compaction is complete, you can replace the original disk image with the compacted version. Be sure to back up the original image first if you haven&amp;#039;t already:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;bash&quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;line&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;bash&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mv /home/user/Documents/win10_compacted.qcow2 /home/user/Documents/win10.qcow2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mv /home/user/Documents/win10_compacted.qcow2 /home/user/Documents/win10.qcow2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key selfmoney_wiki:diff:1.41:old-8196:rev-8345:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
	<entry>
		<id>https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;diff=8196&amp;oldid=prev</id>
		<title>Mwroot: Created page with &quot;不同类型的Guest机有不同解决方式，基本思路就是用0填充未使用的客户机磁盘空间，然后用qemu-img转换磁盘镜像文件，转换后的磁盘镜像文件将只包含所有已使用的磁盘空间。致谢 [http://bbs.chinaunix.net/thread-3728461-1-1.html 这篇博客]  {| class=&quot;wikitable&quot; |我 | Hi, I have a KVM Windows 10 guest, its C:\ disk is just 50G, but the host /home/user/Documents/win10.qcow2 is 93G. How to let the 93G smaller as...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/index.php?title=ChatGPT_%E6%9C%89%E5%A4%9A%E5%BC%BA%EF%BC%9A%E7%94%A8_ChatGPT_%E4%BD%BF_qcow2_%E5%AE%B9%E9%87%8F%E4%B8%8E%E5%AE%9E%E9%99%85%E7%9B%B8%E7%AC%A6&amp;diff=8196&amp;oldid=prev"/>
		<updated>2025-09-29T03:36:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;不同类型的Guest机有不同解决方式，基本思路就是用0填充未使用的客户机磁盘空间，然后用qemu-img转换磁盘镜像文件，转换后的磁盘镜像文件将只包含所有已使用的磁盘空间。致谢 [http://bbs.chinaunix.net/thread-3728461-1-1.html 这篇博客]  {| class=&amp;quot;wikitable&amp;quot; |我 | Hi, I have a KVM Windows 10 guest, its C:\ disk is just 50G, but the host /home/user/Documents/win10.qcow2 is 93G. How to let the 93G smaller as...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;不同类型的Guest机有不同解决方式，基本思路就是用0填充未使用的客户机磁盘空间，然后用qemu-img转换磁盘镜像文件，转换后的磁盘镜像文件将只包含所有已使用的磁盘空间。致谢 [http://bbs.chinaunix.net/thread-3728461-1-1.html 这篇博客]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|我&lt;br /&gt;
|&lt;br /&gt;
Hi, I have a KVM Windows 10 guest, its C:\ disk is just 50G, but the host /home/user/Documents/win10.qcow2 is 93G. How to let the 93G smaller as actual?&lt;br /&gt;
|-&lt;br /&gt;
|ChatGPT&lt;br /&gt;
|&lt;br /&gt;
You can reduce the size of the qcow2 disk image file used by your KVM Windows 10 guest by following these steps:&lt;br /&gt;
&lt;br /&gt;
Note: Make sure you have a backup of your virtual machine or important data before proceeding, as disk resizing operations can be risky.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1. Zero out Unused Space in the Guest&amp;lt;/b&amp;gt;: In the Windows 10 guest, you need to zero out the unused space to allow the qcow2 image to be compacted. You can use a tool like &amp;quot;SDelete&amp;quot; (a Microsoft Sysinternals tool) or any other method to zero out free space on your Windows drive.&lt;br /&gt;
&lt;br /&gt;
For example, you can use SDelete to zero out free space on the C: drive:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;powershell&amp;quot; line&amp;gt;&lt;br /&gt;
sdelete -z C:&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2. Shut Down the Guest&amp;lt;/b&amp;gt;: Ensure the Windows 10 guest is powered off before proceeding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3. Resize the Virtual Disk&amp;lt;/b&amp;gt;: Use the &amp;lt;code&amp;gt;qemu-img&amp;lt;/code&amp;gt; command to resize the qcow2 image file. The following command resizes the image to 50GB (which matches the size of the C:\ disk in your guest):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
qemu-img resize /home/user/Documents/win10.qcow2 50G&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4. Run a Compaction Operation&amp;lt;/b&amp;gt;: You need to perform a compaction operation to reclaim the unused space. Use the `qemu-img` command with the `convert` subcommand and the &amp;lt;code&amp;gt;--shrink&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
qemu-img convert -O qcow2 /home/user/Documents/win10.qcow2 /home/user/Documents/win10_compacted.qcow2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command creates a compacted copy of your disk image called &amp;lt;code&amp;gt;win10_compacted.qcow2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5. Replace the Original Disk Image&amp;lt;/b&amp;gt;: After the compaction is complete, you can replace the original disk image with the compacted version. Be sure to back up the original image first if you haven&amp;#039;t already:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
mv /home/user/Documents/win10_compacted.qcow2 /home/user/Documents/win10.qcow2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;6. Verify Disk Size&amp;lt;/b&amp;gt;: Start your KVM Windows 10 guest and verify that the disk size matches the new, smaller size.&lt;br /&gt;
&lt;br /&gt;
The above steps should help you reduce the size of the qcow2 disk image file to match the actual space used by the guest&amp;#039;s C:\ drive.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
</feed>