Solved

Centos Qemu dump virtual machine when shutdown

Posted on 2011-09-08
9
787 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
 

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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Xen 6.1, 6.2 Poor NIC performance in ShadowProtect/WinPE 9 74
Upgrade View 5.1.2 to Horizon 7 3 56
VMware Horizon Client 4 67
how to rebuild XFS volume from LV 19 28
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

930 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now