Merge "KubeVirt Doc changes (r8, dsr8)"
This commit is contained in:
commit
d6cdafd8ae
@ -43,7 +43,7 @@ The example uses:
|
|||||||
#. Create a new Data Network of type 'vlan' for SRIOV interfaces to be used
|
#. Create a new Data Network of type 'vlan' for SRIOV interfaces to be used
|
||||||
by your KubeVirt |VMs|.
|
by your KubeVirt |VMs|.
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
~(keystone_admin)$ system datanetwork-add kube-sriov vlan
|
~(keystone_admin)$ system datanetwork-add kube-sriov vlan
|
||||||
|
|
||||||
@ -54,12 +54,12 @@ The example uses:
|
|||||||
compute-1's enp24s0f0 ethernet interface
|
compute-1's enp24s0f0 ethernet interface
|
||||||
|
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
~(keystone_admin)$ system host-if-modify -n sriov0 -c pci-sriov -N 64 --vf-driver vfio compute-1 enp24s0f0
|
~(keystone_admin)$ system host-if-modify -n sriov0 -c pci-sriov -N 64 --vf-driver vfio compute-1 enp24s0f0
|
||||||
~(keystone_admin)$ system interface-datanetwork-assign compute-1 sriov0 kube-sriov
|
~(keystone_admin)$ system interface-datanetwork-assign compute-1 sriov0 kube-sriov
|
||||||
|
|
||||||
|
|
||||||
#. Create a ``NetworkAttachmentDefinition`` in Kubernetes to point to the new
|
#. Create a ``NetworkAttachmentDefinition`` in Kubernetes to point to the new
|
||||||
Data Network and specify a particular vlan-id to use within that Data
|
Data Network and specify a particular vlan-id to use within that Data
|
||||||
Network.
|
Network.
|
||||||
@ -75,10 +75,10 @@ The example uses:
|
|||||||
data network name, if any, converted to underscores).
|
data network name, if any, converted to underscores).
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
$ cat <<EOF > 186-subnet.yaml
|
$ cat <<EOF > 186-subnet.yaml
|
||||||
apiVersion: "k8s.cni.cncf.io/v1"
|
apiVersion: "k8s.cni.cncf.io/v1"
|
||||||
kind: NetworkAttachmentDefinition
|
kind: NetworkAttachmentDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: 186-subnet
|
name: 186-subnet
|
||||||
namespace: stx-lab
|
namespace: stx-lab
|
||||||
@ -115,12 +115,12 @@ The example uses:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
$ cat <<EOF > stx-lab-ubuntu-test-vm.yaml
|
$ cat <<EOF > stx-lab-ubuntu-test.yaml
|
||||||
apiVersion: kubevirt.io/v1alpha3
|
apiVersion: kubevirt.io/v1alpha3
|
||||||
kind: VirtualMachine
|
kind: VirtualMachine
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
kubevirt.io/vm: stx-lab-ubuntu-test
|
kubevirt.io/vm: stx-lab-ubuntu-test
|
||||||
name: stx-lab-ubuntu-test
|
name: stx-lab-ubuntu-test
|
||||||
namespace: stx-lab
|
namespace: stx-lab
|
||||||
spec:
|
spec:
|
||||||
@ -138,7 +138,7 @@ The example uses:
|
|||||||
name: myrootdisk
|
name: myrootdisk
|
||||||
- disk:
|
- disk:
|
||||||
bus: virtio
|
bus: virtio
|
||||||
name: cloudinitdisk
|
name: cloudinitdisk
|
||||||
interfaces:
|
interfaces:
|
||||||
- masquerade: {}
|
- masquerade: {}
|
||||||
name: default
|
name: default
|
||||||
@ -148,7 +148,7 @@ The example uses:
|
|||||||
type: ""
|
type: ""
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 8
|
cpu: 8
|
||||||
memory: 16Gi
|
memory: 16Gi
|
||||||
networks:
|
networks:
|
||||||
- name: default
|
- name: default
|
||||||
@ -162,12 +162,12 @@ The example uses:
|
|||||||
dataVolume:
|
dataVolume:
|
||||||
name: stx-lab-ubuntu-test-disk
|
name: stx-lab-ubuntu-test-disk
|
||||||
- cloudInitNoCloud:
|
- cloudInitNoCloud:
|
||||||
userData: |-
|
userData: |-
|
||||||
#cloud-config
|
#cloud-config
|
||||||
user: jenkins
|
user: jenkins
|
||||||
password: myP@ssw0rd
|
password: myP@ssw0rd
|
||||||
chpasswd: { expire: False }
|
chpasswd: { expire: False }
|
||||||
ssh_pwauth: True
|
ssh_pwauth: True
|
||||||
name: cloudinitdisk
|
name: cloudinitdisk
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -175,17 +175,17 @@ The example uses:
|
|||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
$ kubectl apply -f stx-lab-ubuntu-test-vm.yaml
|
$ kubectl apply -f stx-lab-ubuntu-test.yaml
|
||||||
|
|
||||||
#. Connect to console and configure |VM| and the |VM|'s interface on the
|
#. Connect to console and configure |VM| and the |VM|'s interface on the
|
||||||
10.10.186.0/24 network.
|
10.10.186.0/24 network.
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
$ virtctl -n stx-lab console stx-lab-ubuntu-test-vm
|
$ virtctl -n stx-lab console stx-lab-ubuntu-test
|
||||||
Successfully connected to stx-lab-ubuntu-test console. The escape sequence is ^]4
|
Successfully connected to stx-lab-ubuntu-test console. The escape sequence is ^]4
|
||||||
|
|
||||||
stx-lab-ubuntu-test login: jenkins
|
stx-lab-ubuntu-test login: jenkins
|
||||||
Password:
|
Password:
|
||||||
Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-39-generic x86_64)
|
Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-39-generic x86_64)
|
||||||
|
|
||||||
@ -194,9 +194,9 @@ The example uses:
|
|||||||
* Support: https://ubuntu.com/advantage
|
* Support: https://ubuntu.com/advantage
|
||||||
|
|
||||||
System information as of Thu Dec 8 16:55:12 UTC 2022
|
System information as of Thu Dec 8 16:55:12 UTC 2022
|
||||||
|
|
||||||
System information as of Thu Dec 8 16:55:12 UTC 2022
|
System information as of Thu Dec 8 16:55:12 UTC 2022
|
||||||
|
|
||||||
System load: 0.2587890625 Processes: 178
|
System load: 0.2587890625 Processes: 178
|
||||||
Usage of /: 0.3% of 476.62GB Users logged in: 0
|
Usage of /: 0.3% of 476.62GB Users logged in: 0
|
||||||
Memory usage: 1% IPv4 address for enp1s0: 10.0.2.2
|
Memory usage: 1% IPv4 address for enp1s0: 10.0.2.2
|
||||||
@ -207,7 +207,7 @@ The example uses:
|
|||||||
...
|
...
|
||||||
|
|
||||||
#. Still in the |VM| console, list the interfaces.
|
#. Still in the |VM| console, list the interfaces.
|
||||||
|
|
||||||
Note that this |VM| has 2x interfaces.
|
Note that this |VM| has 2x interfaces.
|
||||||
|
|
||||||
* enp1s0 is the default container |CNI| interface
|
* enp1s0 is the default container |CNI| interface
|
||||||
@ -260,15 +260,15 @@ The example uses:
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ sudo su -
|
$ sudo su -
|
||||||
|
|
||||||
$ cat <<EOF > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
|
$ cat <<EOF > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
|
||||||
network: {config: disabled}
|
network: {config: disabled}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Update /etc/netplan/50-cloud-init.yaml as shown below.
|
# Update /etc/netplan/50-cloud-init.yaml as shown below.
|
||||||
|
|
||||||
$ vi /etc/netplan/50-cloud-init.yaml
|
$ vi /etc/netplan/50-cloud-init.yaml
|
||||||
|
|
||||||
network:
|
network:
|
||||||
ethernets:
|
ethernets:
|
||||||
# enp1s0:
|
# enp1s0:
|
||||||
@ -306,7 +306,7 @@ The example uses:
|
|||||||
2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|
2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|
||||||
link/ether 52:54:00:41:84:a0 brd ff:ff:ff:ff:ff:ff
|
link/ether 52:54:00:41:84:a0 brd ff:ff:ff:ff:ff:ff
|
||||||
3: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
|
3: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
|
||||||
link/ether 46:c5:53:3b:b3:b3 brd ff:ff:ff:ff:ff:ff
|
link/ether 46:c5:53:3b:b3:b3 brd ff:ff:ff:ff:ff:ff
|
||||||
|
|
||||||
jenkins@stx-lab-ubuntu-test:~$ ip addr
|
jenkins@stx-lab-ubuntu-test:~$ ip addr
|
||||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
|
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
|
||||||
@ -328,7 +328,7 @@ The example uses:
|
|||||||
|
|
||||||
jenkins@stx-lab-ubuntu-test:~$ ip route
|
jenkins@stx-lab-ubuntu-test:~$ ip route
|
||||||
default via 10.10.186.1 dev enp6s0 proto static
|
default via 10.10.186.1 dev enp6s0 proto static
|
||||||
10.10.186.0/24 dev enp6s0 proto kernel scope link src 10.10.186.97
|
10.10.186.0/24 dev enp6s0 proto kernel scope link src 10.10.186.97
|
||||||
|
|
||||||
#. Connect from a remote workstation.
|
#. Connect from a remote workstation.
|
||||||
|
|
||||||
|
@ -43,13 +43,23 @@ the |VM| via the console:
|
|||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
apiVersion: kubevirt.io/v1
|
apiVersion: kubevirt.io/v1
|
||||||
kind: VirtualMachineInstance
|
kind: VirtualMachine
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/vm: vm-cirros
|
||||||
name: vm-cirros
|
name: vm-cirros
|
||||||
|
spec:
|
||||||
|
running: false
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/vm: vm-cirros
|
||||||
spec:
|
spec:
|
||||||
domain:
|
domain:
|
||||||
devices:
|
devices:
|
||||||
disks:
|
disks:
|
||||||
|
-disk:
|
||||||
|
bus: virtio
|
||||||
- name: containerdisk
|
- name: containerdisk
|
||||||
disk:
|
disk:
|
||||||
bus: virtio
|
bus: virtio
|
||||||
@ -66,7 +76,7 @@ the |VM| via the console:
|
|||||||
image: kubevirt/cirros-container-disk-demo:latest
|
image: kubevirt/cirros-container-disk-demo:latest
|
||||||
- name: cloudinitdisk
|
- name: cloudinitdisk
|
||||||
cloudInitNoCloud:
|
cloudInitNoCloud:
|
||||||
userDataBase64: IyEvYmluL3NoCgplY2hvICdwcmludGVkIGZyb20gY2xvdWQtaW5pdCB1c2VyZGF0YScKWQtaW5pdCB1c2VyZGF0YScK
|
userDataBase64: IyEvYmluL3NoCmVjaG8gJ3ByaW50ZWQgZnJvbSBjbG91ZC1pbml0IHVzZXJkYXRhJwo=
|
||||||
|
|
||||||
#. Apply the ``yaml`` file to create the |VM| in a stopped state.
|
#. Apply the ``yaml`` file to create the |VM| in a stopped state.
|
||||||
|
|
||||||
@ -108,8 +118,6 @@ the |VM| via the console:
|
|||||||
# vm-cirros login: cirros
|
# vm-cirros login: cirros
|
||||||
Password:
|
Password:
|
||||||
|
|
||||||
$ hostname vm-cirros
|
|
||||||
|
|
||||||
$ ls /
|
$ ls /
|
||||||
bin home lib64 mnt root tmp
|
bin home lib64 mnt root tmp
|
||||||
boot init linuxrc old-root run usr
|
boot init linuxrc old-root run usr
|
||||||
@ -155,8 +163,6 @@ the |VM| via the console:
|
|||||||
$ ssh -p 31562 cirros@<Floating-OAM-IP-Address-of-|prod|>
|
$ ssh -p 31562 cirros@<Floating-OAM-IP-Address-of-|prod|>
|
||||||
password:
|
password:
|
||||||
|
|
||||||
$ hostname vm-cirros
|
|
||||||
|
|
||||||
# List Interfaces
|
# List Interfaces
|
||||||
# Notice how the VM has a single eth0 interface, the default CNI interface.
|
# Notice how the VM has a single eth0 interface, the default CNI interface.
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Complete the following steps to install KubeVirt.
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
~(keystone_admin)$ system application-upload /usr/local/share/applications/helm/kubevirt-app-1.0-1.tgz
|
~(keystone_admin)$ system application-upload /usr/local/share/applications/helm/kubevirt-app-<version>.tgz
|
||||||
|
|
||||||
~(keystone_admin)$ system application-list
|
~(keystone_admin)$ system application-list
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ Configuring the NodePort service option is shown below:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
$ cat <<EOF > cdi-uploadproxy-nodeport-service.yaml apiVersion: v1
|
$ cat <<EOF > cdi-uploadproxy-nodeport-service.yaml
|
||||||
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: cdi-uploadproxy-nodeport
|
name: cdi-uploadproxy-nodeport
|
||||||
@ -34,12 +35,12 @@ Configuring the NodePort service option is shown below:
|
|||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
ports:
|
ports:
|
||||||
- port: 443
|
- port: 443
|
||||||
targetPort: 8443
|
targetPort: 8443
|
||||||
nodePort: 32111 # Use unused nodeport in 31,500 to 32,767 range
|
nodePort: 32111 # Use unused nodeport in 31,500 to 32,767 range
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
selector:
|
selector:
|
||||||
cdi.kubevirt.io: cdi-uploadproxy
|
cdi.kubevirt.io: cdi-uploadproxy
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ Configuring the NodePort service option is shown below:
|
|||||||
.. rubric:: |result|
|
.. rubric:: |result|
|
||||||
|
|
||||||
Now the ``virtctl`` command can be used to upload a |VM| image file into an
|
Now the ``virtctl`` command can be used to upload a |VM| image file into an
|
||||||
existing or new DataVolume (|PVC|).
|
existing or new DataVolume (|PVC|).
|
||||||
|
|
||||||
See the example (:ref:`create-an-ubuntu-vm-fafb82ec424b`) that uploads an ubuntu
|
See the example (:ref:`create-an-ubuntu-vm-fafb82ec424b`) that uploads an ubuntu
|
||||||
cloud image (``jammy-server-cloudimg-amd64.img`` from
|
cloud image (``jammy-server-cloudimg-amd64.img`` from
|
||||||
@ -61,10 +62,9 @@ named stx-lab-jenkins-disk:
|
|||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
$ virtctl image-upload dv stx-lab-jenkins-disk -n jenkins-ns --insecure \
|
$ virtctl image-upload dv <DV-Name> -n <NameSpace> --insecure \
|
||||||
--access-mode ReadWriteOnce --size 500Gi --image-path \
|
--access-mode ReadWriteOnce --size <size>Gi --image-path <Image-Path> \
|
||||||
/home/sysadmin/admin/kubevirt/images/jammy-server-cloudimg-amd64.img \
|
--uploadproxy-url https://<NodeIP>:<PORT>
|
||||||
--uploadproxy-url https://admin.starlingx.abc.com:32111
|
|
||||||
|
|
||||||
See sections on :ref:`create-an-ubuntu-vm-fafb82ec424b` and
|
See sections on :ref:`create-an-ubuntu-vm-fafb82ec424b` and
|
||||||
:ref:`create-a-windows-vm-82957181df02` on how to then use this DataVolume to
|
:ref:`create-a-windows-vm-82957181df02` on how to then use this DataVolume to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user