Solved

KVM allocates entire storage on virtual disk

Posted on 2010-09-17
4
447 Views
Last Modified: 2013-11-15
Hi, I create a virtual machine originally though PXE, and for some reason the virtual disk size becomes the full size. That is, when I do a df inside the virtual machine it shows only 1.2gb used; however, on the host machine it shows the file size as 8gb. Why is that? How do I force the size of the image on the host machine to be the size actually used on the guest

Thanks
0
Comment
Question by:BrianGEFF719
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 35

Assisted Solution

by:torimar
torimar earned 500 total points
ID: 33705836
Could it be the virtual disk was created as "dynamically expanding"?
In that case, the complete maximum size of space may be reserved on the host, but the actual size that the guest uses and sees is only as much disk space as is actually claimed by the virtual machine. In time, this will grow up to the maximum 8 GB.

I'm not sure about KVM, but other virtualization technologies offer this dynamical storage option.
0
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 0 total points
ID: 33705998
So, I resolved the problem. As it turns out I was using a raw image format instead of a "copy on write," or QCOW as it's called in KVM. So that forced the fulled allocation. Creating a new image as qcow2 now only uses on the host exactly what the VM is using.
0
 
LVL 35

Expert Comment

by:torimar
ID: 33706216
Congratulations.

However, there is no reason to delete a question just because it has been solved. This is even counter-productive to the idea of an EE solution database. Just select your own answer as the solution, and request a closure.

Also, QCOW is kind of a "disk space on demand" technique, which is not unrelated to the concept of dynamically allocated storage. Can you exclude that it may have been my comment which pointed you to right direction for solving the issue? If you can't, it would only be fair (and standard procedure on EE) to grant me some assist points.
0
 
LVL 19

Author Comment

by:BrianGEFF719
ID: 33706791
Request my own comment.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question