You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-creating-vm-import-cli.adoc
+21-74Lines changed: 21 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,42 +32,7 @@ When the virtual machine (VM) is created, the data volume with the {object} is i
32
32
33
33
.Procedure
34
34
35
-
. If the {data-source} requires authentication, create a `Secret` manifest, specifying the credentials, and save it as a `data-source-secret.yaml` file:
36
-
+
37
-
[source,yaml]
38
-
----
39
-
apiVersion: v1
40
-
kind: Secret
41
-
metadata:
42
-
name: data-source-secret
43
-
labels:
44
-
app: containerized-data-importer
45
-
type: Opaque
46
-
data:
47
-
accessKeyId: "" <1>
48
-
secretKey: "" <2>
49
-
----
50
-
<1> Specify the Base64-encoded key ID or user name.
51
-
<2> Specify the Base64-encoded secret key or password.
52
-
53
-
. Apply the `Secret` manifest by running the following command:
54
-
+
55
-
[source,terminal]
56
-
----
57
-
$ oc apply -f data-source-secret.yaml
58
-
----
59
-
60
-
. If the VM must communicate with servers that use self-signed certificates or certificates that are not signed by the system CA bundle, create a config map in the same namespace as the VM:
61
-
+
62
-
[source,terminal]
63
-
----
64
-
$ oc create configmap tls-certs <1>
65
-
--from-file=</path/to/file/ca.pem> <2>
66
-
----
67
-
<1> Specify the config map name.
68
-
<2> Specify the path to the CA certificate.
69
-
70
-
. Edit the `VirtualMachine` manifest and save it as a `vm-fedora-datavolume.yaml` file:
35
+
. Edit the `VirtualMachine` manifest and save it as a `vm-rhel-datavolume.yaml` file:
<3> Specify the size of the storage requested for the data volume.
134
-
<4> Optional: If you do not specify a storage class, the default storage class is used.
135
-
ifdef::url,container-disks[]
136
-
<5> Specify the URL of the {data-source}.
137
-
endif::[]
138
-
<6> Optional: Specify the secret name if you created a secret for the {data-source} access credentials.
139
-
<7> Optional: Specify a CA certificate config map.
86
+
<4> Optional: Specify the instance type to use to control resource sizing of the VM.
140
87
====
141
88
142
89
. Create the VM by running the following command:
143
90
+
144
91
[source,terminal]
145
92
----
146
-
$ oc create -f vm-fedora-datavolume.yaml
93
+
$ oc create -f vm-rhel-datavolume.yaml
147
94
----
148
95
+
149
96
The `oc create` command creates the data volume and the VM. The CDI controller creates an underlying PVC with the correct annotation and the import process begins. When the import is complete, the data volume status changes to `Succeeded`. You can start the VM.
@@ -163,15 +110,15 @@ $ oc get pods
163
110
+
164
111
[source,terminal]
165
112
----
166
-
$ oc describe dv fedora-dv <1>
113
+
$ oc describe dv rhel-dv <1>
167
114
----
168
115
<1> Specify the data volume name that you defined in the `VirtualMachine` manifest.
169
116
170
117
. Verify that provisioning is complete and that the VM has started by accessing its serial console:
0 commit comments