WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

How to configure shared folders in VMware AppCatalyst?

10.02.2015 by William Lam // Leave a Comment

A widely used feature in VMware's hosted products (Fusion & Workstation) is the shared folders capabilities which allows you to easily share files between the host system and your Virtual Machines. With the latest release of VMware's AppCatalyst TP2, shared folders is now officially supported and can be configured using the AppCatalyst's REST API. Below are the instructions on setting up shared folders for your VMs running in AppCatalyst. Thanks to Fabio for sharing the details.

I will assume that you already have a VM that is running under AppCatalyst. If you do not, you can run the following commands to quickly deploy a new VM called "photon" from the default VMware Photon OS template and retrieve the IP Address assigned to the VM (which we will make use later).

/opt/vmware/appcatalyst/bin/appcatalyst vm create photon
/opt/vmware/appcatalyst/bin/appcatalyst vmpower on photon
/opt/vmware/appcatalyst/bin/appcatalyst guest getip photon

If you have not used AppCatalyst before, be sure to check out this getting started guide here.

Step 1 - Open a terminal and start the AppCatalyst Daemon by running the following command:

/opt/vmware/appcatalyst/bin/appcatalyst-daemon

Step 2 - Open a browser to connect to the following URL https://localhost:8080 to access the REST API explorer provided by Swagger.

Step 3 - Expand the POST /vms/{id}/folders which is the API to configure shared folders for a particular VM. You will need to fill in the id property which specifies the name of the VM and the state property defines the shared folder configuration.

Here is an example for creating a shared folder in the guest called "shared-folder" and mapping that to the host folder under /Users/lamw/Development. The flags property specifies how the folder will be accessed by the VM. Currently, there is only one flag implemented which is "4" and means read/write access. In the future there maybe more flags implemented for different types of access.

{
"guestPath":"shared-folder",
"hostPath":"/Users/lamw/Development",
"flags":4
}

Once you have entered the information into the UI, to execute the API request you just need to click on the "Try it out" button at the bottom. If the operation was successful, you should get back a 200 response from the UI.

Screen Shot 2015-10-02 at 9.33.31 AM
Note: The guestPath property is not actually a path in the VM but rather the name of the directory which will map to the host shared folder.

Step 4 - We can now login to our VM to confirm that the shared folder has been configured. If you are using the default Photon template, you can login by specifying the default SSH keys included with AppCatalyst and the IP Address of the Photon VM we deployed earlier.

Here is the command to login (be sure to replace with the IP Address from your enviornment):

ssh -i /opt/vmware/appcatalyst/etc/appcatalyst_insecure_ssh_key [email protected]

Step 5 - Once logged in, if we now look under /mnt/hgfs directory, we should now see the shared directory automatically created and mapped to the host shared folder we created earlier.

Screen Shot 2015-10-02 at 9.35.13 AM
If you wish to remove shared folders from a VM, you can do so by executing the DELETE /vms/{id}/folders/{folderId} API and specifying the id for both the VM and folder. Hopefully in the future, shared folders can also be easily consumed through the simple AppCatalyst CLI, but for now you can do so using the REST API.

Categories // Apple, Automation, Cloud Native Tags // appcatalyst, cloud native apps, DevOps, Docker, hgfs, Photon, shared folder

Erasing existing disk partitions now available in the vSphere Web Client (vSphere 6.0 Update 1)

09.29.2015 by William Lam // 9 Comments

One of the primary challenges when trying re-purpose existing storage devices is ensuring that all data and existing partitions have been completely removed. Often times, customers end up resorting to third-party tools like GParted which requires you to boot your server into the LiveCD before you can remove the existing partitions. This is less than ideal, especially if you need to perform this operation across multiple systems.

For customers who wish to re-purpose their existing storage devices for other use, including VSAN, there is now a new UI option in the vSphere Web Client introduced in vSphere 6.0 Update 1 to help assist with this procedure. I had not seen anyone talk about this feature yet and figure I would share some details as this is something I have heard customers ask for in the past. You can find this new option (icon with disk and eraser) by clicking onto a specific ESXi host and then selecting the Manage->Storage Adapters and then highlighting the specific storage device you wish to erase as seen in the screenshot below.

erase-disk-partition-in-vsphere-web-client-0
Once the erase partition icon or action is selected, you will then be presented with a summary of the existing partitions on the disk and then prompted to confirm that you wish to delete ALL partitions on the disk.

erase-disk-partition-in-vsphere-web-client-1
After the operation has successfully completed, you can now re-purpose the storage device for other use like VSAN!

For those of you who are interested from an Automation standpoint, this UI operation actually makes use of an existing vSphere API that has been for quite some time called updateDiskPartitions() under the StorageSystem manager of an ESXi host. To erase all partitions, you simply pass in an empty spec to the API method.

In addition, I also want to quickly mention that you will also have the ability to edit and erase existing disk partitions using the ESXi Embedded Host Client Fling which will be available in a future update. Below is a quick screenshot on what that would look like. 

erase-disk-partition-in-vsphere-web-client-2

Categories // Automation, ESXi, VSAN, vSphere Web Client Tags // partition, VSAN, VSAN 6.1, vSphere 6.0 Update 1, vSphere API, vsphere web client, web client

Handy tidbits & workarounds for the VCS to VCSA Migration Fling

09.23.2015 by William Lam //

The VCS (Windows VC) to VCSA Migration Fling has been out for a little over 6 months and the response from customers thus far has simply been phenomenal. We have also received some great feedback (200+ comments) from customers who have tried out the Fling in either a Dev/Test environment and some even in their production environment for those that are a bit more on the adventurous side. I have also had the pleasure in talking to some of these customers who have been successful in migrating off of their Windows vCenter Server (both large and small) and onto the vCenter Server Appliance (VCSA) and sharing additional feedback they may have about the Fling and how we can further improve.

Given the popularity of this topic, I thought it would be useful to aggregate some of the learning's, tidbits and workarounds that have been discovered in the past 6months to help any new or even existing users who might be interested in trying out the Fling. We really do appreciate all the feedback that everyone has given in the various forms and in fact, several of the workarounds were ones provided by our customers. As you know, the Fling today is not currently officially supported, however the feedback has really helped our PM/Engineering team. In fact, you can even get a sneak peak at an early Tech Preview we did at VMworld here to give you an idea on how some of your feedback has influenced a feature that may or may not be out in the near future 😉

Tidbit 1 Microsoft Windows 2012 is currently not supported.
Additional Info There is a known winexe bug which is affects migrating from this specific OS platform.
Workaround Engineering has a fix for this and is currently in the process of testing the fix along with legal review. There is not an ETA due to the review but we hope to release an update to Fling that includes this fix very soon. Stay tuned!This has been resolved with v0.9.1 of the Migration Appliance and for more details please take a look here.
Tidbit 2 Use of non-default (custom) ports on Microsoft SQL Server Database is not supported
Additional Info The Fling currently assumes the SQL Server Database is running on port 1433
Workaround Engineering has a fix for this and is currently in the process of testing the fix along with legal review. There is not an ETA due to the review but we hope to release an update to Fling that includes this fix very soon. Stay tuned!
Tidbit 3 Use of an Embedded Microsoft SQL Server or Microsoft SQL Express Database on the vCenter Server is not supported
Additional Info Since the source Windows vCenter Server must be powered off during the database migration; running the database on the same source vCenter Server is not possible.
Workaround One option is to re-ip the source Windows vCenter Server and ensuring the vCenter Server service is completely disable which would allow the Migration Appliance to communicate with the database. This is not ideal as you are modifying the source Windows vCenter Server but has worked in our testing. Second option that several other customers have recommended instead is to export the vCenter Server Database to a single instance of a Microsoft SQL Server or Microsoft SQL Express and that has worked really well.
Tidbit 4 Clustered database such as Microsoft Clustering Services (MSCS) is not supported
Additional Info There have been issues from some customers when trying to connect to an instance of the vCenter Server Database behind an MSCS Cluster.
Workaround Exporting the vCenter Server Database to a single instance of a Microsoft SQL Server or Microsoft SQL Express and then using the Fling has worked for several customers.
Tidbit 5 Issues connecting to a non-default named instance (e.g. SERVERNAME\VCENTER) of the vCenter Server Database.
Additional Info Some customers have had issues with the connection string to a non-default named instance of the vCenter Server Database during the database migration portion of the Fling.
Workaround A solution that was identified by a customer used the following: http://stackoverflow.com/a/11921896/2668394
Tidbit 6 Upgrade to VCSA 6.0 after migrating from Windows vCenter Server 5.5 to VCSA 5.5 fails
Additional Info You see the following error "Extra sequences: vpx_host_cnx_seq;" in /var/log/vmware/upgrade/vcdb_req.err during the upgrade to VCSA 6.0. These sequences are only found and valid in a Microsoft SQL Server Database and are not relevant in an vPostgres Database and just simply need to be dropped as they are not used at all.
Workaround Login to the VCSA 6.0 appliance as root and run the following command: /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "drop sequence if exists vpx_host_cnx_seq cascade"

If you are running into issues while through the the migration, one thing you can do is login to the Migration Appliance and go to another virtual console (ALT+F2) and view the Migration logs  under /var/log/migrate.log SSH is currently not installed by default. If you wish to pull out the logs for additional support, you can install which will require internet access and you can do so by running the following commands:

sudo apt-get -y update
sudo apt-get -y install openssh-server
sudo /etc/init.d/ssh start

The credentials to the Migration Appliance is vmware/vmware

Lastly, if there are other tidbits or workarounds that you would like to share, feel free to leave a comment and I will get it added to the list.

Categories // VCSA, vSphere 5.5, vSphere 6.0 Tags // fling, migrate2vcsa, migration, vcenter server appliance, VCSA, vcva

  • « Previous Page
  • 1
  • …
  • 336
  • 337
  • 338
  • 339
  • 340
  • …
  • 560
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

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 © 2025

 

Loading Comments...