[libvirt] Deleted all setting after reboot

2015-06-12 Thread Amir Azemati
Hello all great, We had a question, We use OpenStack IceHouse on CentOS 6.5. We use libvirt for create network, attach interface to our VMs and ... There is a problem. When our server restart (reboot), all settings are deleted. We have to go back and do all the setting (create network, attach an

Re: [libvirt] [PATCH] libxl: Add timestamp to the libxl driver log.

2015-06-12 Thread Jim Fehlig
Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > --- > src/libxl/libxl_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c > index 9b258ac..e845759 100644 > --- a/src/libxl/libxl_conf.c > +++ b/src/libxl/libxl_conf

Re: [libvirt] [libvirt-php][PATCH] add more domain memory functions

2015-06-12 Thread Vasiliy Tolstov
2015-06-12 15:40 GMT+03:00 Vasiliy Tolstov : > * libvirt_domain_set_max_memory > * libvirt_domain_set_memory > * libvirt_domain_set_memory_flags Sorry, miss subject prefix =( -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.c

Re: [libvirt] [PATCH] Fix virsh edit and virt-xml-validate with SCSI LUN

2015-06-12 Thread John Ferlan
On 06/10/2015 11:22 AM, Eric Farman wrote: > Defining a domain with a SCSI disk attached via a hostdev > tag and a source address unit value longer than two digits > causes an error when editing the domain with virsh edit, > even if no changes are made to the domain definition. > The error sugges

[libvirt] [RFC PATCHv2 8/8] threshold: add write threshold setting in qemu

2015-06-12 Thread Eric Blake
Time to wire up the new API to call into the QMP command for setting a write threshold. FIXME: This patch does not quite do the right thing. At one point, I tried patching qemu to allow thresholds tied to the device, rather than to a node name, since libvirt is not yet setting node names: https://

Re: [libvirt] [PATCH] nodeinfo: fix to parse present cpus rather than possible cpus

2015-06-12 Thread John Ferlan
On 06/10/2015 02:49 AM, Kothapally Madhu Pavan wrote: > Currently we are parsing all the possible cpus to get the > nodeinfo. This fix will perform a check for present cpus > before parsing. > > Signed-off-by: Kothapally Madhu Pavan > --- > src/nodeinfo.c | 10 ++ > 1 file changed, 1

[libvirt] [RFC PATCHv2 4/8] threshold: wire up threshold event in RPC

2015-06-12 Thread Eric Blake
Pass the new virDomainBlockSetWriteThreshold() API and WRITE_THRESHOLD event across RPC. The event takes the bulk of the patch, but everything here is pretty mechanical and copies patterns from existing code. I debated about splitting the event separately from the API, in case we ever want to sup

Re: [libvirt] Accessing libvirtd remotely as non-root user

2015-06-12 Thread Dan Mossor
On 06/12/2015 12:58 PM, Laine Stump wrote: On 06/12/2015 12:14 PM, Dan Mossor wrote: On 06/12/2015 03:48 AM, Daniel P. Berrange wrote: On Thu, Jun 11, 2015 at 05:26:20PM -0500, Dan Mossor wrote: I manage libvirtd on a few remote machines, and my security policies require me to disable root log

[libvirt] [RFC PATCHv2 1/8] threshold: new API virDomainBlockSetWriteThreshold

2015-06-12 Thread Eric Blake
qemu 2.3 added a new QMP command block-set-write-threshold, which allows callers to get an interrupt when a file hits a write threshold, rather than the current approach of repeatedly polling for file allocation. This patch prepares the API for callers to register to receive the event, as well as

[libvirt] [RFC PATCHv2 0/8] new API virDomainBlockSetWriteThreshold

2015-06-12 Thread Eric Blake
Still in RFC stage because I need more work on qemu to turn on auto-node-naming, then corresponding work in libvirt to do node name lookups for both setting the threshold and for mapping events back to the right device name. But with this series in place and a simple hack to qemu to allow threshol

[libvirt] [RFC PATCHv2 2/8] threshold: expose new API in virsh

2015-06-12 Thread Eric Blake
Add a new 'virsh domblkthreshold' command to use the new API. * tools/virsh.pod (domblkthreshold): Document it. * tools/virsh-domain-monitor.c (cmdDomblkthreshold): New function. (domMonitoringCmds): Register it. Signed-off-by: Eric Blake --- tools/virsh-domain-monitor.c | 81 ++

[libvirt] [RFC PATCHv2 6/8] threshold: add threshold event handling in qemu

2015-06-12 Thread Eric Blake
With this patch, block write threshold events delivered by qemu are converted into libvirt events. FIXME: Qemu reports stats based on node name, but my plan is to rely on a patch where qemu auto-assigns node names rather than libvirt having to create and track it all. However, there's still the m

[libvirt] [RFC PATCHv2 7/8] threshold: scrape threshold data from QMP

2015-06-12 Thread Eric Blake
Expose threshold information by collecting the information from QMP commands. qemu has a way to get threshold information on all elements of a block chain, but only if libvirt provides node names for each node, and then correlates 'query-named-block-nodes' back to the names on each chain element.

[libvirt] [RFC PATCHv2 5/8] threshold: add qemu capability bit

2015-06-12 Thread Eric Blake
Track whether qemu is new enough to do block thresholds on the active layer. The plan is that even if qemu is too old, the event handler can still be registered, but will never fire (since it is useful to bulk-install handlers); while the request to set a threshold will honor the capability bit an

[libvirt] [RFC PATCHv2 3/8] threshold: new event object for tracking write threshold

2015-06-12 Thread Eric Blake
Common code for tracking a write threshold event from creation to delivery through a callback. * src/conf/domain_event.c (_virDomainEventWriteThreshold): New struct. (virDomainEventsOnceInit, virDomainEventWriteThresholdDispose) (virDomainEventWriteThresholdNew) (virDomainEventWriteThresholdNewFro

Re: [libvirt] [PATCH] qemu: implement address for isa-serial

2015-06-12 Thread John Ferlan
On 06/08/2015 09:42 AM, James Cowgill wrote: > I needed to specify the iobase address for certain exotic mips configurations. > > Signed-off-by: James Cowgill > --- > src/qemu/qemu_command.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > Is there perhaps some sort of

Re: [libvirt] [PATCH] qemu: update netdevs of the same mac addrs correctly

2015-06-12 Thread John Ferlan
On 06/08/2015 04:25 AM, zhang bo wrote: > If a guest has multiple network devices with the same MAC address, > when we online update the second device, libvirtd always updates > the first one. > > commit def31e4c forgot to fix the online updating scenario. We need to > use virDomainNetFindIdx()

Re: [libvirt] Accessing libvirtd remotely as non-root user

2015-06-12 Thread Laine Stump
On 06/12/2015 12:14 PM, Dan Mossor wrote: > On 06/12/2015 03:48 AM, Daniel P. Berrange wrote: >> On Thu, Jun 11, 2015 at 05:26:20PM -0500, Dan Mossor wrote: >>> I manage libvirtd on a few remote machines, and my security policies >>> require >>> me to disable root login via SSH. Up to this point, I

Re: [libvirt] Accessing libvirtd remotely as non-root user

2015-06-12 Thread Dan Mossor
On 06/12/2015 03:48 AM, Daniel P. Berrange wrote: On Thu, Jun 11, 2015 at 05:26:20PM -0500, Dan Mossor wrote: I manage libvirtd on a few remote machines, and my security policies require me to disable root login via SSH. Up to this point, I've been using root due to the systems being in staging,

Re: [libvirt] [PATCH] virsysinfo: s/system/sysdef/

2015-06-12 Thread John Ferlan
On 06/12/2015 08:58 AM, Michal Privoznik wrote: > A variable can't be named system, obviously. Well, it can if the > compiler is new enough to distinguish a variable named system and a > function call system(). And some older systems, don't have wise > compiler. Whatever. > s/Whatever.// > C

Re: [libvirt] [PATCH 0/2] Introduce new net-list switches

2015-06-12 Thread John Ferlan
On 06/08/2015 11:14 AM, Michal Privoznik wrote: > I think they might be helpful. > > Michal Privoznik (2): > cmdNetworkList: switch to FILTER > cmdNetworkList: Introduce --name, --uuid, --table > > tools/virsh-network.c | 93 > ++- > tools/v

Re: [libvirt] [PATCH] virQEMUCapsArch: openrisc vs or32

2015-06-12 Thread Daniel P. Berrange
On Fri, Jun 12, 2015 at 03:49:13PM +0200, Michal Privoznik wrote: > With a few exceptions, we assume that qemu binary for given > architecture has form of qemu-system-$arch. Well, openrisc is yet > another exception. It's binary is called qemu-system-or32. > > Signed-off-by: Michal Privoznik > --

Re: [libvirt] [PATCH] qemuBuildDriveStr: s/virBufferEscapeString/virBufferAsprintf/

2015-06-12 Thread John Ferlan
On 06/08/2015 11:03 AM, Michal Privoznik wrote: > We are using it to print a value that can't be NULL and does not need > any escaping anyway. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_command.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Comes straight from vir

[libvirt] [PATCH] qemu: emulatorpin: Don't reset pinning when pinning to all cpus

2015-06-12 Thread Peter Krempa
Similarly to 3813b648e9761aeed5b4f3ee7e62253a9172ce8e remove the default pinning assumption from emulatorpin. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1227180 --- src/qemu/qemu_driver.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_d

[libvirt] [PATCH] virQEMUCapsArch: openrisc vs or32

2015-06-12 Thread Michal Privoznik
With a few exceptions, we assume that qemu binary for given architecture has form of qemu-system-$arch. Well, openrisc is yet another exception. It's binary is called qemu-system-or32. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 4 1 file changed, 4 insertions(+) dif

[libvirt] [PATCH] virCapabilitiesDomainDataLookup: Produce saner error message

2015-06-12 Thread Michal Privoznik
During a review, I've noticed this error message that was eventually produced when I was trying to define a domain: error: invalid argument: could not find capabilities for arch=mips64el domaintype=(null) Look at the (null). Why is it there? Well, during XML parsing, we try to look up the default

Re: [libvirt] [PATCH] scsi: Need to translate disk source pool in config attach path

2015-06-12 Thread John Ferlan
On 06/12/2015 07:52 AM, Erik Skultety wrote: > > > On 06/12/2015 01:10 PM, John Ferlan wrote: >> >> >> On 06/12/2015 04:57 AM, Erik Skultety wrote: >>> >>> >>> On 06/11/2015 11:15 PM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1228007 When attaching a scsi vol

Re: [libvirt] Accessing libvirtd remotely as non-root user

2015-06-12 Thread Dan Mossor
On 06/12/2015 03:48 AM, Daniel P. Berrange wrote: On Thu, Jun 11, 2015 at 05:26:20PM -0500, Dan Mossor wrote: I manage libvirtd on a few remote machines, and my security policies require me to disable root login via SSH. Up to this point, I've been using root due to the systems being in staging,

[libvirt] [PATCH] virsysinfo: s/system/sysdef/

2015-06-12 Thread Michal Privoznik
A variable can't be named system, obviously. Well, it can if the compiler is new enough to distinguish a variable named system and a function call system(). And some older systems, don't have wise compiler. Whatever. CC util/libvirt_util_la-virsysinfo.lo cc1: warnings being treated as errors

[libvirt] [PATCH] qemu: Report all supported machine types in capabilities

2015-06-12 Thread Jiri Denemark
Some machine types are only reported as canonical names for other machine types, which make it a bit harder to find what machine types are supported by a specific QEMU binary. Ideally, one would just use /capabilities/guest/arch[@name='...']/machine/text() XPath to get a list of all supported machi

[libvirt] [PATCH] add more domain memory functions

2015-06-12 Thread Vasiliy Tolstov
* libvirt_domain_set_max_memory * libvirt_domain_set_memory * libvirt_domain_set_memory_flags Signed-off-by: Vasiliy Tolstov --- src/libvirt-php.c | 75 ++- src/libvirt-php.h | 3 +++ 2 files changed, 77 insertions(+), 1 deletion(-) diff --gi

[libvirt] [PATCH] conf: Fix virDomainObjGetDefs when getting persistent config on a live vm

2015-06-12 Thread Peter Krempa
If @flags contains only VIR_DOMAIN_AFFECT_CONFIG and @vm is active, the function would return the active config rather than the persistent one that it should return. This happened due to the fact that virDomainObjGetDefs was checking the updated flags which may not contain VIR_DOMAIN_AFFECT_LIVE if

Re: [libvirt] [PATCH] scsi: Need to translate disk source pool in config attach path

2015-06-12 Thread Erik Skultety
On 06/12/2015 01:10 PM, John Ferlan wrote: > > > On 06/12/2015 04:57 AM, Erik Skultety wrote: >> >> >> On 06/11/2015 11:15 PM, John Ferlan wrote: >>> https://bugzilla.redhat.com/show_bug.cgi?id=1228007 >>> >>> When attaching a scsi volume lun via the attach-device --config or >>> --persistent o

Re: [libvirt] [PATCH] network: add an option to make dns public

2015-06-12 Thread John Ferlan
On 06/11/2015 01:37 PM, Laine Stump wrote: > On 06/10/2015 03:56 PM, John Ferlan wrote: >> >> On 06/01/2015 07:54 AM, Cédric Bosdonnat wrote: >>> In some use cases we don't want the virtual network's DNS to only >>> listen to the vnet interface. Adding a publiclyAccessible attribute > > :-) Real

[libvirt] [PATCH] scsi: Adjust return status from getBlockDevice

2015-06-12 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1224233 Currently it's not possible to determine the difference between a fatal memory allocation or failure to open/read the directory error with a perhaps less fatal, I didn't find the "block" device in the directory (which may be a disk entry without

Re: [libvirt] [PATCH] scsi: Need to translate disk source pool in config attach path

2015-06-12 Thread John Ferlan
On 06/12/2015 04:57 AM, Erik Skultety wrote: > > > On 06/11/2015 11:15 PM, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1228007 >> >> When attaching a scsi volume lun via the attach-device --config or >> --persistent options, there was no translation of the source pool >> l

[libvirt] [PATCH v2] qemu: Use heads parameter for QXL driver

2015-06-12 Thread Frediano Ziglio
Allows to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio The patch to support the "max_outputs" in Qemu is still not merged but I got agreement on the name of the argument. Actually can be a compatiblity problem as heads in the XML configuration was set by default

[libvirt] [PATCH v2] virSysinfo: Introduce SMBIOS type 2 support

2015-06-12 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1220527 This type of information defines attributes of a system baseboard. With one caveat: in qemu they call it family, while in the specification it's referred to as type. I'm sticking with the latter. Signed-off-by: Michal Privoznik --- diff to v1

Re: [libvirt] [RFC] get guest OS infos

2015-06-12 Thread zhang bo
On 2015/6/12 17:05, Daniel P. Berrange wrote: > On Fri, Jun 12, 2015 at 04:56:17PM +0800, zhang bo wrote: >> On 2015/6/11 21:54, Daniel P. Berrange wrote: >> >>> On Thu, Jun 11, 2015 at 08:47:12AM -0500, Dennis Jenkins wrote: On Thu, Jun 11, 2015 at 3:51 AM, Daniel P. Berrange wrote: >>

Re: [libvirt] [RFC] get guest OS infos

2015-06-12 Thread Daniel P. Berrange
On Fri, Jun 12, 2015 at 04:56:17PM +0800, zhang bo wrote: > On 2015/6/11 21:54, Daniel P. Berrange wrote: > > > On Thu, Jun 11, 2015 at 08:47:12AM -0500, Dennis Jenkins wrote: > >> On Thu, Jun 11, 2015 at 3:51 AM, Daniel P. Berrange > >> wrote: > >> > >>> On Thu, Jun 11, 2015 at 09:17:30AM +0100,

Re: [libvirt] [PATCH] scsi: Need to translate disk source pool in config attach path

2015-06-12 Thread Erik Skultety
On 06/11/2015 11:15 PM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1228007 > > When attaching a scsi volume lun via the attach-device --config or > --persistent options, there was no translation of the source pool > like there was for the live path, thus the attempt to modi

Re: [libvirt] [RFC] get guest OS infos

2015-06-12 Thread zhang bo
On 2015/6/11 21:54, Daniel P. Berrange wrote: > On Thu, Jun 11, 2015 at 08:47:12AM -0500, Dennis Jenkins wrote: >> On Thu, Jun 11, 2015 at 3:51 AM, Daniel P. Berrange >> wrote: >> >>> On Thu, Jun 11, 2015 at 09:17:30AM +0100, Daniel P. Berrange wrote: On Thu, Jun 11, 2015 at 01:51:33PM +0800

Re: [libvirt] Accessing libvirtd remotely as non-root user

2015-06-12 Thread Daniel P. Berrange
On Thu, Jun 11, 2015 at 05:26:20PM -0500, Dan Mossor wrote: > I manage libvirtd on a few remote machines, and my security policies require > me to disable root login via SSH. Up to this point, I've been using root due > to the systems being in staging, but this is the final step before they're > mo

[libvirt] [PATCH] tests: Distribute virnetserverdata

2015-06-12 Thread Michal Privoznik
Fairly recently we've introduced virnetservertest. This test has some input data stored under tests/virnetserverdata which unfortunately was not distributed among with the test. Therefore 'make distcheck' failed. Fix this by adding the directory into EXTRA_DIST. Signed-off-by: Michal Privoznik --