VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-modifymedium.xml@ 96300

Last change on this file since 96300 was 96300, checked in by vboxsync, 2 years ago

doc: comment fixing

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 manpage, user manual, usage: VBoxManage modifymedium
4-->
5<!--
6 Copyright (C) 2006-2020 Oracle Corporation
7
8 This file is part of VirtualBox Open Source Edition (OSE), as
9 available from http://www.virtualbox.org. This file is free software;
10 you can redistribute it and/or modify it under the terms of the GNU
11 General Public License (GPL) as published by the Free Software
12 Foundation, in version 2 as it comes in the "COPYING" file of the
13 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 -->
16<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
17 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
18<!ENTITY % all.entities SYSTEM "all-entities.ent">
19%all.entities;
20]>
21<refentry id="vboxmanage-modifymedium" lang="en">
22 <refentryinfo>
23 <pubdate>$Date: 2022-08-18 17:27:14 +0000 (Thu, 18 Aug 2022) $</pubdate>
24 <title>VBoxManage modifymedium</title>
25 </refentryinfo>
26
27 <refmeta>
28 <refentrytitle>VBoxManage-modifymedium</refentrytitle>
29 <manvolnum>1</manvolnum>
30 </refmeta>
31
32 <refnamediv>
33 <refname>VBoxManage-modifymedium</refname>
34 <refpurpose>change the characteristics of an existing disk image</refpurpose>
35 <refclass>&product-name;</refclass>
36 </refnamediv>
37
38 <refsynopsisdiv>
39 <cmdsynopsis id="synopsis-vboxmanage-modifymedium">
40<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
41 <command>VBoxManage modifymedium</command>
42 <group>
43 <arg choice="plain">disk</arg>
44 <arg choice="plain">dvd</arg>
45 <arg choice="plain">floppy</arg>
46 </group>
47 <group choice="req">
48 <arg choice="plain"><replaceable>uuid</replaceable></arg>
49 <arg choice="plain"><replaceable>filename</replaceable></arg>
50 </group>
51 <arg>--autoreset=on | off</arg>
52 <arg>--compact</arg>
53 <arg>--description=<replaceable>description</replaceable></arg>
54 <arg>--move=<replaceable>pathname</replaceable></arg>
55 <arg>--property=<replaceable>name</replaceable>=[<replaceable>value</replaceable>]</arg>
56 <arg>--resize=<replaceable>megabytes</replaceable> | --resizebyte=<replaceable>bytes</replaceable></arg>
57 <arg>--setlocation=<replaceable>pathname</replaceable></arg>
58 <arg>--type=normal | writethrough | immutable | shareable | readonly | multiattach</arg>
59 </cmdsynopsis>
60 </refsynopsisdiv>
61
62 <refsect1>
63 <title>Description</title>
64 <para>
65 The <command>VBoxManage modifymedium</command> command enables you
66 to change the characteristics of an existing disk image.
67 </para>
68 <note>
69 <para>
70 For compatibility with earlier versions of &product-name;, you
71 can use the <command>modifyvdi</command> and
72 <command>modifyhd</command> commands.
73 </para>
74 </note>
75 <variablelist>
76 <varlistentry>
77 <term>disk | dvd | floppy</term>
78 <listitem><para>
79 Specifies the media type of the image.
80 </para></listitem>
81 </varlistentry>
82 <varlistentry>
83 <term><replaceable>filename</replaceable></term>
84 <listitem><para>
85 Specifies the Universally Unique Identifier (UUID) or path
86 name of the disk image on the host file system. You can
87 specify the UUID only if the medium is registered. Use the
88 <command>VBoxManage list hdds</command> command to list the
89 registered images. You can specfy an absolute or relative
90 path to the medium.
91 </para></listitem>
92 </varlistentry>
93 <varlistentry>
94 <term><option>--autoreset=on | off</option></term>
95 <listitem><para>
96 Specifies whether to automatically reset an immutable hard
97 disk on every virtual machine (VM) startup. This option is
98 only for immutable hard disks and the default value is
99 <literal>on</literal>. See <xref linkend="hdimagewrites" />.
100 </para></listitem>
101 </varlistentry>
102 <varlistentry>
103 <term><option>--compact</option></term>
104 <listitem><para>
105 Compresses disk images by removing blocks that contain only
106 zeroes. This option shrinks a dynamically allocated image
107 and reduces the <emphasis>physical</emphasis> size of the
108 image without affecting the logical size of the virtual
109 disk.
110 </para><para>
111 You can use this option for base images and for differencing
112 images that are created as part of a snapshot.
113 </para><note>
114 <para>
115 Before you compress the image, you must use a suitable
116 software tool to zero out free space in the guest system.
117 For example:
118 </para>
119 <itemizedlist>
120 <listitem><para>
121 <emphasis role="bold">Windows guests.</emphasis> Run
122 the <command>sdelete -z</command> command.
123 </para></listitem>
124 <listitem><para>
125 <emphasis role="bold">Linux guests.</emphasis> Use the
126 <command>zerofree</command> utility, which supports
127 <literal>ext2</literal> and <literal>ext3</literal>
128 file systems.
129 </para></listitem>
130 <listitem><para>
131 <emphasis role="bold">Mac OS X guests.</emphasis> Use
132 the <command>diskutil secureErase freespace 0
133 /</command> command.
134 </para></listitem>
135 </itemizedlist>
136 </note><para>
137 Note that you can only use this option to compress VDI
138 images. To compress non-VID images, you can zero out free
139 blocks and then clone the disk to any other dynamically
140 allocated format.
141 </para></listitem>
142 </varlistentry>
143 <varlistentry>
144 <term><option>--description=<replaceable>description</replaceable></option></term>
145 <listitem><para>
146 Specifies a text description of the medium.
147 </para></listitem>
148 </varlistentry>
149 <varlistentry>
150 <term><option>--move=<replaceable>pathname</replaceable></option></term>
151 <listitem><para>
152 Specifies a relative or absolute path to a medium on the
153 host system. Use this option to relocate a medium to a
154 different location on the host system.
155 </para></listitem>
156 </varlistentry>
157 <varlistentry>
158 <term><option>--property=<replaceable>name</replaceable>=<replaceable>value</replaceable></option></term>
159 <listitem><para>
160 Specifies a property name and value for the medium.
161 </para></listitem>
162 </varlistentry>
163 <varlistentry>
164 <term><option>--resize=<replaceable>size</replaceable></option></term>
165 <listitem><para>
166 Specifes the new capacity of an existing image in MB. You
167 can use this option only to expand the capacity of an image.
168 You can cannot shrink the capacity of an image.
169 </para><para>
170 Note that you can resize only dynamically allocated disk
171 images that use the VDI and VHD formats. This option adjusts
172 the <emphasis>logical</emphasis> size of a virtual disk and
173 has only a minor affect on the physical size.
174 </para><para>
175 For example, if your dynamically allocated 10 GB disk is
176 full, you can use the <option>--resize 15360</option> option
177 to increase the capacity of the existing disk to 15 GB
178 (15,360 MB). This operation enables you to avoid having to
179 create a new image and copy all data from within a VM.
180 </para><para>
181 Note that using this option only changes the capacity of the
182 drive. So, you might need to subsequently use a partition
183 management tool in the guest to adjust the main partition to
184 fill the drive.
185 </para></listitem>
186 </varlistentry>
187 <varlistentry>
188 <term><option>--resizebyte=<replaceable>size</replaceable></option></term>
189 <listitem><para>
190 Specifes the new capacity of an existing image in bytes.
191 This option is similar to the <option>--resize</option>
192 option, but you specify the size in bytes instead of
193 megabytes.
194 </para></listitem>
195 </varlistentry>
196 <varlistentry>
197 <term><option>--setlocation=<replaceable>pathname</replaceable></option></term>
198 <listitem><para>
199 Specifies the new location of the medium on the host system
200 after the medium has been moved. The path name can be
201 relative to the current directory or be absolute to the
202 root.
203 </para><para>
204 Note that the <command>VBoxManage modifymedium</command>
205 command does not perform any sanity checks on the path name
206 you specify. Ensure that the path name is valid.
207 </para></listitem>
208 </varlistentry>
209 <varlistentry>
210 <term><option>--type</option></term>
211 <listitem><para>
212 Specifies the new mode type of an existing image. Valid
213 values are <literal>normal</literal>,
214 <literal>immutable</literal>,
215 <literal>writethrough</literal>,
216 <literal>multi-attach</literal>,
217 <literal>shareable</literal>, and
218 <literal>readonly</literal>. For descriptions of these mode
219 types, see <xref linkend="hdimagewrites" />.
220 </para></listitem>
221 </varlistentry>
222 </variablelist>
223 </refsect1>
224
225 <refsect1>
226 <title>Examples</title>
227 <remark role="help-scope" condition="GLOBAL" />
228 <para>
229 The following command modifies the description for the disk image
230 file called <filename>disk01.vdi</filename>.
231 </para>
232<screen>$ VBoxManage modifymedium disk disk01.vdi --description "Oracle Linux 7 image"</screen>
233 <para>
234 The following command modifies the write mode for the disk image
235 file called <filename>disk01.vdi</filename>.
236 </para>
237<screen>$ VBoxManage modifymedium disk disk01.vdi --type writethrough</screen>
238 </refsect1>
239
240 <refsect1>
241 <title>See Also</title>
242 <para>
243 <xref linkend="vboxmanage-list" />
244 </para>
245 </refsect1>
246</refentry>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette