1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
|
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "virt-make-fs.pl 1"
.TH virt-make-fs.pl 1 "2012-06-01" "libguestfs-1.18.1" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "名前"
.IX Header "名前"
virt-make-fs \- tar アーカイブまたはファイルからファイルシステムの作成
.SH "書式"
.IX Header "書式"
.Vb 1
\& virt\-make\-fs [\-\-options] input.tar output.img
\&
\& virt\-make\-fs [\-\-options] input.tar.gz output.img
\&
\& virt\-make\-fs [\-\-options] directory output.img
.Ve
.SH "説明"
.IX Header "説明"
Virt-make-fs is a command line tool for creating a filesystem from a tar
archive or some files in a directory. It is similar to tools like
\&\fImkisofs\fR\|(1), \fIgenisoimage\fR\|(1) and \fImksquashfs\fR\|(1). Unlike those tools,
it can create common filesystem types like ext2/3 or \s-1NTFS\s0, which can be
useful if you want to attach these filesystems to existing virtual machines
(eg. to import large amounts of read-only data to a \s-1VM\s0).
.PP
空のディスクを使用するには \fIvirt\-format\fR\|(1) を使用します。
.PP
Basic usage is:
.PP
.Vb 1
\& virt\-make\-fs input output.img
.Ve
.PP
where \f(CW\*(C`input\*(C'\fR is either a directory containing files that you want to add,
or a tar archive (either uncompressed tar or gzip-compressed tar); and
\&\f(CW\*(C`output.img\*(C'\fR is a disk image. The input type is detected automatically.
The output disk image defaults to a raw ext2 sparse image unless you specify
extra flags (see \*(L"\s-1OPTIONS\s0\*(R" below).
.SS "ファイルシステム形式"
.IX Subsection "ファイルシステム形式"
The default filesystem type is \f(CW\*(C`ext2\*(C'\fR. Just about any filesystem type that
libguestfs supports can be used (but \fInot\fR read-only formats like
\&\s-1ISO9660\s0). Here are some of the more common choices:
.IP "\fIext3\fR" 4
.IX Item "ext3"
Note that ext3 filesystems contain a journal, typically 1\-32 \s-1MB\s0 in size. If
you are not going to use the filesystem in a way that requires the journal,
then this is just wasted overhead.
.IP "\fIntfs\fR または \fIvfat\fR" 4
.IX Item "ntfs または vfat"
Useful if exporting data to a Windows guest.
.Sp
\&\fINote for vfat\fR: The tar archive or local directory must only contain files
which are owned by root (ie. \s-1UID:GID\s0 = 0:0). The reason is that the tar
program running within libguestfs is unable to change the ownership of
non-root files, since vfat itself does not support this.
.IP "\fIminix\fR" 4
.IX Item "minix"
Lower overhead than \f(CW\*(C`ext2\*(C'\fR, but certain limitations on filename length and
total filesystem size.
.PP
\fI例\fR
.IX Subsection "例"
.PP
.Vb 1
\& virt\-make\-fs \-\-type=minix input minixfs.img
.Ve
.SS "\s-1TO\s0 \s-1PARTITION\s0 \s-1OR\s0 \s-1NOT\s0 \s-1TO\s0 \s-1PARTITION\s0"
.IX Subsection "TO PARTITION OR NOT TO PARTITION"
Optionally virt-make-fs can add a partition table to the output disk.
.PP
Adding a partition can make the disk image more compatible with certain
virtualized operating systems which don't expect to see a filesystem
directly located on a block device (Linux doesn't care and will happily
handle both types).
.PP
On the other hand, if you have a partition table then the output image is no
longer a straight filesystem. For example you cannot run \fIfsck\fR\|(8)
directly on a partitioned disk image. (However libguestfs tools such as
\&\fIguestfish\fR\|(1) and \fIvirt\-resize\fR\|(1) can still be used).
.PP
\fI例\fR
.IX Subsection "例"
.PP
\&\s-1MBR\s0 パーティションを追加します:
.PP
.Vb 1
\& virt\-make\-fs \-\-partition \-\- input disk.img
.Ve
.PP
If the output disk image could be terabyte-sized or larger, it's better to
use an EFI/GPT\-compatible partition table:
.PP
.Vb 1
\& virt\-make\-fs \-\-partition=gpt \-\-size=+4T \-\-format=qcow2 input disk.img
.Ve
.SS "\s-1EXTRA\s0 \s-1SPACE\s0"
.IX Subsection "EXTRA SPACE"
Unlike formats such as tar and squashfs, a filesystem does not \*(L"just fit\*(R"
the files that it contains, but might have extra space. Depending on how
you are going to use the output, you might think this extra space is wasted
and want to minimize it, or you might want to leave space so that more files
can be added later. Virt-make-fs defaults to minimizing the extra space,
but you can use the \fI\-\-size\fR flag to leave space in the filesystem if you
want it.
.PP
An alternative way to leave extra space but not make the output image any
bigger is to use an alternative disk image format (instead of the default
\&\*(L"raw\*(R" format). Using \fI\-\-format=qcow2\fR will use the native QEmu/KVM qcow2
image format (check your hypervisor supports this before using it). This
allows you to choose a large \fI\-\-size\fR but the extra space won't actually be
allocated in the image until you try to store something in it.
.PP
Don't forget that you can also use local commands including \fIresize2fs\fR\|(8)
and \fIvirt\-resize\fR\|(1) to resize existing filesystems, or rerun virt-make-fs
to build another image from scratch.
.PP
\fI例\fR
.IX Subsection "例"
.PP
.Vb 1
\& virt\-make\-fs \-\-format=qcow2 \-\-size=+200M input output.img
.Ve
.SH "オプション"
.IX Header "オプション"
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
簡単なヘルプを表示します。
.IP "\fB\-\-version\fR" 4
.IX Item "--version"
バージョン番号を表示して終了します。
.IP "\fB\-\-debug\fR" 4
.IX Item "--debug"
デバッグ情報を有効にします。
.IP "\fB\-\-size=<N>\fR" 4
.IX Item "--size=<N>"
.PD 0
.IP "\fB\-\-size=+<N>\fR" 4
.IX Item "--size=+<N>"
.IP "\fB\-s <N>\fR" 4
.IX Item "-s <N>"
.IP "\fB\-s +<N>\fR" 4
.IX Item "-s +<N>"
.PD
Use the \fI\-\-size\fR (or \fI\-s\fR) option to choose the size of the output image.
.Sp
If this option is \fInot\fR given, then the output image will be just large
enough to contain all the files, with not much wasted space.
.Sp
To choose a fixed size output disk, specify an absolute number followed by
b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes,
Petabytes or Exabytes. This must be large enough to contain all the input
files, else you will get an error.
.Sp
To leave extra space, specify \f(CW\*(C`+\*(C'\fR (plus sign) and a number followed by
b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes,
Petabytes or Exabytes. For example: \fI\-\-size=+200M\fR means enough space for
the input files, and (approximately) an extra 200 \s-1MB\s0 free space.
.Sp
Note that virt-make-fs estimates free space, and therefore will not produce
filesystems containing precisely the free space requested. (It is much more
expensive and time-consuming to produce a filesystem which has precisely the
desired free space).
.IP "\fB\-\-format=<fmt>\fR" 4
.IX Item "--format=<fmt>"
.PD 0
.IP "\fB\-F <fmt>\fR" 4
.IX Item "-F <fmt>"
.PD
出力するディスクイメージ形式を選択します。
.Sp
デフォルトは \f(CW\*(C`raw\*(C'\fR です (スパースな raw 形式のディスクイメージ)。
.Sp
For other choices, see the \fIqemu\-img\fR\|(1) manpage. The only other choice
that would really make sense here is \f(CW\*(C`qcow2\*(C'\fR.
.IP "\fB\-\-type=<fs>\fR" 4
.IX Item "--type=<fs>"
.PD 0
.IP "\fB\-t <fs>\fR" 4
.IX Item "-t <fs>"
.PD
Choose the output filesystem type.
.Sp
デフォルトは \f(CW\*(C`ext2\*(C'\fR です。
.Sp
Any filesystem which is supported read-write by libguestfs can be used here.
.IP "\fB\-\-partition\fR" 4
.IX Item "--partition"
.PD 0
.IP "\fB\-\-partition=<parttype>\fR" 4
.IX Item "--partition=<parttype>"
.PD
このフラグが指定されていると、出力ディスクイメージに \s-1MBR\s0 パーティションテーブルを追加します。
.Sp
You can change the partition table type, eg. \fI\-\-partition=gpt\fR for large
disks.
.Sp
Note that if you just use a lonesome \fI\-\-partition\fR, the Perl option parser
might consider the next parameter to be the partition type. For example:
.Sp
.Vb 1
\& virt\-make\-fs \-\-partition input.tar output.img
.Ve
.Sp
would cause virt-make-fs to think you wanted to use a partition type of
\&\f(CW\*(C`input.tar\*(C'\fR which is completely wrong. To avoid this, use \fI\-\-\fR (a double
dash) between options and the input and output arguments:
.Sp
.Vb 1
\& virt\-make\-fs \-\-partition \-\- input.tar output.img
.Ve
.Sp
For \s-1MBR\s0, virt-make-fs sets the partition type byte automatically.
.SH "SHELL QUOTING"
.IX Header "SHELL QUOTING"
Libvirt guest names can contain arbitrary characters, some of which have
meaning to the shell such as \f(CW\*(C`#\*(C'\fR and space. You may need to quote or
escape these characters on the command line. See the shell manual page
\&\fIsh\fR\|(1) for details.
.SH "関連項目"
.IX Header "関連項目"
\&\fIguestfish\fR\|(1), \fIvirt\-format\fR\|(1), \fIvirt\-resize\fR\|(1), \fIvirt\-tar\-in\fR\|(1),
\&\fImkisofs\fR\|(1), \fIgenisoimage\fR\|(1), \fImksquashfs\fR\|(1), \fImke2fs\fR\|(8),
\&\fIresize2fs\fR\|(8), \fIguestfs\fR\|(3), \fISys::Guestfs\fR\|(3),
<http://libguestfs.org/>.
.SH "バグ"
.IX Header "バグ"
バグを報告するとき、デバッグを有効にして、\fI完全な\fR 出力を記録してください:
.PP
.Vb 2
\& export LIBGUESTFS_DEBUG=1
\& virt\-make\-fs \-\-debug [...] > /tmp/virt\-make\-fs.log 2>&1
.Ve
.PP
/tmp/virt\-make\-fs.log を <https://bugzilla.redhat.com/> の新しいバグ報告に添付します
.SH "著者"
.IX Header "著者"
Richard W.M. Jones <http://people.redhat.com/~rjones/>
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 2010\-2012 Red Hat Inc.
.PP
This program is free software; you can redistribute it and/or modify it
under the terms of the \s-1GNU\s0 General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
.PP
This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0
\&\s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or
\&\s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0 General Public License for
more details.
.PP
You should have received a copy of the \s-1GNU\s0 General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, \s-1MA\s0 02110\-1301 \s-1USA\s0.
|