Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running Existing Gentoo Environment in Virtual Machine
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
mpsii
l33t
l33t


Joined: 11 Mar 2003
Posts: 658
Location: Jackson, TN

PostPosted: Thu Jul 26, 2018 1:27 am    Post subject: Running Existing Gentoo Environment in Virtual Machine Reply with quote

How would I go about running my current existing Gentoo installation in a virtual machine? I am talking about an exact duplicate, most likely self hosted.

Purpose: test updates or other items before risking it ruining my current environment irreparably.
_________________
-----------------------------------------
Michael
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1146
Location: Romania

PostPosted: Thu Jul 26, 2018 2:32 am    Post subject: Reply with quote

back like 15 years ago the only option was vmware.

then things changed.

now, at least on gentoo, the most convenient way is called app-emulation/qemu. also known as kvm. damn good software.

could also check out xen, vmware, virtualbox, hyper-v, and i guess many others.

but qemu/kvm is out of the box the most awesum thing ever.
Back to top
View user's profile Send private message
mpsii
l33t
l33t


Joined: 11 Mar 2003
Posts: 658
Location: Jackson, TN

PostPosted: Sat Jul 28, 2018 12:13 am    Post subject: Reply with quote

I am familiar with KVM, VMWare and Virtualbox.
My goal is to get a near-exact copy of my current running system in a virtualmachine so I can do some playing with my "normal" environment to test/try new things without potentially messing up my "production" instance.
_________________
-----------------------------------------
Michael
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Sat Jul 28, 2018 3:55 am    Post subject: Reply with quote

VirtualBox is pretty easy to use and has a simple snapshot feature.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3477

PostPosted: Sat Jul 28, 2018 9:08 am    Post subject: Reply with quote

Depending on your setup and purpose you may even be able to boot from a disk snapshot.
Much easier and safer to do with a "smart" storage that is not directly managed by your systems. SAN meets this expectation. Virtual machines with storage managed by hypervisor do. A single box with 2 physical drives does to some extent (it would be harder to do than just snapshot on a hypervisor, but I'm sure it can work)
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6069
Location: Removed by Neddy

PostPosted: Sat Jul 28, 2018 9:49 am    Post subject: Reply with quote

do you need a full virtualisation or would a chroot be good enough?
you could make an ext4 file, mount it, rsync your system into it and chroot into it and it should "just work" (be it with the relevant mounts and copies as per the gentoo manual).

then the next time you want to test you can mount you "image" your image and chroot into it.
_________________
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum