[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I run hvt targets on qemu/kvm?



Hi Hans Ole,

First, thanks to trying to use MirageOS :) ! I'm not an expert about this part but I know the usual process to run a Solo5 MirageOS (without qemu).
MirageOS (with OPAM) installs for you Solo5 bindings and binaries such as `solo5-hvt`. If you have the KVM permission (on GNU/Linux, you should be into the KVM group),
you are able to launch a Solo5 MirageOS without root privileges.

Let's take the `hello` unikernel available here: https://github.com/mirage/mirage-skeleton/tree/master/tutorial/hello
To compile and use it, you should follow this process:
```
$ eval `opam env`
$ mirage configure -t hvt
$ make depends
$ mirage build
$ solo5-hvt -- hello.hvt
```

This is the most easy part where this unikernel does not need to be connected to the internet. For a unikernel which wants to communicate, you must have a TAP interface.
At this step, the configuration depends on your infrastructure (if you have many IPs, only one, etc.). Just to still continue to explain, we can imagine a network bridge such as, into your /etc/network/interface, you have:
```
auto br1
iface br1 inet static
  address 10.0.0.0
  broadcast 10.0.0.255
  netmask 255.255.255.0
  gateway 10.0.0.1
```

Disclaimer: as I said, I'm not an expert about sysadmin (so, if someone can double-check that) but several HOW-TO exists on the internet to be able make a bridge network.

Then, you need to create the TAP interface and plug it into the bridge:
```
# ip tuntap add mode tap tap100
# ip link set dev tap100 up
# brctl addif br1 tap100
```

Then, an unikernel such as https://github.com/mirage/mirage-skeleton/tree/master/applications/dns can be launched with:
```
$ solo5-hvt --net:service=tap100 -- mir-dns.hvt --ipv4=10.0.0.2/24 --ipv4-gateway=10.0.0.1
```

At this point, Hannes gives you some more information and, as I said, if we have some clues about your infrastructure, we will be able to give you a special help :) .

Best

Le sam. 24 oct. 2020 à 08:34, Hans Ole Rafaelsen <hrafaelsen@xxxxxxxxx> a écrit :
Hi,

When reading the MirageOS tutorials/documentation it seems like virtio target has some limitations. E.g. only one network interface supported. From the tutorials I get the impression that virtio will have limited support in the future, while hvt seems to be better supported.

Making virtio targets run on qemu/kvm is documented and quite straightforward . But I can not find any way to make hvt targets run on qemu/kvm.

Is there some way to make hvt targets run on qemu/kvm?

Regards,

Hans Ole Rafaelsen


--
Romain Calascibetta - http://din.osau.re/

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.