virDomainShutdown(virDomainPtr domain)
virDomainShutdownFlags(virDomainPtr domain, unsigned int flags)
virDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
virDomainCoreDumpWithFormat(
virDomainPtr dom, const char *to, unsigned int fmt, unsigned int flags)
virDomainCreate(virDomainPtr dom)
virDomainCreateWithFlags(
virDomainPtr dom, unsigned int flags)
virDomainCreateWithFiles(
virDomainPtr dom, unsigned int nfiles, int *files, unsigned int flags)
int numActive, *idList, i; numActive = virConnectNumOfDomains(conn); idList = malloc(sizeof(int) * numActive); virConnectListDomains(conn, idList, numActive); for (i = 0; i < numActive; i++) { virDomainPtr dom = virDomainLookupByID(conn, idList[i]); /* Do something useful with @dom. */ }
From bare C and glibc:
free(NULL);
Not in libvirt:
virDomainFree(NULL); /* Causes an error */ virDomainInterfaceFree(NULL); /* No error */
virDomainDestroy()
<controller type='pci' model='pcie-root-port'>
<model name='ioh3420'/>
</controller>
virConnect object has been adjusted more than 20 times.
eXtreme Programming has some answers:
mprivozn@redhat.com