Solved

Centos Qemu dump virtual machine when shutdown

Posted on 2011-09-08
9
797 Views
Last Modified: 2012-05-12
Hi,

I'm working with qemu under Centos and when I shutdown the host computer it start dumping the the guest machines into /var/lib/libvirt/qemu/save and I don't have too much space in my hard drive. So I want to change the directory of that dump or disable it.

0
Comment
Question by:luis_chiang
  • 4
  • 3
  • 2
9 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 36506823
All the configuration are under
/etc/libvirt/qemu/
or
/etc/libvirt/qemu.conf

Find out where is the setting:
grep  "/var/lib/libvirt/qemu/save"   /etc/libvirt/qemu.conf
grep  "/var/lib/libvirt/qemu/save"   /etc/libvirt/qemu/*


(post the result here)
0
 
LVL 40

Expert Comment

by:noci
ID: 36506866
There are more or less 3 solutions to this:

If you have a different disk you can mount the disk on to the /var/lib/libvirt/qemu/save direcotry
mount /dev/blabla /var/lib/libvirt/qemu/save

Or if you have room to spare on a different disk that allready is mounted
then you can use mount --bind to use a detour:
  mount --bind /somedir/whereever /var/lib/libvirt/qemu/save

This might also be possible using symbolic links, if like:

mv /var/lib/libvirt/qemu/save/* /somedir/whereever/
rmdir /var/lib/libvirt/qemu/save    
ln -s /somedir/whereever /var/lib/libvirt/qemu/save


The mount's can be added to the /etc/fstab file to enable them during boot
the ln -s needs to be done once.
0
 

Author Comment

by:luis_chiang
ID: 36506890
[root@m23 /]# grep  "/var/lib/libvirt/qemu/save"   /etc/libvirt/qemu.conf
[root@m23 /]# grep  "/var/lib/libvirt/qemu/save"   /etc/libvirt/qemu/*
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:luis_chiang
ID: 36506914
Hi noci:

Unfortunately I don't have enough space or another disk, =( what is I point the folder to /dev/null ? these could be possible?

0
 

Author Comment

by:luis_chiang
ID: 36506927
Hi wesly_chen.

But I didn't find the variable in the configuration file (attached with .txt extension) qemu.txt
0
 
LVL 40

Expert Comment

by:noci
ID: 36507067
/dev/null doesn't behave like a folder so that won't help.
Did you try renaming the save directory to save.nosave   (doesn't work if the directory is auto created..)

or modifying it's protection to no access?

chmod 000 /var/lib/libvirt/qemu/save

0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 500 total points
ID: 36507087
In /etc/libvirt/qemu.conf
change
 hugetlbfs_mount = "/dev/hugepages"
to
hugetlbfs_mount = ""

And reboot your system.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 36507094
Take out the comment "#"
0
 

Author Closing Comment

by:luis_chiang
ID: 36524850
thanks!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

861 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