@@ -182,7 +182,8 @@ func (c *cmdLaunch) launch(app string, instanceName string) error {
182
182
}
183
183
}
184
184
}
185
-
185
+ launchSettings .Image = "images:" + application .InstallMethods [0 ].Resources .Image ()
186
+ log .Info ("Selected image" , "image" , launchSettings .Image )
186
187
if advanced {
187
188
188
189
// select install method
@@ -195,8 +196,8 @@ func (c *cmdLaunch) launch(app string, instanceName string) error {
195
196
huh .NewSelect [int ]().
196
197
Title ("Choose OS Option" ).
197
198
Options (
198
- huh .NewOption (application .InstallMethods [0 ].Resources .OS , 0 ),
199
- huh .NewOption (application .InstallMethods [1 ].Resources .OS , 1 ),
199
+ huh .NewOption (application .InstallMethods [0 ].Resources .GetOS () , 0 ),
200
+ huh .NewOption (application .InstallMethods [1 ].Resources .GetOS () , 1 ),
200
201
).
201
202
Value (& installMethod ),
202
203
),
@@ -486,10 +487,10 @@ func (c *cmdLaunch) launch(app string, instanceName string) error {
486
487
extraConfigs ["environment.APPLICATION" ] = application .Name
487
488
488
489
// OS Type
489
- extraConfigs ["environment.PCT_OSTYPE" ] = application .InstallMethods [launchSettings .InstallMethod ].Resources .OS
490
+ extraConfigs ["environment.PCT_OSTYPE" ] = application .InstallMethods [launchSettings .InstallMethod ].Resources .GetOS ()
490
491
491
492
// OS Version
492
- extraConfigs ["environment.PCT_OSVERSION" ] = application .InstallMethods [launchSettings .InstallMethod ].Resources .Version
493
+ extraConfigs ["environment.PCT_OSVERSION" ] = application .InstallMethods [launchSettings .InstallMethod ].Resources .GetVersion ()
493
494
494
495
// tz
495
496
extraConfigs ["environment.tz" ] = "Etc/UTC"
@@ -501,7 +502,7 @@ func (c *cmdLaunch) launch(app string, instanceName string) error {
501
502
// Disable ipv6
502
503
extraConfigs ["environment.DISABLEIPV6" ] = "yes" // todo: make this a form option
503
504
504
- if disableSecureBoot (application .InstallMethods [launchSettings .InstallMethod ].Resources .OS ) {
505
+ if disableSecureBoot (application .InstallMethods [launchSettings .InstallMethod ].Resources .GetOS () ) {
505
506
launchSettings .VMSecureBoot = false
506
507
}
507
508
@@ -516,7 +517,7 @@ func (c *cmdLaunch) launch(app string, instanceName string) error {
516
517
}
517
518
518
519
var funcScript []byte
519
- if application .InstallMethods [launchSettings .InstallMethod ].Resources .OS == "alpine" {
520
+ if application .InstallMethods [launchSettings .InstallMethod ].Resources .GetOS () == "alpine" {
520
521
funcScript , err = downloadRaw (repository , "misc" , "alpine-install.func" )
521
522
if err != nil {
522
523
fmt .Println ("download error:" , err )
@@ -533,6 +534,8 @@ func (c *cmdLaunch) launch(app string, instanceName string) error {
533
534
//extraConfigs["environment.FUNCTIONS_FILE_PATH"] = string(funcScript)
534
535
535
536
extraConfigs ["environment.FUNCTIONS_FILE_PATH" ] = "/install.func"
537
+ log .Info ("Preparing image" , "image" , launchSettings .Image )
538
+
536
539
createInstance := func () {
537
540
// create the instance
538
541
err := c .global .client .Launch (launchSettings .Image , launchSettings .Name , launchSettings .Profiles , extraConfigs , deviceOverrides , launchSettings .Network , launchSettings .VM , false )
0 commit comments