[PATCH 2/2] virDomainMigrate test program

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

 



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).

Rich.

--
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>

int
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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]