WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / How to change/deploy VCSA 6.0 with default bash shell vs appliancesh?

How to change/deploy VCSA 6.0 with default bash shell vs appliancesh?

03.06.2015 by William Lam // 10 Comments

When logging into the new VCSA 6.0 via SSH, you will notice that you are no longer dropped into a normal bash shell but into a new appliancesh (pronounced appliance shell) environment. This new interface provides basic set of virtual appliance management capabilities including Ruby vSphere Console (RVC) access which makes the majority of operations convenient to a vSphere Administrator but it also helps restrict unnecessary access to the underlying filesystem which can be helpful from a security standpoint.

If you need to access the underlying filesystem, you can temporarily enable it by running the following two commands:

shell.set --enabled True
shell

applianceshell-default-bash
If you need to transfer files to/from the VCSA via SCP/WinSCP, you will need to change the default shell from /bin/appliancesh to /bin/bash else the operation will fail. You can easily do this by using the chsh command:

chsh -s "/bin/bash" root

If you rather have the BASH shell configured as the default after deployment and not have to go through this manual process each time, you can actually configured using the following hidden option called guestinfo.cis.appliance.root.shell

This property allows you to specify the default shell for the "root" account and you can only modify this if you deploy the VCSA using ovftool. Here is the parameter you would append to the ovftool argument list:

--prop:guestinfo.cis.appliance.root.shell="/bin/bash"

You can leverage this new property and automate the deployment of the new VCSA 6.0 and for more details be sure to check out my VCSA 6.0 Automation Series.

More from my site

  • VCSA 6.5 CLI Installer now supports new ovftool argument pass-through feature
  • How to remotely run appliancesh & other shell commands on VCSA w/o requiring SSH?
  • How to deploy vSphere 6.0 (VCSA & ESXi) on vCloud Director and vCloud Air?
  • Ultimate automation guide to deploying VCSA 6.0 Part 4: vCenter Server Management Node
  • Ultimate automation guide to deploying VCSA 6.0 Part 3: Replicated Platform Service Controller Node

Categories // Automation, OVFTool, VCSA, vSphere 6.0 Tags // appliancesh, guestinfo, ovftool, vcsa, vcva, vSphere 6.0

Comments

  1. ysrathore says

    03/09/2015 at 12:37 am

    Thanks for the tip. File copy is required sooner or later in most production environments.

    Reply
  2. B1982 says

    05/05/2015 at 8:06 pm

    Thanks for the info, I have deployed vcenter 6.0 using the vcsa deployment tool and JSON configuration file as part of an automated installation. But setting the default command prompt to bash is a manual step I would like to avoid... Is there any way this can be configured in PowerCLI and or as part of the JSON file?

    Reply
  3. Robin says

    03/07/2016 at 11:59 am

    Despite enabling bash, I simply get "-bash: shell.set: command not found". Dumbfounded! Help much appreciated.

    Reply
    • Brian Simon says

      03/23/2016 at 5:09 am

      Same error for me as well.

      Reply
  4. ally104 says

    06/01/2016 at 2:07 pm

    Hello William,

    Thanks for this great share (as usual :)) Any idea of how we can integrate that to the JSON config file for automated deployment?
    Also, is there any way of running scripts/command remotely to the VCSA (either via putty or plink) to move to the /bin/bash?
    I need to run some commands remotely (change timezone, add to an AD domain etc)

    Thanks

    Ally

    Reply
    • William Lam says

      06/01/2016 at 2:50 pm

      Hi Ally,

      This particular configuration is not part of the JSON. if you need to make some configuration changes, you can do so using appliancesh command which can be automated. Have a look at this article http://www.virtuallyghetto.com/2016/02/how-to-remotely-run-appliancesh-other-shell-commands-on-vcsa-wo-requiring-ssh.html which does not rely on SSH or having default shell change

      Reply
      • Ally104 says

        06/02/2016 at 12:48 am

        Hello William,

        Thanks for the reply. I'll and give you some news 🙂

        Ally

        Reply
  5. mor says

    03/09/2017 at 4:33 am

    "and you can only modify this if you deploy the VCSA using ovftool"
    i have automated installation without ovftool. there is anpther way to modify "guestinfo.cis.appliance.root.shell"?

    Reply
    • William Lam says

      03/09/2017 at 6:37 am

      Well, the other option is to basically add it as a VM Advanced Setting using the vSphere API (do this prior to powering on the VM) and you'll get the same result

      Reply
  6. James m says

    02/13/2018 at 4:58 pm

    The chsh command asks fixes authentication errors when using plink.exe so thanks for that.

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit 03/29/2023
  • ESXi configstorecli enhancement in vSphere 8.0 Update 1 03/28/2023
  • ESXi on Intel NUC 13 Pro (Arena Canyon) 03/27/2023
  • Quick Tip - Enabling ESXi Coredumps to be stored on USB 03/26/2023
  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...