Linux system Getting Started learning: Changing the default location for Libvirt VM mirroring

Source: Internet
Author: User

Question: I use Libvirt and Virt-manager to create virtual machines on my Linux system. I noticed that the virtual machine image is located in the/var/lib/libvirt/images directory. Is there a way to change the default path for a virtual machine image?

Libvirt and its GUI front-end Virt-manager can use different hypervisors to create and manage VMs, such as LVM and Xen. By default, all virtual machine images are created through libvirt to the/var/lib/libvirt/images directory. However, this is sometimes not what we want. For example,/var/lib/libvirt/images here the size of the disk partition is limited. Or you want to store all the virtual machine images in a specific warehouse for management.

In fact, you can easily change the default directory for the Libvirt image, or call it a "storage pool."

There are two ways to change the default storage pool.

Method One: Virt-manager GUI

If you are using the Virt-manager GUI program, it is very easy to change the default storage pool.

Go to Virt-manager 's menu gui "edit", "Connection Details".

You can see the default storage pool, as shown below. In the lower left corner of the window, click the Fork button and the default storage pool will be stopped. Once the storage pool is stopped, click on the Trash bin on the right to delete the storage pool. Note that this action does not delete the mirror in the pool.

Now click on the plus sign on the left to add a new storage pool.

Enter the name of the new storage pool (for example: Default), and select the type of storage pool. In this case, because we just changed the storage pool directory, select "File system directory".

    • Related articles recommended:
    • Build a local area network mirror image source with Debian 7.5 CD/DVD to install Debian unattended in batch networks
    • Linux Ask a question: How to extend the Xfs file system
    • Configure access control lists (ACLs) for Linux
    • This article from: Hobby Linux Technology Network
    • This article link: http://www.ahlinux.com/mainte/9393.html

Linux system Getting Started learning: Changing the default location for Libvirt VM mirroring

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.