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
|
||||
|
||||
@ -8,7 +8,7 @@ authors: ['default']
|
||||
summary: "Persistent volume what??"
|
||||
---
|
||||
|
||||
The proof of concept has been going well at Acme Financial Services. Their team are a few sprints in and have just pinged you an email:
|
||||
The proof of concept has been going well at Acme Financial Services. Their team are a few sprints in and have just pinged you an email out of the blue:
|
||||
|
||||
|
||||
> Subject: Quick Help Needed: Expanding Storage for VM!
|
||||
@ -38,7 +38,14 @@ Time to roll up your sleeves, join the Acme Skype for Business™ video call and
|
||||
|
||||
## 5.1 - Expand the vm storage
|
||||
|
||||
For this task your team's challenge is to increase the storage of a
|
||||
For this task your team's challenge is to increase the storage of an existing virtual machine `cryto-carnivore-cpuminer3000` in the `super-important-dont-deleteme` namespace.
|
||||
|
||||
The virtual machine currently has a root disk of `30GiB` of storage. This needs to be increased to `60GiB`. No command line is required, though you will need to verify that your additional storage is now presented to the virtual machine operating system.
|
||||
|
||||
|
||||
## 5.2 - But wait there's more!
|
||||
|
||||
While you're on the Skype for Business™ video call with Chad fixing the `crypto-carnivore-cpuminer3000` stprage he also puts you on the spot and asks for some guidance on how to add an additional disk to the vm for a new ~~cve-ridden-literal-malware~~workload that Acme is developing.
|
||||
|
||||
|
||||
## 5.2 - Check your work
|
||||
|
||||
Reference in New Issue
Block a user