#include <xenctrl.h>
#include <libxl.h>
-int gen_stub_json_config(uint32_t domid)
+int gen_stub_json_config(uint32_t domid, libxl_uuid *uuid)
{
int rc = 1;
xentoollog_logger_stdiostream *logger;
libxl_domain_build_info_init_type(&dom_config.b_info,
dom_config.c_info.type);
+ if (uuid && !libxl_uuid_is_nil(uuid))
+ libxl_uuid_copy(ctx, &dom_config.c_info.uuid, uuid);
+
json = libxl_domain_config_to_json(ctx, &dom_config);
/* libxl-json format requires the string ends with '\0'. Code
* snippet taken from libxl.
#ifndef __INIT_DOM_JSON_H
#define __INIT_DOM_JSON_H
+#include <libxl.h>
/*
* Generate a stub JSON config for a domain with the given domid.
*/
-int gen_stub_json_config(uint32_t domid);
+int gen_stub_json_config(uint32_t domid, libxl_uuid *uuid);
#endif
/*