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

Re: [MirageOS-devel] Errors trying the "block" example with Mirage 2.0+ and Xen 4.4

> From here, can you advise what should be the proper course of action *right 
> now*? 
> Ie. if I need to explain Mirage to a colleague (my next problem), what should 
> I tell them to do to get block devices working for the time being? Is the 
> manual update of the generated "main.ml" the appropriate recommended solution?

You can use Thomas's trick inside your config.ml:

let storage =
 match get_mode () with
 | `Xen -> block_of_file "xvda"
 | `Unix -> block_of_file "disk.img"

As stated by Thomas, "That works, but the "block_of_file" name is misleading.

Also, it all goes very strange if you also have a file named "xvda" in
the same directory - then mirage replaces the Xen block name with an
absolute Unix file path!"

or simply:

let path = match get_mode () with
 | `Xen -> "xvda"
 | `Unix -> "disk.img"
let storage = block_of_file path


> (Side question: any way to change the "mirage" command to produce the `Unix | 
> `Xen pattern match in the generated main.ml automatically?)

what do you mean?

MirageOS-devel mailing list



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