From 4b928c0e6ffc7b8be3379b63f795cf23a3451398 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Mon, 13 Nov 2023 06:34:13 +0000 Subject: [PATCH] vm: fix hostname regression for other profiles. --- cmd/start.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/start.go b/cmd/start.go index c4a3836ca..408fb1a9b 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -140,7 +140,6 @@ var startCmdArgs struct { func init() { runtimes := strings.Join(environment.ContainerRuntimes(), ", ") defaultArch := string(environment.HostArch()) - defaultHostname := config.CurrentProfile().ID mounts := strings.Join([]string{defaultMountTypeQEMU, "9p", "virtiofs"}, ", ") types := strings.Join([]string{defaultVMType, "vz"}, ", ") @@ -154,7 +153,7 @@ func init() { startCmd.Flags().IntVarP(&startCmdArgs.Disk, "disk", "d", defaultDisk, "disk size in GiB") startCmd.Flags().StringVarP(&startCmdArgs.Arch, "arch", "a", defaultArch, "architecture (aarch64, x86_64)") startCmd.Flags().BoolVarP(&startCmdArgs.Flags.Foreground, "foreground", "f", false, "Keep colima in the foreground") - startCmd.Flags().StringVar(&startCmdArgs.Hostname, "hostname", defaultHostname, "custom hostname for the virtual machine") + startCmd.Flags().StringVar(&startCmdArgs.Hostname, "hostname", "", "custom hostname for the virtual machine") // network if util.MacOS() {