LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-19-2014, 06:23 AM   #1
capellone
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
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!
 
Old 08-19-2014, 08:27 AM   #2
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 262

Rep: Reputation: 55
You could just open up two sessions and change the variable on one of them.
 
Old 08-19-2014, 08:48 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by capellone View Post
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!
Create two different users, both with their own .profile file. No need for two OSes.
 
Old 08-19-2014, 02:46 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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.
 
Old 08-19-2014, 03:02 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
"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.
 
Old 08-20-2014, 03:28 PM   #6
capellone
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 08-20-2014, 04:11 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
you could try xen project hypervisor
http://wiki.xenproject.org/wiki/Xen_...eginners_Guide
 
Old 08-20-2014, 04:46 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Have to issue /etc/rc.d/rc.vboxdrv start every time I start virtual machine lihongwu Slackware 4 04-21-2013 12:04 AM
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 01:59 PM
Computer doesn't start; fans start then stop; 1 long, 1 short beep PatrickMay16 General 18 09-26-2007 07:48 PM
disable cold start and warm start snmp traps chkisco Linux - Newbie 0 10-28-2005 02:58 AM
fc2-gnome : Applications dont start / very slow to start nox104 Linux - Software 0 08-18-2004 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration