Adding files to ADSF Path for bootstrapping | Nutanix Community
Skip to main content

When creating a vm there is a scripting section that has the option to select a file from an ADSF Path.  How can I put files to an ADSF location?

Hello @MrMike 

Are you talking about clone from ADSF option?


No I am talking about the custom script option.

 



You need to upload file to a Nutanix container. This could be done through WinSCP or you can mount the container at an external site and copy the files there. 

The CVM command nfs_ls can be used to list AHV container contents and help determine the files inside the container. 

The following document provides more info on creating VM with some examples 
https://portal.nutanix.com/page/documents/details/?targetId=Web-Console-Guide-Prism-v5_16:wc-vm-create-acropolis-wc-t.html

Scenario 3 in the KB-2622 might help you in transferring files to the container. 


Ok that makes sense.  I should create the directory to use in the cluster container and not the /NutanixManagementShare or the /SelfServiceContainer correct?


Hello @MrMike 
Yes, you should create the directory inside a container. 
NutanixManagementShare and SelfService container are internal Nutanix container, and shouldn’t be modified. 
 


@HITESH0801  When making that new directory in the cluster container,  how should I set the  folder permissions?  Do I just need to mirror what is on the parent directory or do I need to do something else? 

 


@HITESH0801 I think I have the permissions correct now because I was able to copy the unattend.xml file to the share and successfully deploy.  I want to copy additional files though.  The use case would be, a powershell script and required dependencies that would be copied and then called by the unattend.xml file or via a startup folder.  I can not seem to get anything to copy under the “Specify external files to copy inside the guest VM.” section. I am able to select the source adsf path and file i.e I start out with / and it populates the container etc all the way the file.  I have tried to just copy to the root of c.  I have tried C:\test.txt, Just C:\.  I have also tried / and /text.txt. What is the correct syntax to get this to work?


This feature works differently between Linux and Windows.  In windows it only adds the files to a cd drive that also includes an autounattend.xml file.  The correct syntax for the destination is in unix format i.e if you want your file on the root of the disk you would prefix it with a / i.e /somescriptiwanttorun.cmd. or /somefolder/somescript.cmd.  It will then come up as an E drive with the folder structure.  You can call that location in your unattend file.  If for some reason your vm config uses a different drive i.e you are using some clone with many drives, you would need to make a script that identifies the drive.  i.e 

$payloadDrive = (Get-WmiObject Win32_LogicalDisk -Filter "VolumeName='cidata'").DeviceID