Doc: ACRN on Qemu Update

Update the Service VM rootfs to Ubuntu 20.04

Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com
This commit is contained in:
fuzhongl 2022-06-21 21:25:06 +08:00 committed by David Kinder
parent b594e1fbc7
commit 08654c8e38

View File

@ -11,8 +11,8 @@ configuration.
This setup was tested with the following configuration:
- ACRN hypervisor: ``v2.7`` tag
- ACRN kernel: ``v2.7`` tag
- ACRN hypervisor: ``v3.0`` tag
- ACRN kernel: ``v3.0`` tag
- QEMU emulator version: 4.2.1
- Host OS: Ubuntu 20.04
- Service VM/User VM OS: Ubuntu 20.04
@ -67,11 +67,11 @@ Prepare Service VM (L1 Guest)
--vcpus 4 \
--virt-type kvm \
--os-type linux \
--os-variant ubuntu18.04 \
--os-variant ubuntu20.04 \
--graphics none \
--clock offset=utc,tsc_present=yes,kvmclock_present=no \
--qemu-commandline="-machine kernel-irqchip=split -cpu Denverton,+invtsc,+lm,+nx,+smep,+smap,+mtrr,+clflushopt,+vmx,+x2apic,+popcnt,-xsave,+sse,+rdrand,-vmx-apicv-vid,+vmx-apicv-xapic,+vmx-apicv-x2apic,+vmx-flexpriority,+tsc-deadline,+pdpe1gb -device intel-iommu,intremap=on,caching-mode=on,aw-bits=48" \
--location 'http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/' \
--location 'http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/' \
--extra-args "console=tty0 console=ttyS0,115200n8"
#. Walk through the installation steps as prompted. Here are a few things to note:
@ -118,6 +118,8 @@ Prepare Service VM (L1 Guest)
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_GFXMODE=text
#. Check the rootfs partition with ``lsblk``, it is ``vda5`` in this example.
#. The Service VM guest can also be launched again later using
``virsh start ServiceVM --console``. Make sure to use the domain name you
used while creating the VM in case it is different than ``ServiceVM``.
@ -136,19 +138,24 @@ Install ACRN Hypervisor
.. important:: All the steps below are performed **inside** the Service VM
guest that we built in the previous section.
#. Install the ACRN build tools and dependencies following the :ref:`gsg`.
#. Switch to the ACRN hypervisor ``v2.7`` tag.
#. Install the ACRN build tools and dependencies following the :ref:`gsg`. Note
again that we're doing these steps within the Service VM and not on a development
system as described in the Getting Started Guide.
#. Switch to the ACRN hypervisor ``v3.0`` tag.
.. code-block:: none
cd ~
git clone https://github.com/projectacrn/acrn-hypervisor.git
cd acrn-hypervisor
git checkout v2.7
git checkout v3.0
#. Build ACRN for QEMU:
We're using the qemu board XML and shared scenario XML files
supplied from the repo (``misc/config_tools/data/qemu``) and not
generated by the board inspector or configurator tools.
.. code-block:: none
make BOARD=qemu SCENARIO=shared
@ -168,9 +175,9 @@ Install ACRN Hypervisor
sudo cp build/hypervisor/acrn.32.out /boot
#. Clone and configure the Service VM kernel repository following the
instructions in the :ref:`gsg` and using the ``v2.7`` tag. The User VM (L2
instructions in the :ref:`gsg` and using the ``v3.0`` tag. The User VM (L2
guest) uses the ``virtio-blk`` driver to mount the rootfs. This driver is
included in the default kernel configuration as of the ``v2.7`` tag.
included in the default kernel configuration as of the ``v3.0`` tag.
#. Update GRUB to boot the ACRN hypervisor and load the Service VM kernel.
Append the following configuration to the :file:`/etc/grub.d/40_custom`.
@ -186,10 +193,14 @@ Install ACRN Hypervisor
insmod ext2
echo 'Loading ACRN hypervisor ...'
multiboot --quirk-modules-after-kernel /boot/acrn.32.out
module /boot/bzImage Linux_bzImage
multiboot --quirk-modules-after-kernel /boot/acrn.32.out root=/dev/vda5
module /boot/vmlinuz-5.10.115-acrn-service-vm Linux_bzImage
}
.. note::
If your rootfs partition isn't vda5, please change it to match with yours.
vmlinuz-5.10.115-acrn-service-vm is the kernel image of Service VM.
#. Update GRUB:
.. code-block:: none