Continue working on exercise 5.
This commit is contained in:
@ -116,6 +116,96 @@ spec:
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
#+begin_src tmux
|
||||
# Create the exercise five namespace
|
||||
oc create namespace super-important-dont-deleteme
|
||||
|
||||
# Create the exercise five virtual machine
|
||||
cat << EOF | oc --namespace super-important-dont-deleteme apply --filename -
|
||||
apiVersion: kubevirt.io/v1
|
||||
kind: VirtualMachine
|
||||
metadata:
|
||||
name: cryto-carnivore-cpuminer3000
|
||||
finalizers:
|
||||
- kubevirt.io/virtualMachineControllerFinalize
|
||||
labels:
|
||||
app: cryto-carnivore-cpuminer3000
|
||||
vm.kubevirt.io/template: centos7-server-small
|
||||
vm.kubevirt.io/template.namespace: openshift
|
||||
vm.kubevirt.io/template.revision: '1'
|
||||
vm.kubevirt.io/template.version: v0.25.0
|
||||
spec:
|
||||
dataVolumeTemplates:
|
||||
- apiVersion: cdi.kubevirt.io/v1beta1
|
||||
kind: DataVolume
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: cryto-carnivore-cpuminer3000
|
||||
spec:
|
||||
sourceRef:
|
||||
kind: DataSource
|
||||
name: centos7
|
||||
namespace: openshift-virtualization-os-images
|
||||
storage:
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
||||
running: true
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
vm.kubevirt.io/flavor: small
|
||||
vm.kubevirt.io/os: centos7
|
||||
vm.kubevirt.io/workload: server
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
kubevirt.io/domain: cryto-carnivore-cpuminer3000
|
||||
kubevirt.io/size: small
|
||||
spec:
|
||||
domain:
|
||||
cpu:
|
||||
cores: 1
|
||||
sockets: 1
|
||||
threads: 1
|
||||
devices:
|
||||
disks:
|
||||
- disk:
|
||||
bus: virtio
|
||||
name: rootdisk
|
||||
- disk:
|
||||
bus: virtio
|
||||
name: cloudinitdisk
|
||||
interfaces:
|
||||
- macAddress: '02:d5:73:00:00:0b'
|
||||
masquerade: {}
|
||||
model: virtio
|
||||
name: default
|
||||
networkInterfaceMultiqueue: true
|
||||
rng: {}
|
||||
machine:
|
||||
type: pc-q35-rhel9.2.0
|
||||
resources:
|
||||
requests:
|
||||
memory: 2Gi
|
||||
evictionStrategy: LiveMigrate
|
||||
networks:
|
||||
- name: default
|
||||
pod: {}
|
||||
terminationGracePeriodSeconds: 180
|
||||
volumes:
|
||||
- dataVolume:
|
||||
name: cryto-carnivore-cpuminer3000
|
||||
name: rootdisk
|
||||
- cloudInitNoCloud:
|
||||
userData: |-
|
||||
#cloud-config
|
||||
user: centos
|
||||
password: 123456
|
||||
chpasswd: { expire: False }
|
||||
name: cloudinitdisk
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
|
||||
* Automated scenario population
|
||||
|
||||
@ -468,10 +558,15 @@ spec:
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
** Exercise five - How do I resize virtual machine disks again?
|
||||
|
||||
asdas
|
||||
|
||||
|
||||
* Automated scenario cleanup
|
||||
|
||||
If you need to quickly reset an example environment to have no solutions populated you can use the following source blocks.
|
||||
|
||||
#+begin_src tmux
|
||||
oc delete namespace --ignore-not-found crusty-corp demotestwtf17 itsjustyaml
|
||||
oc delete namespace --ignore-not-found crusty-corp demotestwtf17 itsjustyaml super-important-dont-deleteme
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user