LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Mounting host partition on KVM guest (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/mounting-host-partition-on-kvm-guest-4175481924/)

KroniK 10-23-2013 07:37 PM

Mounting host partition on KVM guest
 
Hello,

I am fairly new at KVM and virtual machines. I have just recently set up a virtual server (CentOS 6.4) and have a CentOS 6.4 guest on that machine. I have an lvm volume on the host machine that I would like to have the guest access, basically as a mounted drive. However I ONLY want the server and this specific guest to have access to the volume. The Idea being that this will keep my precious data separate from the guest machine and therefore can be moved around, backed up, and switched over to other guests at will and independantly of any specific guest machine, and yet stay secure to whatever guest it is connected to at the time.

Anyway, I have no Idea where to start. I tried making the volume an nfs share, but I feel that isnt very secure, and there has to be a better solution than that.

Any advice is appreciated.

jefro 10-24-2013 03:52 PM

I don't like to mount a real drive or real partition. Why don't you create a virtual hard drive and add it to some system? Then you can mount it and use it as you wish?

dt64 10-26-2013 02:21 PM

In virt-manager just add another hard drive to the configuration and point it to the LVM partition you want to mount.
A restart of the VM might be needed.

Another way would be to provide the data on the LVM on a share, e.g. samba, webdav... and remote-mount it from your VM.

jefro 10-26-2013 02:46 PM

One can share folders pretty easily.


All times are GMT -5. The time now is 02:36 AM.