Open ne0YT opened 1 year ago
I built from sources using "go install" in ubuntu 22.04
when I check cloudconfig in harvester gui it shows the one from the template. and it alos runs it instea dof replacing it and it also doesn't use the vlaues from --disk-size, --cpus, --memory,
the issue also occurs when using the full path to the .yaml -files.
@belgaied2 Hey there :) Just wanted to ask if it's going to happen :)
Hi @ne0YT , sorry for not replying since a long time. I have been very busy with my work, and did not spend time on Harvester CLI. So, it looks like my latest implementations did not work correctly. I will try to reproduce this and let you know.
I think I figured out your issue @ne0YT. You are putting the name of the VM too early. In my case, if I do this:
go run main.go vm create --template ubuntu-template:1 hello-world --disk-size 50Gi -c 4 -m 8Gi
Harvester CLI would completely ignore the --disk-size 50Gi -c 4 -m 8Gi
and would create in my case a VM with 25Gi disk, 2 CPUs and 4 Gi RAM. However, if I run it with
go run main.go vm create --template ubuntu-template:1 --disk-size 50Gi -c 4 -m 8Gi hello-world-2
More information about this, refer to this issue in upstream urfave/cli, which was closed without resolution.
hey there. Thank you, it seems to fix that part but smh I cannot use cloudinit with it rn;
harvester-cli vm create --template ubuntu2204cloudinit --user-data-filepath ./004_ubuntu2204_cloudconfig_Nextcloud.yaml --network-data-filepath ./004_ubuntu2204_cloudconfig_Nextcloud_NETWORK.yaml --disk-size 100Gi -c 12 -m 12Gi nextcloud
WARN[0000] You are using a template flag, please be aware that:
Flags: --disk-size, --cpus, --memory, --user-data-* and --network-data-* will override the template.
Any other flag will be IGNORED!
FATA[0000] admission webhook "virtualmachine-validator.kubevirt.io" denied the request: spec.template.spec.volumes[1].cloudInitNoCloud must have only one userdatasource set., spec.template.spec.volumes[1].cloudInitNoCloud must have only one networkdata source set.
and --namespace only works if the template is in the same namespace too right?
@belgaied2 were you able to use "--user-data-*" yourself?
@belgaied2 did you test the vm migration part?
@belgaied2 hey there will you continue this project, or should I check for another way of interacting using scripts with harvester? maybe you can direct me somewhere :)
I tried to deploy a vm like this:
harvester-cli vm create --template ubuntu2204cloudinit caddy --user-data-filepath 002_ubuntu2204_cloudconfig_CADDY.yaml --network-data-filepath 002_ubuntu2204_cloudconfig_CADDY_NETWORK.yaml
it will always set the hostname "ranchergui" even though I defined "caddy".
I also tried using "--user-data-file". and I also tried using ./002_ubuntu2204_cloudconfig_CADDY.yaml (the files are in the same path as I'm in when running the command)
when I use the yaml-data manually and just paste it in the regaridng fields it works without any problem.