Skip to content

Commit ae3c420

Browse files
Merge pull request #245181 from ericd-mst-github/erd-vm-applications-how-to
updated FileNaming wording
2 parents c5970c6 + b0aadcc commit ae3c420

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

articles/virtual-machines/vm-applications.md

Lines changed: 14 additions & 4 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: 04/12/2023
8+
ms.date: 07/17/2023
99
author: ericd-mst-github
1010
ms.author: nikhilpatel
1111
ms.reviewer: erd
@@ -111,11 +111,21 @@ The install/update/remove commands should be written assuming the application pa
111111

112112
## File naming
113113

114-
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 is downloaded to the VM is also 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's named `myApp_config`.
114+
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".
115115

116-
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 is `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`).
116+
Here are a few alternatives to navigate this issue:
117+
118+
You can modify your script to include a command for renaming the file before execution:
119+
```azurepowershell
120+
move .\\MyVmApp .\\MyApp.exe & MyApp.exe /S
121+
```
122+
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:
123+
```powershell
124+
MyAppe.exe /S
125+
```
126+
> [!TIP]
127+
> If your blob was originally named "myApp.exe" instead of "MyBlob", then the above script would have worked without setting the `packageFileName` property.
117128
118-
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 other VM settings, see [UserArtifactSettings](/rest/api/compute/gallery-application-versions/create-or-update?tabs=HTTP#userartifactsettings) in our API docs.
119129

120130
## Command interpreter
121131

0 commit comments

Comments
 (0)