Skip to content

Running OSv on Cloud Hypervisor

WALDEMAR KOZACZUK edited this page Jul 16, 2021 · 1 revision

Cloud Hypervisor is a fairly new open source Intel-led Virtual Machine Monitor (VMM) that runs on top of KVM and the MSHV hypervisors.

As of release 0.56.0, OSv can boot on Cloud Hypervisor using a command as in the following example:

./cloud-hypervisor-static-0.15.0 
 --console off --serial tty \
 --kernel ./build/release/kernel-stripped.elf \
 --disk path=./build/release/usr.raw \
 --cpus boot=1 --memory size=128M --rng \
 --cmdline='--verbose --ip=eth0,172.16.0.2,255.255.255.252 --defaultgw=172.16.0.1 --nameserver=172.16.0.1 /go.so /httpserver.so' --net "tap=fc_tap0,mac=,ip=172.16.0.1,mask=255.255.255.252"

OSv v0.55.0-282-ga669c61a
cloud-hypervisor: 19.881835ms: <vcpu0> WARN:vmm/src/vm.rs:477 -- Guest PIO write to unregistered address 0x21
cloud-hypervisor: 19.952633ms: <vcpu0> WARN:vmm/src/vm.rs:477 -- Guest PIO write to unregistered address 0xa1
1 CPUs detected
Firmware vendor: Unknown
bsd: initializing - done
VFS: mounting ramfs at /
VFS: mounting devfs at /dev
net: initializing - done
cloud-hypervisor: 34.100384ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
cloud-hypervisor: 34.24164ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
cloud-hypervisor: 34.374407ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
eth0: ethernet address: 2e:65:d1:f2:b8:af
cloud-hypervisor: 37.534086ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
virtio-blk: Add blk device instances 0 as vblk0, devsize=12130816
cloud-hypervisor: 51.838975ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1
random: virtio-rng registered as a source.
random: intel drng, rdrand registered as a source.
random: <Software, Yarrow> initialized
VFS: unmounting /dev
VFS: mounting rofs at /rofs
VFS: mounting devfs at /dev
VFS: mounting procfs at /proc
VFS: mounting sysfs at /sys
VFS: mounting ramfs at /tmp
eth0: 172.16.0.2
cloud-hypervisor: 56.920199ms: <vcpu0> WARN:vmm/src/vm.rs:477 -- Guest PIO write to unregistered address 0x3f0
Booted up in 39.26 ms
Cmdline: /go.so /httpserver.so
random: blocking on read.
random: device unblocked.
Go version: go1.15.8, listening on port 8000 ...

At the moment the scripts/run.py does not support running OSv on Cloud Hypervisor.

Clone this wiki locally