Start the same OS twice
Hello,
I have a Fedora 20 machine (native mode, no VM). Each time i log in, i set (in .profile) an environment variable ROOT_PATH=/home/ddd/path1 which is then used by all the programs i start later (and which cannot be changed on the fly). If i want to set ROOT_PATH=/home/ddd/path2, i must update the .profile file, then restart. Question: It is possible to have 2 instances of the same Fedora20 running at the same time? I want one instance for path1 and another for path2. Both instances would use the same HDD. How to do it? Thank you! |
You could just open up two sessions and change the variable on one of them.
|
Quote:
|
yes, 2 users is what you need, each user account has it's own .profile
running 2 or more simultaneous instances of an operating system would require some level of virtualization, either via a virtual machine running as a guest on top of a 'host' OS (such as virtualbox) or a 'bare metal' virtualization such as the xen hypervisor. |
"It is possible to have 2 instances of the same Fedora20 running at the same time?"
A simple answer is no you can't for the most part. Not saying it can't be done just you don't want to even attempt it. It is possible to chroot and I think that is what you may be asking or getting at. |
Thank you all for your answers!
There is another constraint i forgot to mention: in each session i start several servers; i cannot run two instances of the same server on the same computer at the same time because only 1 will successfully bind to configured port, so i need a kind of "processes/memory/network isolation"; i posted my question in this forum because maybe there is a virtualization solution i coould use, but i was unable to find one so far. |
you could try xen project hypervisor
http://wiki.xenproject.org/wiki/Xen_...eginners_Guide |
If all you want is to have running the same server on different ports or even different IPs on the same machine than virtualization using Xen, KVM, Virtualbox, ..., is definitely overkill, this is a perfect job for LXC containers or, since you run Fedora, systemd-nspawn, it uses much less resources and is very easy to set up.
I guess on Fedora systemd-nspawn is the preferred method for containers: https://fedoraproject.org/wiki/Featu...ightContainers |
All times are GMT -5. The time now is 04:27 PM. |