Commit cb5045ee authored by Guido Gunther's avatar Guido Gunther

Merge branch 'qemu-updates' into 'master'

Update the qemu documentation with some minor fixes and hints

See merge request Librem5/developer.puri.sm!95
parents acf44661 aafdf91e
Pipeline #2884 passed with stage
in 10 minutes and 14 seconds
......@@ -4,7 +4,7 @@
QEMU
====
There's an experimental QEMU image available that includes:
An experimental QEMU image is available that includes:
- phosh: phone graphical shell
- Common apps: geary, ephiphany, contacts, calls
......@@ -13,35 +13,34 @@ There's an experimental QEMU image available that includes:
Linux Environments
------------------
1. Open the Jenkins job building QEMU images on the CI server: https://arm01.puri.sm/job/Images/job/Image%20Build/
1. Go to the page containing the `last successful build`_ on the CI server.
2. Find the latest successful build which has the description *qemu-x86_64.qcow2*, see `build 562 <https://arm01.puri.sm/job/Images/job/Image%20Build/562/>`_ for example.
2. Download the build artifact called ``qemu-x86_64.qcow2``::
3. Download the build artifact called ``qemu-x86_64.qcow2``. For the build numbered ``562``, it's at the following URL::
$ wget https://arm01.puri.sm/job/Images/job/Image%20Build/lastSuccessfulBuild/artifact/qemu-x86_64.qcow2
$ wget https://arm01.puri.sm/job/Images/job/Image%20Build/562/artifact/qemu-x86_64.qcow2
3. Install the software required to run it:
5. Required software:
You can use any virtualization application that will create a VM from a
qcow2 to run this image.
You can use any virtualization application that will create a VM from a qcow2 to run this image.
**GNOME Boxes**
On PureOS, `gnome-boxes` is already installed and can be used right away.
Create a new Box from archive selecting qemu-x86_64.qcow2
**GNOME Boxes**
- On PureOS, `gnome-boxes` is already installed and can be used right away.
- Create a new Box from archive selecting qemu-x86_64.qcow2
**Virt-manager**
- On PureOS, you would need to install virt-manager::
**Virt-manager**
On PureOS, you would need to install virt-manager::
$ sudo apt install virt-manager
- Create a new virtual machine from your archive selecting qemu-x86_64.qcow2
Create a new virtual machine from your archive by selecting qemu-x86_64.qcow2
**Command Line**
You can also run the qcow2 VM from the command line::
**Command Line**
You can also run the qcow2 image from the command line::
$ sudo qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -display gtk -m 1G -enable-kvm
$ sudo qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -display gtk -m 1G -enable-kvm
6. Use it (password is 123456):
4. Use the image (password is 123456):
.. image:: virt-manager.gif
:alt: QEMU VM running phosh
......@@ -49,19 +48,18 @@ You can also run the qcow2 VM from the command line::
Microsoft Windows
-----------------
1. Open the Jenkins job building QEMU images on the CI server: https://arm01.puri.sm/job/Images/job/Image%20Build/
1. Go to the page containing the `last successful build`_ on the CI server.
2. Find the latest successful build which has the description *qemu-x86_64 image*, e.g. https://arm01.puri.sm/job/Images/job/Image%20Build/172/
3. Save the build by right-clicking on the file called ``qemu-x86-64.img`` and choosing "Save As".
2. Download the build artifact by right-clicking on the file called called
``qemu-x86_64.img`` and choosing "Save As".
4. Choose a folder on your computer with 4gb of free space.
3. Choose a folder on your computer with 4GB of free space.
5. After the download is complete, extract the file with 7zip or other untar program.
4. After the download is complete, extract the file with 7zip or other untar program.
6. Open an instance of PowerShell and navigate to the extracted file's folder.
5. Open an instance of PowerShell and navigate to the extracted file's folder.
7. The following command can be executed in PowerShell after modifying the path to the qemu
6. The following command can be executed in PowerShell after modifying the path to the qemu
executable and the path to the downloaded qemu-x86-64.img file.::
C:\Program Files\qemu\qemu-system-x86_64.exe -drive file=c:\downloads\qemu-x86_64.img,index=0,media=disk,format=raw -vga virtio -display sdl,gl=off -m 2G -L Bios -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name PureOS -no-reboot
......@@ -75,11 +73,11 @@ PowerShell script: :download:`launch-librem5.ps1 <launch-librem5.ps1>`
Expanding the Filesystem
------------------------
The qcow2 image is built such that with a simple command, you can resize the root filesystem to fill the partitioned space.
The qcow2 image is built such that, by running a simple command from within the VM environment, you can resize the root filesystem to fill the partitioned space.
.. note:: In this example, the filesystem to be resized is /dev/vda2 but it will depend on your host (could be /dev/sda2 or something similar).
.. note:: In this example, the filesystem to be resized is /dev/vda2 but it will depend on the drives that are available in the VM image -- it could be /dev/sda2 or something similar.
Before the rootfs is resized, `df -h` will show you that /dev/vda2 has a size of 3.1Gb. To grow the partition, resize the /dev/vda2 partition and then check `df -h` again to see that it is now 31Gb::
Before the rootfs is resized, running ``df -h`` from within the VM environment will show you that ``/dev/vda2`` has a size of 3.1G. To grow the partition, resize the ``/dev/vda2`` partition and then check ``df -h`` again to see that it is now 31G::
purism@pureos:~$ sudo resize2fs /dev/vda2
resize2fs 1.44.4 (18-Aug-2018)
......@@ -91,10 +89,12 @@ Before the rootfs is resized, `df -h` will show you that /dev/vda2 has a size of
Filesystem Size Used Avail Use% Mounted on
/dev/vda2 31G 2.2G 28G 8% /
Now your additional space on /dev/vda2 is immediately ready for use without any need to reboot.
Now your additional space on ``/dev/vda2`` is immediately ready for use without any need to reboot.
Resources
---------
- repo: https://source.puri.sm/Librem5/image-builder
.. _`last successful build`: https://arm01.puri.sm/job/Images/job/Image%20Build/lastSuccessfulBuild/artifact/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment