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

[Libvir] [PATCH 2/2] virDomainMigrate test program

This is a test program. You can fiddle with the various strings to control what domain it migrates. (If you leave the program as-is, then it will do a Xen migration from localhost to localhost, which screws up xend).


Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
/* Test migration. */

#include <stdio.h>
#include <assert.h>

#include <libvirt/libvirt.h>

main ()
  virDomainPtr dom, ddom;
  virConnectPtr conn, dconn;
  const char *hostname = "localhost";

  conn = virConnectOpen ("xen");
  assert (conn);

  dconn = virConnectOpen ("xen");
  assert (dconn);

  dom = virDomainLookupByName (conn, "fc6_1");
  assert (dom);

  ddom = virDomainMigrate (dom, conn, VIR_MIGRATE_LIVE,
			   NULL, hostname, NULL);
  assert (ddom);

  return 0;

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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