LinuxQuestions.org
Review your favorite Linux distribution.
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 03-09-2011, 12:28 PM   #1
newbienumberabillion
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Rep: Reputation: 0
Virtualization? VFS? I don't even know what to ask...


I feel like such a newb I don't even know how to ask this question intelligently.

Basically what I want is a way to do `apt-get install blah blah blah`, and install all sorts of programs, but only do so for one "profile" or "user" or whatever. Right now, in ubuntu, if I install a program or library, I do it across the system.

Is there any way to sort of "sandbox" a file system? Is that a virtual file system, like a virtual machine?

Am I looking for Xen? I've tried VirtualBox, but I don't think that's what I want, because it's slow. I'm not trying to run different OS's.

Is there any way of having a linux file system where some files "exist" if you are one user, but don't if you're another user?

Thanks in advance!
 
Old 03-09-2011, 03:33 PM   #2
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
There are ways to accomplish what you're trying to do without involving virtualization.

Rather than trying to make things not exist, you can use the native *nix permissions to provision your system so that only users belonging to certain groups can actually browse, write, or execute the programs you've installed in a certain directory.

Let's say you want to install Program X. Here's a high-level overview of how you could manage those permissions.

1) Create userid xuser and group xgroup. Make xgroup the default group for xuser.
2) Install the product as xuser.
3) Add any specific users you want to access the product to group xgroup.
4) Use the chmod command to set permissions for owner/group/public as desired. For example, if you want group members to be able to run it and non-group members to be completely unable to see it, the permissions would be 750.
 
1 members found this post helpful.
Old 03-10-2011, 01:02 AM   #3
newbienumberabillion
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 0
SL00b, thanks for the reply. I can understand doing what you suggest for one or two programs here or there, but I want to isolate entire ecosystems of large programs and libraries.

Essentially I want `apt-get install _` to only apply to the current user. When I switch users, I want to start with a clean slate, no programs or libraries available to me that other users have installed.
 
Old 03-10-2011, 08:37 AM   #4
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Maybe it would help if you explained what you're trying to accomplish, rather than starting from how. I'm thinking of a few other simple ways to do something like what you're trying to accomplish, but I don't know which ones to recommend because I can't understand why you'd want to do something like this in the first place.
 
Old 03-10-2011, 11:22 AM   #5
newbienumberabillion
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 0
Well for instance, I might want to have an older version of some program available, with older libraries. I would log in to "oldprogramfoo" and be able to just use it straight away. I would log back into my main account and use the latest version.

Or, say I'm experimenting with the differences between sun's java and openjdk. I don't want both installed on my system at the same time. I want to log in to "openjdk user" and "sun jdk user" or whatever.

Or, say I'm doing some development that gets me stuck in dependency hell. I want to "reverse time" to before I installed a bunch of crap. I would much rather just be able to delete a user and all that user's meddling than have to manually try and revert all the changes I've made.

I just want to be able to "start from scratch" or "start from a clean OS" as often and as quickly as possible. Right now that means keeping a clean VirtualBox install always handy. But it's so slow, and the host OS is the same as the guest OS. I feel that's just silly. I don't think I should have to do what I'm doing. There MUST be a better way. I'm just not sure what it is

Thank you for your help though! I can see you know what you're doing.
 
Old 03-10-2011, 03:34 PM   #6
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Well, the angle I'm coming from with isn't so much "log in as the right user" as it is "mount the right filesystem/s."

Virtualization CAN come into the picture here, like this:

1) Set up your virtual machine (VM) environment (don't ask me which one, because I deal with commercial stuff, and commercial = expensive... I think Xen will do what you want, though).

2) Create a virtual disk, attach it to your first virtual server instance, and do a fresh Linux installation.

3) Get everything up and running the way you want it for all of your environments... hardware, networking, user ids, etc.

4) Shut it down and copy it. This becomes your "gold copy." Now you never have to start all over again.

5) Attach your new virtual disk to the virtual server instance, and boot up.

6) Install whatever products you want specific to that copy of the OS.

7) Shutdown, detach storage, copy the gold copy, attach storage, boot, install products, rinse, repeat.

This gives you multiple server images that can be created/discarded/used/switched out at will. All of this assumes you're going to keep your Linux images fairly compact and/or you've got plenty of disk to spare. If you start running into storage issues, one thing you could look at is whether you've got some data files you want to have available across multiple images. Your home directory might be the first thing you want to do this with, but there could be more if you're playing around with databases, etc. You could create a disk for those, and mount it in the mount table for all those images that need it. Thus, you might have Disk0 that contains the system filesystems (root, opt, var, etc, etc.) and Disk1 that contains /home... Disk0 gets swapped out when you want to run another image, but Disk1 gets left alone.

It's possible to do this without a VM layer, but it gets to be a much bigger pain in the ass, so the more often you're going to want to swap out system images, the more you're going to want to virtualize. Another benefit to virtualization is that you can run multiple server instances at once, though this assumes you've got enough hardware to power it all.

To do it without a VM, look at doing the same sort of concept in a multi-boot configuration.
 
1 members found this post helpful.
Old 03-10-2011, 05:51 PM   #7
newbienumberabillion
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for the help, SL00b I looked at Xen, but my cpu doesn't seem to be compatible. I also looked at KVM, but it seems it's mainly for non-graphical servers. The whole virtual machine route is really what I'm trying to move away from (I've been doing VirtualBox), but if it's the only way to go, I guess I have no choice.

Thanks again for the help!
 
Old 03-11-2011, 08:11 AM   #8
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Well, as I said, you can always go multi-boot as another option.

Good luck.
 
1 members found this post helpful.
  


Reply

Tags
filesystem, users, virtual



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
LXer: HP's Virtualization Honcho John Bennett: Rethinking Virtualization LXer Syndicated Linux News 0 09-04-2008 08:40 PM
LXer: SaaS Rapid Release Cycles Drive Virtualization Demand - No Surprise LinuxWorld Launches New Virtualization Track LXer Syndicated Linux News 0 07-16-2007 06:32 PM
How to chown -R don.lab * for don.users Hans Zilles Linux - Newbie 3 11-15-2005 07:53 AM
Suse dontīt boot X; donīt ask for root passwd, YAST donīt work... carrie Linux - Newbie 4 10-08-2004 07:46 AM

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

All times are GMT -5. The time now is 03:46 PM.

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