/[qemu]/qemu/qemu-doc.texi
ViewVC logotype

Diff of /qemu/qemu-doc.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by bellard, Mon Jun 30 23:16:33 2003 UTC revision 1.14 by bellard, Sun Jul 6 19:01:55 2003 UTC
# Line 368  Use 'file' as initial ram disk. Line 368  Use 'file' as initial ram disk.
368    
369  @item -hda file  @item -hda file
370  @item -hdb file  @item -hdb file
371  Use 'file' as hard disk 0 or 1 image. The disk images are simply raw  Use 'file' as hard disk 0 or 1 image (@xref{disk_images}).
372  images of the hard disk. You can create them with the command:  
373  @example  @item -snapshot
374  dd if=/dev/zero of=myimage bs=1024 count=mysize  
375  @end example  Write to temporary files instead of disk image files. In this case,
376  where @var{myimage} is the image filename and @var{mysize} is its size  the raw disk image you use is not written back. You can however force
377  in kilobytes.  the write back by pressing @key{C-a s} (@xref{disk_images}).
378    
379  @item -m megs  @item -m megs
380  Set virtual RAM size to @var{megs} megabytes.  Set virtual RAM size to @var{megs} megabytes.
# Line 402  During emulation, use @key{C-a h} to get Line 402  During emulation, use @key{C-a h} to get
402  Print this help  Print this help
403  @item C-a x      @item C-a x    
404  Exit emulatior  Exit emulatior
405  @item C-a b      @item C-a s    
406    Save disk data back to file (if -snapshot)
407    @item C-a b
408  Send break (magic sysrq)  Send break (magic sysrq)
409  @item C-a C-a    @item C-a C-a
410  Send C-a  Send C-a
411  @end table  @end table
412    
413    @node disk_images
414    @section Disk Images
415    
416    @subsection Raw disk images
417    
418    The disk images can simply be raw images of the hard disk. You can
419    create them with the command:
420    @example
421    dd if=/dev/zero of=myimage bs=1024 count=mysize
422    @end example
423    where @var{myimage} is the image filename and @var{mysize} is its size
424    in kilobytes.
425    
426    @subsection Snapshot mode
427    
428    If you use the option @option{-snapshot}, all disk images are
429    considered as read only. When sectors in written, they are written in
430    a temporary file created in @file{/tmp}. You can however force the
431    write back to the raw disk images by pressing @key{C-a s}.
432    
433    NOTE: The snapshot mode only works with raw disk images.
434    
435    @subsection Copy On Write disk images
436    
437    QEMU also supports user mode Linux
438    (@url{http://user-mode-linux.sourceforge.net/}) Copy On Write (COW)
439    disk images. The COW disk images are much smaller than normal images
440    as they store only modified sectors. They also permit the use of the
441    same disk image template for many users.
442    
443    To create a COW disk images, use the command:
444    
445    @example
446    vlmkcow -f myrawimage.bin mycowimage.cow
447    @end example
448    
449    @file{myrawimage.bin} is a raw image you want to use as original disk
450    image. It will never be written to.
451    
452    @file{mycowimage.cow} is the COW disk image which is created by
453    @code{vlmkcow}. You can use it directly with the @option{-hdx}
454    options. You must not modify the original raw disk image if you use
455    COW images, as COW images only store the modified sectors from the raw
456    disk image. QEMU stores the original raw disk image name and its
457    modified time in the COW disk image so that chances of mistakes are
458    reduced.
459    
460    If raw disk image is not read-only, by pressing @key{C-a s} you can
461    flush the COW disk image back into the raw disk image, as in snapshot
462    mode.
463    
464    COW disk images can also be created without a corresponding raw disk
465    image. It is useful to have a big initial virtual disk image without
466    using much disk space. Use:
467    
468    @example
469    vlmkcow mycowimage.cow 1024
470    @end example
471    
472    to create a 1 gigabyte empty COW disk image.
473    
474    NOTES:
475    @enumerate
476    @item
477    COW disk images must be created on file systems supporting
478    @emph{holes} such as ext2 or ext3.
479    @item
480    Since holes are used, the displayed size of the COW disk image is not
481    the real one. To know it, use the @code{ls -ls} command.
482    @end enumerate
483    
484  @section Kernel Compilation  @section Kernel Compilation
485    
486  You can use any Linux kernel within QEMU provided it is mapped at  You can use any Linux kernel within QEMU provided it is mapped at

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26