Ubuntu Server Guide
Note This also is documented along some more constraints and considerations at the Ubuntu Wiki QEMU usage for microvms
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
Note
This also is documented along some more constraints and considerations at the Ubuntu Wiki QEMU usage for microvms QEMU became another use case being used in a container-like style providing an enhanced isolation compared to containers but being focused on initialization speed. To achieve that several components have been added: - the microvm machine type - alternative simple FW that can boot linux called qboot - qemu build with reduced features matching these use cases called qemu−system−x86−microvm For example if you happen to already have a stripped down workload that has all it would execute in an initrd you would run it maybe like the following: 100 $ sudo qemu−system−x86_64 −M ubuntu−q35 −cpu host −m 1024 −enable−kvm −serial mon:stdio − nographic −display curses −append ’console=ttyS0,115200,8n1’ −kernel vmlinuz−5.4.0−21 −initrd /boot/ initrd.img−5.4.0−21−workload To run the same with microvm, qboot and the minimized qemu you would do the following 1. run it with with type microvm, so change -M to −M microvm 2. use the qboot bios, add −bios /usr/share/qemu/bios−microvm.bin 3. install the feature-minimized qemu-system package, do $ sudo apt install qemu−system−x86− microvm An invocation will now look like: $ sudo qemu-system-x86_64 -M microvm -bios /usr/share/qemu/bios-microvm.bin -cpu host -m 1024 -enable- kvm -serial mon:stdio -nographic -display curses -append ‘console=ttyS0,115200,8n1’ -kernel vmlinuz-5.4.0-21 -initrd /boot/initrd.img-5.4.0-21-workload That will have cut down the qemu, bios and virtual-hw initialization time down a lot. You will now - more than you already have before - spend the majority inside the guest which implies that further tuning probably has to go into that kernel and userspace initialization time. ** Note ** For now microvm, the qboot bios and other components of this are rather new upstream and not as verified as many other parts of the virtualization stack. Therefore none of the above is the default. Further being the default would also mean many upgraders would regress finding a qemu that doesn’t have most features they are used to use. Due to that the qemu-system-x86-microvm package is intentionally a strong opt-in conflicting with the normal qemu-system-x86 package. libvirt The libvirt library is used to interface with different virtualization technologies. Before getting started with libvirt it is best to make sure your hardware supports the necessary virtualization extensions for KVM. Enter the following from a terminal prompt: kvm−ok A message will be printed informing you if your CPU does or does not support hardware virtualization. Note On many computers with processors supporting hardware assisted virtualization, it is necessary to activate an option in the BIOS to enable it. Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling