Next create a file named "host-bridge.xml" to the /etc/libvert/qemu/networks folder. Save the file and run the following commands to apply the settings. For me it was eno1, but yours may be different. Interfaces should match the ethernets section above.
update the ip addresses to the ip address of your host machine, not what you want the VM to be. I changed dhcp4: to false then added the bridges section below. Highlighted in red was in my default file. To allow the VM to access your network and the internet you need to setup a network bridge. This installs Cockpit that can be accessed via hostIP:9090 and installs the virtual machine manager. This allows you to manage the VM via webportal.
Sudo apt -y install virt-top libguestfs-tools libosinfo-bin qemu-system virt-manager sudo apt -y install qemu-kvm libvirt-daemon bridge-utils virtinst libvirt-daemon-system A write up for the install can be found Here or use the two commands below to install via SSH.
I already have Ubuntu server 20.04 setup and running and use Putty to ssh into it, but any software should work. There maybe easier ways to do this so please correct anything I may have done wrong. For each step I've included the source to help understand and support the functions. I know a lot of people go with Promox, but I wanted to keep my existing Ubuntu system in tact and didn't want to load the desktop version. My problem was that the deploy VM step was more difficult for a novice like me so I figured I would provide a write-up to help someone else looking to migrate their system. I came across a post by u/fourierswager that gave a high level guide to converting over to a VM Found here. I ignored it for a while, but had a few update errors that made me want to make the switch. I've been using HA for about 2 years now on Ubuntu 20.04 which has been announced as unsupported. Should have started there, its much easier to manage overall. Note that the modeline is necessary to support custom resolutions, you cannot just set the mode.EDIT: I gave in and made the switch to Proxmox. Restart QEMU or rc-service lightdm restart, then Phosh should show up with the new resolution. # Maybe it's a bit too large with scale 2 on this resolution? Or maybe not, just test it out :) Then add the new modeline and change mode: Note how it changed the horizontal resolution to 544 to match the CVT standard. Warning: Aspect Ratio is not CVT standard. You can generate the modelines using the cvt tool.įor example, to set the resolution to qHD (540x960): To add a new resolution, you need to add a new modeline, then change the mode (and eventually the scale). # For the x86 VM using QXL to get a phone like geometry You can change the resolution by editing /usr/share/phosh/phoc.ini. Prefer the native architecture when possible.īy default, Phosh has the resolution hard-coded to 720x1440 (like the Librem 5), so the display is cut off on usual 1920x1080 (Full HD) monitors. aarch64 on x86_64) requires CPU emulation which is rather slow. Note that running a virtual machine for a foreign architecture (e.g. The following architectures are available:
QEMU allows running postmarketOS in virtual machines.