adamant-kite-43734
06/27/2023, 7:37 PMhundreds-battery-84841
06/27/2023, 7:49 PMhundreds-battery-84841
06/27/2023, 7:51 PMhundreds-battery-84841
06/27/2023, 7:53 PMapiVersion: v1
kind: PersistentVolume
metadata:
name: pv-iso-win2k19
spec:
storageClassName: local-path
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /the/folder/path
Replace /the/folder/path with the actual path on the host where you want to store the iso.hundreds-battery-84841
06/27/2023, 7:54 PMhundreds-battery-84841
06/27/2023, 7:54 PMhundreds-battery-84841
06/27/2023, 7:55 PMhundreds-battery-84841
06/27/2023, 8:02 PMjolly-waitress-71272
06/27/2023, 8:03 PM# virtctl image-upload --image-path windows_server_2019.iso --pvc-name iso-win2k19 --access-mode ReadWriteOnce --pvc-size 10G --uploadproxy-url 10.43.65.246:443 --insecure --wait-secs=240
Flag --pvc-name has been deprecated, specify the name as the second argument instead.
Flag --pvc-size has been deprecated, use --size instead.
Using existing PVC default/iso-win2k19
Waiting for PVC iso-win2k19 upload pod to be ready...
timed out waiting for the condition
I appreciate the advice to create a pv, but I think something in this CDI is supposed to do that maybe?hundreds-battery-84841
06/27/2023, 8:04 PMhundreds-battery-84841
06/27/2023, 8:05 PMjolly-waitress-71272
06/27/2023, 8:05 PM# kubectl logs -n cdi cdi_pod
Error from server (NotFound): pods "cdi_pod" not found
hundreds-battery-84841
06/27/2023, 8:06 PMhundreds-battery-84841
06/27/2023, 8:06 PMjolly-waitress-71272
06/27/2023, 8:06 PMjolly-waitress-71272
06/27/2023, 8:06 PM# kubectl get pods -n cdi
NAME READY STATUS RESTARTS AGE
cdi-operator-7c58b4f8c8-ngdhw 1/1 Running 0 93m
cdi-apiserver-57d47bc55d-bndpt 1/1 Running 0 92m
cdi-uploadproxy-5b5cc54d48-vzrkf 1/1 Running 0 92m
cdi-deployment-69d44b67b5-6pfjg 1/1 Running 0 92m
hundreds-battery-84841
06/27/2023, 8:07 PMvirtctl image-upload windows_server_2019.iso iso-win2k19 --access-mode ReadWriteOnce --size 10G --uploadproxy-url 10.43.65.246:443 --insecure --wait-secs=240
Make sure to replace the windows_server_2019.iso with the correct path to your iso.hundreds-battery-84841
06/27/2023, 8:07 PMjolly-waitress-71272
06/27/2023, 8:07 PMjolly-waitress-71272
06/27/2023, 8:08 PM# kubectl logs -n cdi cdi-uploadproxy-5b5cc54d48-vzrkf
I0627 18:34:05.700348 1 uploadproxy.go:64] Note: increase the -v level in the api deployment for more detailed logging, eg. -v=2 or -v=3
W0627 18:34:05.700561 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0627 18:34:06.801816 1 certwatcher.go:125] Updated current TLS certificate
I0627 18:34:06.802161 1 certwatcher.go:81] Starting certificate watcher
jolly-waitress-71272
06/27/2023, 8:09 PM# kubectl logs -n cdi cdi-deployment-69d44b67b5-6pfjg
{"level":"debug","ts":1687892069.9512436,"logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":"default/iso-win2k19","annotation":"<http://k8s.io/CloneRequest|k8s.io/CloneRequest>"}
{"level":"debug","ts":1687892069.951248,"logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":"default/iso-win2k19","annotation":"<http://k8s.io/CloneRequest|k8s.io/CloneRequest>"}
{"level":"debug","ts":1687892069.9512522,"logger":"controller.clone-controller","msg":"PVC not bound, skipping pvc","PVC":"default/iso-win2k19","Phase":"Pending"}
{"level":"debug","ts":1687892069.9512594,"logger":"controller.clone-controller","msg":"Should not reconcile this PVC","PVC":"default/iso-win2k19","checkPVC(AnnCloneRequest)":false,"NOT has annotation(AnnCloneOf)":true,"isBound":false,"has finalizer?":false}
{"level":"debug","ts":1687892069.9512548,"logger":"controller.upload-controller","msg":"PVC not bound, skipping pvc","PVC":"default/iso-win2k19","Phase":"Pending"}
{"level":"debug","ts":1687892069.9512773,"logger":"controller.upload-controller","msg":"PVC not bound, skipping pvc","PVC":"default/iso-win2k19","Phase":"Pending"}
{"level":"debug","ts":1687892069.9512832,"logger":"controller.upload-controller","msg":"not doing anything with PVC","PVC":"default/iso-win2k19","isUpload":true,"isCloneTarget":false,"isBound":false,"podSucceededFromPVC":false,"deletionTimeStamp set?":false}
{"level":"debug","ts":1687892069.9511857,"logger":"controller.import-controller","msg":"PVC not bound, skipping pvc","PVC":"default/iso-win2k19","Phase":"Pending"}
hundreds-battery-84841
06/27/2023, 8:09 PMhundreds-battery-84841
06/27/2023, 8:13 PMhundreds-battery-84841
06/27/2023, 8:14 PMhundreds-battery-84841
06/27/2023, 8:15 PMjolly-waitress-71272
06/27/2023, 8:16 PMhundreds-battery-84841
06/27/2023, 8:17 PMhundreds-battery-84841
06/27/2023, 8:18 PMjolly-waitress-71272
06/27/2023, 8:19 PMhundreds-battery-84841
06/27/2023, 8:20 PMjolly-waitress-71272
06/27/2023, 8:20 PM# kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
local-path (default) <http://rancher.io/local-path|rancher.io/local-path> Delete WaitForFirstConsumer false 25d
hundreds-battery-84841
06/27/2023, 8:21 PMjolly-waitress-71272
06/27/2023, 8:23 PMpath: /the/folder/path
hundreds-battery-84841
06/27/2023, 8:24 PMhundreds-battery-84841
06/27/2023, 8:26 PMhundreds-battery-84841
06/27/2023, 9:44 PMjolly-waitress-71272
06/27/2023, 9:45 PMjolly-waitress-71272
06/27/2023, 9:45 PMhundreds-battery-84841
06/27/2023, 9:47 PMjolly-waitress-71272
06/27/2023, 9:47 PMjolly-waitress-71272
06/27/2023, 9:48 PMhundreds-battery-84841
06/27/2023, 9:49 PMjolly-waitress-71272
06/27/2023, 9:50 PMjolly-waitress-71272
06/27/2023, 9:50 PMhundreds-battery-84841
06/27/2023, 9:50 PMjolly-waitress-71272
06/27/2023, 9:54 PMBut most local storage is WFFC, and if you have multiple nodes you want the scheduler to decide which node the volume ends up on, not the scheduler for CDI. since the requirements for the VM are wildly different than CDI
With the --force-bind you say I don't care, just put it somewhere
which if you have a single node works just fine since there only one node
try with the force-bind, that essentially adds an annotation to the pvc that tells cdi just populate it. But if it uses an existing PVC it won't mess with the annotations.
Which ultimately worked:
# virtctl image-upload --image-path windows_server_2019.iso --pvc-name iso-win2k19 --access-mode ReadWriteOnce --pvc-size 10G --uploadproxy-url <https://10.43.65.246> --insecure --wait-secs=240 --force-bind
Flag --pvc-name has been deprecated, specify the name as the second argument instead.
Flag --pvc-size has been deprecated, use --size instead.
Using existing PVC default/iso-win2k19
Uploading data to <https://10.43.65.246>
5.26 GiB / 5.26 GiB [================================================================================================================================================================================] 100.00% 19s
Uploading data completed successfully, waiting for processing to complete, you can hit ctrl-c without interrupting the progress
Processing completed successfully
Uploading windows_server_2019.iso completed successfully
hundreds-battery-84841
06/27/2023, 9:55 PMjolly-waitress-71272
06/27/2023, 9:56 PMhundreds-battery-84841
06/27/2023, 9:58 PMjolly-waitress-71272
06/27/2023, 9:58 PM