™.. virt-format - Online Linux Manual PageSection : 1
Updated : 2013-08-27
Source : libguestfs-1.20.11
Note : Virtualization Support

NAMEvirt−format − Erase and make a blank disk

SYNOPSIS​ virt−format [−−options] −a disk.img [−a disk.img ...]

DESCRIPTIONVirt-format takes an existing disk file (or it can be a host partition, LV etc), erases all data on it, and formats it as a blank disk. It can optionally create partition tables, empty filesystems, logical volumes and more. To create a disk containing data, you may be better to use ​virt−make−fs(1). If you are creating a blank disk to use in ​guestfish(1), you should instead use the guestfish −N option. Normal usage would be something like this: ​ virt−format −a disk.qcow or this: ​ virt−format −a /dev/VG/LV \*(C`disk.qcow\*(C'\fR or \f(CW\*(C`/dev/VG/LV\*(C'\fR must exist already. \fBAny data on these disks will be erased by these commands. These commands will create a single empty partition covering the whole disk, with no filesystem inside it. Additional parameters can be used to control the creation of partitions, filesystems, etc. The most commonly used options are: −−filesystem=[ext3|ntfs|vfat|...] Create an empty filesystem (\*(C`ext3\*(C'\fR, \f(CW\*(C`ntfs\*(C'\fR etc) inside the partition. −−lvm[=/dev/VG/LV] Create a Linux LVM2 logical volume on the disk. When used with ​−−filesystem, the filesystem is created inside the LV. For more information about these and other options, see ​OPTIONS below. The format of the disk is normally auto-detected, but you can also force it by using the −−format option (q.v.). In situations where you do not trust the existing content of the disk, then it is advisable to use this option to avoid possible exploits.

OPTIONS−−help Display brief help. −a file −−add file Add file, a disk image, host partition, LV, external USB disk, etc. The format of the disk image is auto-detected. To override this and force a particular format use the −−format=.. option. Any existing data on the disk is erased. −−filesystem=ext3|ntfs|vfat|... Create an empty filesystem of the specified type. Many filesystem types are supported by libguestfs. −−filesystem=none Create no filesystem. This is the default. −−format=raw|qcow2|.. −−format The default for the −a option is to auto-detect the format of the disk image. Using this forces the disk format for −a options which follow on the command line. Using −−format with no argument switches back to auto-detection for subsequent −a options. For example: ​ virt−format −−format=raw −a disk.img forces raw format (no auto-detection) for \*(C`disk.img\*(C'\fR. ​ virt−format −−format=raw −a disk.img −−format −a another.img forces raw format (no auto-detection) for \*(C`disk.img\*(C'\fR and reverts to auto-detection for \*(C`another.img\*(C'\fR. If you have untrusted raw-format guest disk images, you should use this option to specify the disk format. This avoids a possible security problem with malicious guests (CVE−2010−3851). −−lvm=/dev/VG/LV Create a Linux LVM2 logical volume called \*(C`/dev/\f(CIVG\f(CW/\f(CILV\f(CW\*(C'\fR. You can change the name of the volume group and logical volume. −−lvm Create a Linux LVM2 logical volume with the default name (\*(C`/dev/VG/LV\*(C'\fR). −−lvm=none Create no logical volume. This is the default. −−partition Create either an MBR or GPT partition covering the whole disk. MBR is chosen if the disk size is < 2 TB, GPT if ≥ 2 TB. This is the default. −−partition=gpt Create a GPT partition. −−partition=mbr Create an MBR partition. −−partition=none Create no partition table. Note that Windows may not be able to see these disks. −v −−verbose Enable verbose messages for debugging. −V −−version Display version number and exit. −−wipe Normally virt-format does not wipe data from the disk (because that takes a long time). Thus if there is data on the disk, it is only hidden and partially overwritten by virt-format, and it might be recovered by disk editing tools. If you use this option, virt-format writes zeroes over the whole disk so that previous data is not recoverable. −x Enable tracing of libguestfs API calls.

EXIT STATUSThis program returns 0 on success, or 1 on failure.

SEE ALSOguestfs(3), ​guestfish(1), ​virt−filesystems(1), ​virt−make−fs(1), ​virt−rescue(1), ​virt−resize(1), http://libguestfs.org/.

AUTHORRichard W.M. Jones http://people.redhat.com/~rjones/

COPYRIGHTCopyright (C) 2012 Red Hat Inc.

LICENSEThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but ​WITHOUT ANY WARRANTY; without even the implied warranty of ​MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110−1301 USA.

BUGSTo get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools When reporting a bug, please supply: • The version of libguestfs. • Where you got libguestfs (eg. which Linux distro, compiled from source, etc) • Describe the bug accurately and give a way to reproduce it. • Run libguestfs−test−tool(1) and paste the complete, unedited output into the bug report.
0
Johanes Gumabo
Data Size   :   24,586 byte
man-virt-format.1Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 170,405
Visitor ID   :     :  
Visitor IP   :   18.117.151.198   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|virt-format.1|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|virt-format.1|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|virt-format.1|41|br══─}─══|'br══─}─══ )         (htmlprn|149|virt-format.1|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|virt-format.1|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|virt-format.1|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|virt-format.1|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|virt-format.1|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|virt-format.1|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|249|virt-format.1|57|══─}─══|.══─}─══ )         (htmlprn|149|virt-format.1|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|virt-format.1|100|\*(C`disk.qcow\*(C'\fR or \f(CW\*(C`/dev/VG/LV\*(C'\fR must exist already. \fBAny data on these |\&\f(CW\*(C`disk.qcow\*(C'\fR or \f(CW\*(C`/dev/VG/LV\*(C'\fR must exist already. \fBAny data on these )         (rof_escape_sequence|91|virt-format.1|109|\*(C`ext3\*(C'\fR, \f(CW\*(C`ntfs\*(C'\fR etc) inside the partition. |Create an empty filesystem (\f(CW\*(C`ext3\*(C'\fR, \f(CW\*(C`ntfs\*(C'\fR etc) inside the partition. )         (rof_escape_sequence|91|virt-format.1|163|\*(C`disk.img\*(C'\fR. |forces raw format (no auto-detection) for \f(CW\*(C`disk.img\*(C'\fR. )         (rof_escape_sequence|91|virt-format.1|169|\*(C`disk.img\*(C'\fR and reverts to |forces raw format (no auto-detection) for \f(CW\*(C`disk.img\*(C'\fR and reverts to )         (rof_escape_sequence|91|virt-format.1|170|\*(C`another.img\*(C'\fR. |auto-detection for \f(CW\*(C`another.img\*(C'\fR. )         (rof_escape_sequence|91|virt-format.1|177|\*(C`/dev/\f(CIVG\f(CW/\f(CILV\f(CW\*(C'\fR. You |Create a Linux \s-1LVM2\s0 logical volume called \f(CW\*(C`/dev/\f(CIVG\f(CW/\f(CILV\f(CW\*(C'\fR. You )         (rof_escape_sequence|91|virt-format.1|182|\*(C`/dev/VG/LV\*(C'\fR). |(\f(CW\*(C`/dev/VG/LV\*(C'\fR). )