Is the gcloud command suppose to be runnable on a managed VM?

110 views
Skip to first unread message

Ben Wu

unread,
May 1, 2017, 11:48:40 PM5/1/17
to Google App Engine
All gcloud commands fail with "Insufficient Permission" errors when I run them in a managed VM.  It seems since that gcloud command manages VM, it shouldn't be runnable from within the VM, but yet the command is installed on the VM, so I guess it's suppose to be runnable.  I can't find any document saying gcloud is not runnable on managed VM.  Thank you for shedding light on this.

For example:

/home/sharedFolder$ gcloud compute instances list --verbosity=debug
DEBUG: Running gcloud.compute.instances.list with Namespace(_deepest_parser=ArgumentParser(prog='gcloud.compute.ins
tances.list', usage=None, description='List Google Compute Engine virtual machine instances.', version=None, format
ter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), _specified_args={'verbosity'
: '--verbosity'}, account=None, authority_selector=None, authorization_token_file=None, calliope_command=<googleclo
udsdk.calliope.backend.Command object at 0x7f00498ae250>, command_path=['gcloud', 'compute', 'instances', 'list'], 
configuration=None, credential_file_override=None, document=None, filter=None, flatten=None, format=None, h=None, h
elp=None, http_timeout=None, limit=None, log_http=None, names=[], page_size=None, project=None, quiet=None, regexp=
None, sort_by=None, trace_email=None, trace_log=None, trace_token=None, uri=False, user_output_enabled=None, verbos
ity='debug', version=None, zones=[]).
INFO: Display format "
          table(
            name,
            zone.basename(),
            machineType.machine_type().basename(),
            scheduling.preemptible.yesno(yes=true, no=''),
            networkInterfaces[].networkIP.notnull().list():label=INTERNAL_IP,
            networkInterfaces[].accessConfigs[0].natIP.notnull().list()            :label=EXTERNAL_IP,
            status
          )
        ".
DEBUG: (gcloud.compute.instances.list) Some requests did not succeed:
 - Insufficient Permission
Traceback (most recent call last):
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 737, in Execute
    resources = args.calliope_command.Run(cli=self, args=args)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 760, in Run
    display_info=self.ai.display_info).Display()
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/display.py", line 427, in Display
    self._printer.Print(self._resources)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_printer_base.py", line 251, in Print
    for resource in resources:
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/util/peek_iterable.py", line 198, in next
    item = self._NextItem()
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/util/peek_iterable.py", line 174, in _NextItem
    return self._iterable.next()
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/base_classes.py", line 305, in Run
    utils.RaiseToolException(errors)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/utils.py", line 116, in RaiseToolException
    RaiseException(problems, calliope_exceptions.ToolException, error_message)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/utils.py", line 128, in RaiseException
    errors))
ToolException: Some requests did not succeed:
 - Insufficient Permission
ERROR: (gcloud.compute.instances.list) Some requests did not succeed:
 - Insufficient Permission

Justin Beckwith

unread,
May 2, 2017, 1:42:05 PM5/2/17
to google-a...@googlegroups.com
How are you trying to authenticate?  Are you using a service account to log in, or trying to rely on the App Engine service account credentials?

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e61568ee-2f1a-4838-8fab-6a46a1d3e70b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Justin Beckwith | Google Cloud Platform | @justinbeckwith | http://jbeckwith.com
Reply all
Reply to author
Forward
0 new messages