| 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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-19-2012, 06:17 AM
|
#1
|
|
Member
Registered: Aug 2003
Location: Europe
Distribution: RHEL 6.3, 5.5, Fedora 15, Kubuntu 12.04, Solaris 10,8
Posts: 296
Rep:
|
Accessing /proc from inside a VM
I have access to a Linux virtual machine (KVM).
Is there any way or method of accessing /proc inside the virtual server ? I think that the virtualisation layer gets in the way...
Would be greatful for any pointers.
|
|
|
|
05-19-2012, 09:45 AM
|
#2
|
|
Member
Registered: Jan 2012
Distribution: Slackware
Posts: 690
Rep: 
|
Do you want to access the /proc filesystem on the hypervisor host from the VM, or the other way around? What is it that you want to accomplish?
/proc is a virtual filesystem representing system resources, and the elements in it can be accessed like ordinary files and directories from within that system.
|
|
|
|
05-19-2012, 09:59 AM
|
#3
|
|
Member
Registered: Aug 2003
Location: Europe
Distribution: RHEL 6.3, 5.5, Fedora 15, Kubuntu 12.04, Solaris 10,8
Posts: 296
Original Poster
Rep:
|
Quote:
Originally Posted by Ser Olmy
Do you want to access the /proc filesystem on the hypervisor host from the VM, or the other way around? What is it that you want to accomplish?
|
Hi, I want to access /proc from within the VM. I don't have access to the hypervisor host.
I am using the KVM VM as a development platform to write some scripts which need to access /proc but these scripts will be run on VMware VM's or directly on bare metal Linux boxes.
Quote:
|
/proc is a virtual filesystem representing system resources, and the elements in it can be accessed like ordinary files and directories from within that system.
|
Correct.
I presume that /sys using sysfs also can't be accessed. I think I am chasing a ghost here, what I want to do, does not seem possible.
|
|
|
|
05-19-2012, 10:16 AM
|
#4
|
|
Member
Registered: Jan 2012
Distribution: Slackware
Posts: 690
Rep: 
|
Quote:
Originally Posted by dazdaz
Hi, I want to access /proc from within the VM. I don't have access to the hypervisor host.
|
You can access /proc on the VM, but not /proc on a different host (at least not directly).
Quote:
Originally Posted by dazdaz
I am using the KVM VM as a development platform to write some scripts which need to access /proc but these scripts will be run on VMware VM's or directly on bare metal Linux boxes.
|
If I understand you correctly, you want to test your scripts against the /proc entries on a hypervisor similar to the one they will actually be running on.
The problem is that not only can you not access the /proc filesystem of the hypervisor (or any other system) from within the VM, but the hypervisor environment is different from that of the hypervisor your scripts will be running on. Unless you're accessing both VMware and KVM through middleware like libvirt, it's unlikely that testing in a KVM environment will help. And if you are using libvirt, accessing /proc directly shouldn't really be necessary.
Why don't you get a free version of ESXi to test your scripts against? Or, if testing under KVM really is sufficient, use nested virtualization? (Yes, that actually works.)
|
|
|
1 members found this post helpful.
|
05-20-2012, 11:46 AM
|
#5
|
|
Member
Registered: Dec 2007
Location: Israel
Distribution: RHEL,Fedora
Posts: 716
Rep:
|
if you need to access a filesystem on the hypervisor rfom within a VM, the only way to do that is by running whatever commands you need to remotely. Same as you would execute commands on a remote host. I usually use ssh for that.
VMs should NOT and canNOT access the hypervisor, that's the whole idea, and if they can, it's a major security breach and not a feature.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:24 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|