Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 621161 Details for
Bug 862914
virDomainSetMemoryFlags() and virDomainSetVcpusFlags() don't work immediately after a reboot.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
driver program to reproduce the bug.
setmemandpoweron.c (text/plain), 1.98 KB, created by
Michael Closson
on 2012-10-03 21:11:06 UTC
(
hide
)
Description:
driver program to reproduce the bug.
Filename:
MIME Type:
Creator:
Michael Closson
Created:
2012-10-03 21:11:06 UTC
Size:
1.98 KB
patch
obsolete
>/* compile with: > * gcc -g -Wall setmemandpoweron.c -o setmemandpoweron -ldl -pthread -lsasl2 -lvirt > */ >/* vim: ts=4 et cin > */ > >#include <stdio.h> >#include <stdlib.h> >#include <string.h> >#include <pthread.h> >#include <unistd.h> >#include <errno.h> >#include <netdb.h> >#include <assert.h> > >#include <sys/time.h> >#include <sys/types.h> >#include <sys/socket.h> >#include <sys/select.h> > >#include <netinet/in.h> >#include <netinet/ip_icmp.h> > >#include <arpa/inet.h> > >#include <libvirt/libvirt.h> >#include <libvirt/virterror.h> > > >void >lverr(void *userdata, virErrorPtr error) >{ > fprintf(stderr, "code: %d, message: %s\n", error->code, error->message); >} > >int main(int argc, char *argv[]) >{ > char *domname; > virConnectPtr conn = NULL; > virDomainPtr dom = NULL; > unsigned long mem, vcpus; > int cc; > > if (argc < 4 || argc > 6) { > fprintf(stderr, "\ >Usage: %s <domain name> <mem> <vcpus>\n", > *argv); > exit(99); > } > domname = argv[1]; > mem = strtol(argv[2], NULL, 0); > vcpus = strtol(argv[3], NULL, 0); > > conn = virConnectOpen("qemu:///system"); > if (conn == NULL) { > fprintf(stderr, "Failed to open connection to kvm://\n"); > return 1; > } > > virConnSetErrorFunc(conn, NULL, lverr); > > dom = virDomainLookupByName(conn, domname); > if (dom == NULL) { > fprintf(stderr, "Can't find a domain w/ name '%s'.\n", domname); > exit(99); > } > > cc = virDomainSetMemoryFlags(dom, mem, VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_MEM_MAXIMUM); > assert(cc==0); > cc = virDomainSetMemoryFlags(dom, mem, VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_MEM_CURRENT); > assert(cc==0); > cc = virDomainSetVcpusFlags(dom, vcpus, VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_VCPU_MAXIMUM); > assert(cc==0); > cc = virDomainSetVcpusFlags(dom, vcpus, VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_VCPU_CURRENT); > assert(cc==0); > > printf ("Config change done. hit enter to power on.\n"); > getchar(); > > cc = virDomainCreate(dom); > assert(cc==0); > > > return 0; >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 862914
: 621161