On Tue, Mar 27, 2018 at 01:13:03PM +0100, Richard W.M. Jones wrote:
+ with_open_out (dir // name ^ ".yaml") (
+ fun chan ->
+ let fpf fs = fprintf chan fs in
+ fpf "apiVersion: kubevirt.io/v1alpha1\n";
+ fpf "kind: OfflineVirtualMachine\n";
+ fpf "metadata:\n";
+ fpf " name: %s\n" name;
+ fpf "domain:\n";
+ fpf " cpu:\n";
+ fpf " cores: %d\n" source.s_vcpu;
+ fpf " resources:\n";
+ fpf " requests:\n";
+ fpf " memory: %Ld%s\n" (source.s_memory /^ 1024_L)
"KiB";
+ fpf " devices:\n";
Of course in the process of doing that I forgot all about the osinfo
field, but it could be added somewhere under here as a custom field.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/