Skip to content
WALDEMAR KOZACZUK edited this page Aug 28, 2024 · 3 revisions

OSv can run on the XEN hypervisor in the Hardware-assisted Virtualization (HVM) mode of operation (see https://wiki.xenproject.org/wiki/Xen_Project_Software_Overview#Guest_Types). The author of this wiki page is not a Xen expert, but we think OSv can run specifically in the HVM mode with PV (Paravirtualized) drivers like:

  • Xen clock
  • Xen netfront - PV front-end driver that interacts directly with a PV back-end networking device driver in the Dom0 kernel
  • Xen blkfront - PV front-end driver that interacts directly with a PV back-end block device driver in the Dom0 kernel

OSv can run on EC2 Xen-based instances (like t2.*) or a local Xen Hypervisor with Linux running on Dom0 (tested with Fedora and Ubuntu).

Running OSv on XEN-based EC2

The easiest way to deploy OSv to an XEN-based instance is to use the deploy_to_aws.sh script as explained here and passing the XEN-based EC2 instance type.

Running OSv on local XEN Hypervisor

OSv on local XEN Hypervisor requires a machine with Linux installed and then configured to run as Dom0. The author of this page tested it on both Ubuntu and recently Fedora. Please look at this document and that document for some guidance on how to do it.

Once the Linux machine is on and booted with Xen on, one can run OSv using regular run.py like so:

sudo ./scripts/run.py -p xen

or with networking on (provided you set up a bridge):

sudo ./scripts/run.py -p xen -nv --script vif-bridge -b virbr0

or with a second disk:

sudo ./scripts/run.py -p xen --second-disk-image ./disk.raw

Adding the dry-run option(--dry-run) to those above is going to print the content of the xl configuration file:

./scripts/run.py -p xen --dry-run
/home/projects/osv/scripts/imgedit.py setargs /home/projects/osv/build/last/usr.img "--rootfs=zfs /libhttpserver-api.so"
xl create \
-c /tmp/tmphq9_o78g

Content of /tmp/tmphq9_o78g
---------------------------
builder='hvm'
xen_platform_pci=1
acpi=1
apic=1
boot='c'
vncdisplay=1
memory=2048
vcpus=4
maxcpus=4
name='osv-4146619'
disk=['/home/projects/osv/build/last/usr.img,qcow2,hda,rw']
serial='pty'
paused=0
on_crash='preserve'

Which can be used to start OSv by directly calling the xl utility like so:

sudo xl create -c /tmp/osv.xl

Running OSv on XCP-NG

Extra links

General

Devices

Tools

OSv mailing list

Relevant issues (mostly closed)

Clone this wiki locally