Solved

Centos Qemu dump virtual machine when shutdown

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

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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

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 39

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
For Backups Guest OS files and indexing(and application awareness), Veeam needs Admin rights in Guest OS(Windows and Linux). In Windows a Domain Administrator account, and in Linux root access to perform this type of Backups and also Restore.
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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