Extending VM Linux Hard Drives

  • Thread starter Thread starter sub3xt1
  • Start date Start date
Hi,
you can convert your qcow2-disk to raw, and then extend the raw-file.
For convert see
Code:
man qemu-img
or use the search function in this forum.
To switch the disk, you can use the gui (delete, and add existing) or edit the config-file:
Code:
/etc/qemu-server/104.conf
ide0: local:104/vm-104-disk-1.raw

Udo
 
ok, i have seen it.

hmmm...
is that any capability going loose if vm-harddrive in raw format?
in qemu-img manual, qcow2 is next generation file format .. which stand of copy on write.

i think it will lose any snapshott capability if vm-harddrive in raw format.
i suggest like this:
1. convert qcow2 -> raw format
HTML:
qemu-img convert -f qcow2 hdd.qcow2 -O raw hdd.raw
2. extend hard drive (example 50GB -> 60GB)
HTML:
dd if=/dev/zero of=hdd.raw bs=1M count=0 seek=61440
3. convert back raw -> qcow2 format
HTML:
qemu-img convert -f raw hdd.raw -O qcow2 hdd.qcow2
there is no need to change the file configuration also.
is that my oppinion right