Solved

Centos Qemu dump virtual machine when shutdown

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

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
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…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

821 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