Skip to content

Commit 13d36f5

Browse files
updated FileNaming wording
1 parent 4712b4c commit 13d36f5

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

articles/virtual-machines/vm-applications.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.service: virtual-machines
55
ms.subservice: gallery
66
ms.topic: conceptual
77
ms.workload: infrastructure
8-
ms.date: 03/28/2023
8+
ms.date: 07/17/2023
99
author: ericd-mst-github
1010
ms.author: nikhilpatel
1111
ms.reviewer: erd
@@ -119,9 +119,20 @@ The install/update/remove commands should be written assuming the application pa
119119

120120
## File naming
121121

122-
When the application file gets downloaded to the VM, the file name is the same as the name you use when you create the VM application. For example, if I name my VM application `myApp`, the file that will be downloaded to the VM will also be named `myApp`, regardless of what the file name is used in the storage account. If your VM application also has a configuration file, that file is the name of the application with `_config` appended. If `myApp` has a configuration file, it will be named `myApp_config`.
122+
When the application file gets downloaded to the VM, it's renamed as "MyVmApp" (no extension). This is because the VM isn't aware of your package's original name or extension. It utilizes the only name it has, which is the application name itself - "MyVmApp".
123123

124-
For example, if I name my VM application `myApp` when I create it in the Gallery, but it's stored as `myApplication.exe` in the storage account, when it gets downloaded to the VM the file name will be `myApp`. My install string should start by renaming the file to be whatever it needs to be to run on the VM (like myApp.exe).
124+
Here are a few alternatives to navigate this issue:
125+
126+
You can modify your script to include a command for renaming the file before execution:
127+
```azurepowershell
128+
move .\\MyVmApp .\\MyApp.exe & MyApp.exe /S
129+
```
130+
You can also use the `packageFileName` (and the corresponding `configFileName`) property to instruct us what to rename your file. For example, setting it to "MyApp.exe" will make your install script only need to be:
131+
```powershell
132+
MyAppe.exe /S
133+
```
134+
> [!TIP]
135+
> If your blob was originally named "myApp.exe" instead of "MyBlob", then the above script would have worked without setting the `packageFileName` property.
125136
126137
The install, update, and remove commands must be written with file naming in mind. The `configFileName` is assigned to the config file for the VM and `packageFileName` is the name assigned downloaded package on the VM. For more information regarding these additional VM settings, refer to [UserArtifactSettings](https://docs.microsoft.com/rest/api/compute/gallery-application-versions/create-or-update?tabs=HTTP#userartifactsettings) in our API docs.
127138

0 commit comments

Comments
 (0)