└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # LightVM 2 | LightVM is a virtualization solution based on Xen that is optimized to 3 | offer fast boot-times regardless of the number of active VMs. This is 4 | achieved by replacing Xenstore with a new distributed solution called 5 | NoXS (no Xenstore) which provides a shared page for each device 6 | containing all the information needed for device initialization. 7 | 8 | LightVM uses the new Chaos toolstack which currently implements 9 | operations such as instantiation, saving, restoring and 10 | migration. Chaos can also be used in Xen environments based on 11 | Xenstore, making it a streamlined alternative for the ``xl`` 12 | toolstack. VMs management is assisted by the XenDevD daemon for proper 13 | device initialization. 14 | 15 | Currently, LightVM relies on Linux kernel for dom0, while for 16 | unprivileged domains one can use both Linux and Mini-OS based guests. 17 | 18 | LightVM environment consists of multiple components, each of them 19 | having its own repository. The Xen repository provides the Xen 20 | hypervisor, on top of which the virtualized domains will be running, 21 | and the libraries needed by Chaos toolstack. The toolstack uses ``libxc`` 22 | library for interacting with the hypervisor on domain creation, 23 | shutdown and inspection, and for migrating domains data to remote 24 | hosts. If deployed in a Xenstore-based environment, the toolstack will 25 | also need the ``libxenstore`` library for communicating with the ``xenstored`` 26 | daemon. 27 | 28 | The Linux repository provides the changes needed for building both 29 | dom0 and domU domains. Inside dom0, Chaos will make use of the 30 | ``/dev/xen/noxs_backend`` device when requesting to the backend drivers 31 | the creation of devices configured for the target guest domains. With 32 | NoXS, besides the backend drivers for network and block devices, the 33 | ``sysctl`` backend driver is in charge with providing all the system-wise 34 | information and events (such as shutdown events) needed by the guest 35 | domains. On the guest side, the ``sysctl`` front driver will receive the 36 | information and will trigger the actions implied by the events. 37 | 38 | The XenDevD repository provides the source code for the XenDevD daemon 39 | and the libraries needed for communication with Chaos. XenDevD daemon 40 | listens for udev events in order to carry out the userland operations 41 | for devices initialization (e.g. adding vifs to bridges). Some devices 42 | may require userland operations before their creation, in which case 43 | Chaos will initiate the requests directly to the daemon and will wait 44 | for these operations to complete. For example, block devices that are 45 | file based will need to be mounted using loop devices; Chaos will 46 | provide the name of the file being mounted and the daemon will reply 47 | with the loop device path on success. 48 | 49 | The Chaos repository contains the source code for toolstack: the tool 50 | used in domain creation, shutdown and inspection, the daemon used for 51 | receiving migrating domains and the daemon used in split 52 | instantiation. Similarly to ``xl`` using ``libxl`` library for most of its 53 | functionality, the common functionality of Chaos tools is provided by 54 | the ``libh2`` library. 55 | 56 | Besides Linux domU domains, LightVM also supports Mini-OS based 57 | applications. The Mini-apps repository provides a set of applications 58 | examples that can be used to demonstrate the functionality and 59 | performance of NoXS based environments. 60 | 61 | ## Xen 62 | * Repo: https://github.com/sysml/xen 63 | * Branch: ``noxs-4.8.1`` based on Xen 4.8.1 64 | * Branch: ``noxs-4.8.0`` based on Xen 4.8.0 65 | * Build and installation steps are the same ones used for upstream 66 | Xen. Be sure to provide a custom installation path before building if 67 | a different location is desired. 68 | 69 | ```bash 70 | $ ./configure --prefix= 71 | $ make dist-xen 72 | $ make dist-tools 73 | ``` 74 | 75 | ## Linux 76 | * Repo: https://github.com/sysml/linux 77 | * Branch: ``noxs`` 78 | * Build: Add ``CONFIG_XEN_NOXS=y`` in the config file in addition to using 79 | the [Xen config flags](https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_Kernel) for building Linux domains. 80 | 81 | Prepare the userspace headers which will be used by the Chaos toolstack: 82 | 83 | ```bash 84 | $ make headers_install INSTALL_HDR_PATH= 85 | ``` 86 | 87 | ## XenDevD 88 | * Repo: https://github.com/sysml/xendevd 89 | * Branch: ``noxs`` 90 | * Build: Before running ``make`` command, update the Makefile to refer to 91 | the headers and libraries installed in the previously configured Xen 92 | distribution directory: 93 | 94 | ```diff 95 | -CFLAGS += -Iinc -Wall -g -O3 96 | -LDFLAGS += -lxenstore 97 | +CFLAGS += -Iinc -Wall -g -O3 -I//include 98 | +LDFLAGS += -lxenstore -L//lib 99 | ``` 100 | 101 | ## Chaos 102 | * Repo: https://github.com/sysml/chaos 103 | * Branch: ``master`` 104 | * Build: Before building, configure the variables in the ``config.in`` file 105 | to refer to the previously configured environment paths. For build, 106 | simply run the ``make`` command. NoXS can be enabled by using the 107 | ``CONFIG_H2_XEN_NOXS`` flag: 108 | 109 | ```bash 110 | $ make CONFIG_H2_XEN_NOXS=y 111 | ``` 112 | 113 | ## Mini-OS 114 | * Repo: https://github.com/sysml/mini-os 115 | * Branch: ``noxs`` 116 | * Build: Enable NoXS by setting ``CONFIG_NOXS`` flag: 117 | 118 | ```bash 119 | $ make CONFIG_NOXS=y 120 | ``` 121 | 122 | ## Mini-Apps 123 | * Repo: https://github.com/sysml/mini-apps 124 | * Branch: ``noxs`` 125 | * Build requirements: the Mini-OS applications need the Newlib and Lwip libraries 126 | provided by the Mini-OS [toolchain](#mini-os-toolchain). 127 | * Build: In the target application directory: 128 | 129 | ```bash 130 | $ cd daytime 131 | $ make XEN_ROOT=... MINIOS_ROOT=... NEWLIB_ROOT=... LWIP_ROOT=... 132 | ``` 133 | 134 | ## Mini-OS toolchain 135 | * Repo: https://github.com/sysml/toolchain 136 | * Branch: ``noxs`` 137 | * For build details, follow the indications in the toolchain README 138 | 139 | --------------------------------------------------------------------------------