Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

We had a 180GB VM image. Inside the guest VM everything is OK and hdd size is 180G. but when we look the image size on the host it is 475MB. I am afraid that if we restart, the VM wouldn't work. I checked the size by

ls -sh 
457M x.img

and

qemu-img info x.img
file format: raw
virtual size: 456M (478309888 bytes)
disk size: 456M

this is the this configuration :

<disk type='file' device='disk'>
  <driver name='qemu' type='raw'/>
  <source file='/vm/x.img'/>
  <target dev='vda' bus='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>

and the disk cache setting is default.

both host and VM are ubuntu 12.04

share|improve this question
1  
Isn't 457 MB the used space, but the VM is allowed to grow the image to a maximum of 180 GB? I don't know how this works in KVM, but this is possible in VirtualBox for example. –  Louis Matthijssen May 6 at 7:15
    
at least 100GB is used. –  MKT May 6 at 7:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.