LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   advice on virtualization (https://www.linuxquestions.org/questions/linux-newbie-8/advice-on-virtualization-4175573435/)

TroN-0074 02-27-2016 05:32 PM

advice on virtualization
 
Hi Guys.
I am about to do a fresh installation, I usually split the hard drive and install the OS on a separated root partition of about 25 GB then leave the rest for home and small partition for swap.

My question is in regard of using KVM to set up a virtual installation of a proprietary OS. So here it is, Can I set up a KVM virtual machine if I have a root partition but I want the user directories of the virtual machine to be under the home partition so there is more room for whatever files we create under this guest OS.

Or do you guys recommend something different than KVM? The reason I want to go with KVM is because it is built in the Linux kernel so I thought to give it a try. I know there is VirtualBox and it is very easy to set up but cant do real things in virtualbox. Should I try something different like containers? has anyone have some experience with containers? Like Dockers.

I will appreciate your advice. Thank you!

btmiller 02-27-2016 07:35 PM

The virtual disk images can live anywhere. Usually they are stored under /var/lib/libvirt/images for QEMU + KVM, but that directory can be symlinked anywhere else, and there's nothing magical about it anyhow so you can put the images anywhere you like. You might need to paly with SELinux contexts on the directory if you're using that.

I usually virtualize other Linux installs under KVM for work. I've only done Windows once (it was a Server 2008 install I needed to run a proprietary tool), but it seemed to work fine.

With containers like Docker, there isn't a separate running kernel, so the container runs whatever kernel you have installed on the box. You can't run a whole different OS in a container (though you can run the user-space stacks of different Linux distributions). So, for example, you can't run a Solaris or Windows container on a Linux host.

TroN-0074 02-28-2016 09:27 AM

Sounds like I will have to leave a big root partition in order to have kvm set up with a whole OS in it. I haven't had much luck with symlinking files I appreciate your advice thank you.

jpollard 02-28-2016 02:58 PM

Quote:

Originally Posted by TroN-0074 (Post 5507472)
Sounds like I will have to leave a big root partition in order to have kvm set up with a whole OS in it. I haven't had much luck with symlinking files I appreciate your advice thank you.

No - you can assign partitions during the creating of the VM, in which case no disk space in root is taken.

When you do that though, I suggest you assign them via /dev/disk/by-id, or /dev/disk/by-uuid (or by-partuuid).

That way you insulate device names from having issues if a disk gets added/removed from the host.


All times are GMT -5. The time now is 05:53 PM.