mirror of
https://github.com/linka-cloud/d2vm.git
synced 2026-01-24 02:25:04 +00:00
feat: add --hostname flag to customize the vm hostname
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -34,6 +34,8 @@ type convertOptions struct {
|
||||
keepCache bool
|
||||
platform string
|
||||
pull bool
|
||||
|
||||
hostname string
|
||||
}
|
||||
|
||||
func (o *convertOptions) hasGrubBIOS() bool {
|
||||
@@ -127,3 +129,9 @@ func WithPull(b bool) ConvertOption {
|
||||
o.pull = b
|
||||
}
|
||||
}
|
||||
|
||||
func WithHostname(hostname string) ConvertOption {
|
||||
return func(o *convertOptions) {
|
||||
o.hostname = hostname
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user