Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:41:40+00:00 2026-06-18T11:41:40+00:00

Trying and trying to do something very simple in fog 1.9 with the vsphere

  • 0

Trying and trying to do something very simple in fog 1.9 with the vsphere provider. The examples in the little documentation there is not working for me.

I want to list all VMs in a folder. Simple eh?

Tried…

credentials = {
    :provider => "vsphere",
    :vsphere_username => user,
    :vsphere_password=> pass,
    :vsphere_server => "vc_name",
    :vsphere_ssl    => true,
    :vsphere_expected_pubkey_hash => "1466f20c1b3f990a2a018dc2ca22a79fc2d0284ab4aac534c47blah"
}

compute = Fog::Compute.new(credentials)
vms = compute.servers.all('folder' => '/Datacenters/Ewl/Self-Service')

pp vms

This connects and churns away and RETURNS ALL VMs IN THE DATACENTER and not just the folder. Grr.

I’ve tried lots of variations on the folder variable e.g.

vms = compute.servers.all('folder' => '/Hosts & Clusters/Ewl1_vm/Self-Service')
vms = compute.servers.all('folder' => 'Self-Service')
vms = compute.servers.all('folder' => 'Self-Service','datacenter' => 'Ewl')

But all do the same thing.

I’ve worked through the code and it’s not helped me really.

Help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:41:42+00:00Added an answer on June 18, 2026 at 11:41 am

    If I’m understanding what your datacenter and folder name are, then the simple way to do this is:

    vms = compute.list_virtual_machines(datacenter: 'Ewl', folder: 'Self-Service')
    

    ‘folder’ in the .servers.all filter hypothetically should work, but you are bound to find surprises with hidden paths, more than 1 datacenter, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to do something very simple but it's not working for me.
I am trying to do something very simple. I want to display an image
I am trying to do something very simple. I want to display the video
I'm trying something very simple: MYPATH=/path/I/want/to/go/to/ ... cd $MYPATH No good. I've tried various
I'm trying to do something very simple. All I want to do at this
I am trying something very simple, but for some reason it does not work.
I'm working on osmdroid, and trying to do something very simple, that i used
I'm trying to do something very simple: Clone a repository. The documentation here: http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository
I'm trying something very simple. Upon page load the data in content div is
I'm trying to do something very simple, yet I can't seem to find the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.