Thursday, September 22, 2005

create qemu harddisk image

kemarin udah bisa test jalanin knoppix pakai QEMU, dan ternyata berhasil dengan baik. selanjutnya kok jadi penasaran mo coba install linux pake emulator ini, jadi bisa diambil snapshot nya untuk bikin manual guides Instalasi Linux.
setelah dicoba ternyata qemu butuh harddisk untuk target media instalasi, thus .. langsung kepikir utk bikin harddisk image, dan ternyata qemu bisa juga bikin harddisk image, commandnya :

# qemu-img create -f qcow myharddisk.image 4G

perintah diatas akan membuat harddisk image dengan nama myharddisk.image dengan format qcow sebesar 4 Gigabytes.
simple khan.. kalau mau tahu detilnya bisa dilihat di petunjuk berikut :


#qemu-img
qemu-img version 0.7.1, Copyright (c) 2004-2005 Fabrice Bellard
usage: qemu-img command [command options]
QEMU disk image utility

Command syntax:
create [-e] [-b base_image] [-f fmt] filename [size]
commit [-f fmt] filename
convert [-c] [-e] [-f fmt] filename [-O output_fmt] output_filename
info [-f fmt] filename

Command parameters:
'filename' is a disk image filename
'base_image' is the read-only disk image which is used as base for a copy on
write image; the copy on write image only stores the modified data
'fmt' is the disk image format. It is guessed automatically in most cases
'size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte)
and 'G' (gigabyte) are supported
'output_filename' is the destination disk image filename
'output_fmt' is the destination format
'-c' indicates that target image must be compressed (qcow format only)
'-e' indicates that the target image must be encrypted (qcow format only)

Supported format: vvfat vpc bochs dmg cloop vmdk qcow cow raw

No comments: