Re: [libvirt] [Qemu-devel] Question regarding Snapshots

2017-02-27 Thread Stefan Hajnoczi
On Wed, Feb 22, 2017 at 03:06:41PM -0600, Tim Cusack wrote: > I have a scenario that perhaps not many have attempted, but I still hope > that it is possible. > > Scenario: > > I would like to have a Base Windows 7 VM in KVM/QEMU. > > I would follow the following process (confirmed it works) >

[libvirt] [PATCH v2 05/14] conf: Introduce @access to

2017-02-27 Thread Michal Privoznik
Now that NVDIMM has found its way into libvirt, users might want to fine tune some settings for each module separately. One such setting is 'share=on|off' for the memory-backend-file object. This setting - just like its name suggest already - enables sharing the nvdimm module with other

[libvirt] [PATCH v2 02/14] Introduce NVDIMM memory model

2017-02-27 Thread Michal Privoznik
NVDIMM is new type of memory introduced into QEMU 2.6. The idea is that we have a Non-Volatile memory module that keeps the data persistent across domain reboots. At the domain XML level, we already have some representation of 'dimm' modules. Long story short, we have element that lives under .

[libvirt] [PATCH v2 04/14] qemu: Implement NVDIMM

2017-02-27 Thread Michal Privoznik
So, majority of the code is just ready as-is. Well, with one slight change: differentiate between dimm and nvdimm in places like device alias generation, generating the command line and so on. Speaking of the command line, we also need to append 'nvdimm=on' to the '-machine' argument so that the

[libvirt] [PATCH v2 06/14] qemu: Implement @access for banks

2017-02-27 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c| 11 +++-- src/qemu/qemu_command.h| 1 + src/qemu/qemu_hotplug.c| 2 +- .../qemuxml2argv-memory-hotplug-nvdimm-access.args |

[libvirt] [PATCH v2 13/14] qemu: Allow nvdimm in devices CGroups

2017-02-27 Thread Michal Privoznik
Some users might want to pass a blockdev or a chardev as a backend for NVDIMM. In fact, this is expected to be the mostly used configuration. Therefore libvirt should allow the device in devices CGroup then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 49

Re: [libvirt] [PATCH 0/8] Converge Storage Pool vHBA logic with Node Device

2017-02-27 Thread John Ferlan
ping? Don't bother with the 8th patch since that seems to be a moot point now given that a callback mechanism between qemu and nodedev seems to have been taken off the table after Daniel and Paolo's discussion. Tks - John On 02/20/2017 08:18 AM, John Ferlan wrote: > Similar to the recent node

Re: [libvirt] [Qemu-devel] Question regarding Snapshots

2017-02-27 Thread Kashyap Chamarthy
On Mon, Feb 27, 2017 at 01:33:56PM +0100, Kashyap Chamarthy wrote: [...] > > > Can you make a snapshot, then go back to the base and ignore that snapshot > > > like a closed branch, make another snapshot, and then go back and forth > > > from each to each? > > If you edit the '--disk' element

[libvirt] [PATCH v2 07/14] qemu: Introduce label-size for NVDIMMs

2017-02-27 Thread Michal Privoznik
For NVDIMM devices it is optionally possible to specify the size of internal storage for namespaces. Namespaces are a feature that allows users to partition the NVDIMM for different uses. Signed-off-by: Michal Privoznik --- docs/formatdomain.html.in

[libvirt] [PATCH v2 14/14] qemu: Namespaces for NVDIMM

2017-02-27 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 76 + src/qemu/qemu_domain.h | 8 ++ src/qemu/qemu_hotplug.c | 11 +++ 3 files changed, 95 insertions(+) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH v2 09/14] security_selinux: Label host side of NVDIMM

2017-02-27 Thread Michal Privoznik
When domain is being started up, we ought to relabel the host side of NVDIMM so qemu has access to it. Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 66 + 1 file changed, 66 insertions(+) diff --git

Re: [libvirt] [PATCH v2 04/14] qemu: Refactor hotplug to introduce qemuDomain{Add|Del}TLSObjects

2017-02-27 Thread John Ferlan
On 02/27/2017 04:41 AM, Jiri Denemark wrote: > On Thu, Feb 23, 2017 at 13:42:06 -0500, John Ferlan wrote: >> Refactor the TLS object adding code to make two separate API's that will >> handle the add/remove of the "secret" and "tls-creds-x509" objects including >> the Enter/Exit monitor

[libvirt] [PATCH v2 10/14] security: Introduce internal APIs for memdev labelling

2017-02-27 Thread Michal Privoznik
These APIs will be used whenever we are hot (un-)plugging a memdev. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms| 2 ++ src/security/security_driver.h | 9 +++ src/security/security_manager.c | 56 +

Re: [libvirt] [Qemu-devel] Question regarding Snapshots

2017-02-27 Thread Kashyap Chamarthy
On Mon, Feb 27, 2017 at 11:01:06AM +, Stefan Hajnoczi wrote: > On Wed, Feb 22, 2017 at 03:06:41PM -0600, Tim Cusack wrote: > > I have a scenario that perhaps not many have attempted, but I still hope > > that it is possible. > > > > Scenario: > > > > I would like to have a Base Windows 7 VM

Re: [libvirt] Fail to start 2nd guest

2017-02-27 Thread Peter Krempa
On Mon, Feb 27, 2017 at 13:31:30 +, Stefan Hajnoczi wrote: > On Mon, Feb 27, 2017 at 08:50:03PM +0800, Xiong Zhou wrote: > > On Mon, Feb 27, 2017 at 10:11:04AM +, Stefan Hajnoczi wrote: > > > On Mon, Feb 27, 2017 at 05:40:50PM +0800, Xiong Zhou wrote: [...] > > > > sh-4.2# virsh start

Re: [libvirt] [PATCH v2 03/14] qemu: Move exit monitor calls in failure paths

2017-02-27 Thread John Ferlan
On 02/27/2017 03:48 AM, Jiri Denemark wrote: > On Thu, Feb 23, 2017 at 13:42:05 -0500, John Ferlan wrote: >> Since qemuDomainObjExitMonitor can also generate error messages, >> let's move it inside any error message saving code on error paths >> for various hotplug add activities. >> >>

[libvirt] [PATCH v2 03/14] qemu: Introduce QEMU_CAPS_DEVICE_NVDIMM

2017-02-27 Thread Michal Privoznik
Introduce a qemu capability for -device nvdimm. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 9 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 00/14] Introduce NVDIMM support

2017-02-27 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2017-February/msg01229.html How to test this feature? $ > /tmp/nvdimm $ truncate --size 512M /tmp/nvdimm $ virsh edit $mydom /tmp/nvdimm 512 0 128

[libvirt] [PATCH v2 01/14] qemuBuildMemoryBackendStr: Reorder args and update comment

2017-02-27 Thread Michal Privoznik
Frankly, this function is one big mess. A lot of arguments, complicated behaviour. It's really surprising that arguments were in random order (input and output arguments were mixed together), the documentation was outdated, the description of return values was bogus. Signed-off-by: Michal

[libvirt] [PATCH v2 08/14] security_dac: Label host side of NVDIMM

2017-02-27 Thread Michal Privoznik
When domain is being started up, we ought to relabel the host side of NVDIMM so qemu has access to it. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 73 + 1 file changed, 73 insertions(+) diff --git

Re: [libvirt] Fail to start 2nd guest

2017-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2017 at 08:50:03PM +0800, Xiong Zhou wrote: > On Mon, Feb 27, 2017 at 10:11:04AM +, Stefan Hajnoczi wrote: > > On Mon, Feb 27, 2017 at 05:40:50PM +0800, Xiong Zhou wrote: > > > It worked fine on Linus tree commit: > > > 7bb0338 Merge tag 'rodata-v4.11-rc1' of

[libvirt] [PATCH v2 11/14] secdrivers: Implement memdev relabel APIs

2017-02-27 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 3 +++ src/security/security_nop.c | 19 +++ src/security/security_selinux.c | 3 +++ 3 files changed, 25 insertions(+) diff --git a/src/security/security_dac.c

[libvirt] [PATCH v2 12/14] qemu_hotplug: Relabel memdev

2017-02-27 Thread Michal Privoznik
Now that we have APIs for relabel memdevs on hotplug, fill in the missing implementation in qemu hotplug code. The qemuSecurity wrappers might look like overkill for now, because qemu namespace code does not deal with the nvdimms yet. Nor does our cgroup code. But hey, there's cgroup_device_acl

[libvirt] Ping Re: A question for external snapshots with flag“VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE”

2017-02-27 Thread WangJie (Captain)
On 2017/2/25 9:41, WangJie (Captain) wrote: > Hello, I got a question here. When we create consistent active external > snapshots with flag “VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE” , the > qemuDomainSnapshotFSFreeze will be called firstly to freeze all filesystems > in vm, and then create

Re: [libvirt] [PATCH 5/8] storage: Move/rename createVport and deleteVport

2017-02-27 Thread Michal Privoznik
On 20.02.2017 14:18, John Ferlan wrote: > Move the bulk of the code to the node_device_conf and rename to > virNodeDevice{Create|Delete}Vport. > > Alter the create algorithm slightly in order to return the name of > the scsi_host vHBA that was created. The existing code would fetch > the name and

Re: [libvirt] [PATCH 4/8] util: Rename virFileWaitForDevices

2017-02-27 Thread Michal Privoznik
On 20.02.2017 14:18, John Ferlan wrote: > The function is actually in virutil.c, but prototyped in virfile.h. > This patch fixes that by renaming the function to virWaitForDevices, > adding the prototype in virutil.h and libvirt_private.syms, and then > changing the callers to use the new name. >

Re: [libvirt] [PATCH 3/8] util: Convert virStoragePoolSourceAdapter to virStorageAdapter

2017-02-27 Thread Michal Privoznik
On 20.02.2017 14:18, John Ferlan wrote: > Introduce src/util/virstoragedevice.{c,h}. Rather than have virstoragefile > be a repository for more things - create a new module to share the adapter > definitions between the storage pool and eventually the domain. The devices > will need device address

Re: [libvirt] Redhat 7: cgroup CPUACCT controller is not mounted

2017-02-27 Thread youssef.elfathi
Sorry , please ignore my message I used the wrong mailing-list! -Original Message- From: EL FATHI Youssef OBS/OINIS Sent: Monday, February 27, 2017 14:40 To: 'libvir-list@redhat.com' Subject: Redhat 7: cgroup CPUACCT controller is not mounted Hi, With a non-root user account, I am

Re: [libvirt] docs: Document the new hostdev and address type 'mdev'

2017-02-27 Thread Alex Williamson
On Mon, 27 Feb 2017 11:03:42 +0100 Erik Skultety wrote: > On Mon, Feb 27, 2017 at 09:33:51AM +0100, Martin Polednik wrote: > > On 20/02/17 15:28 +0100, Erik Skultety wrote: > > > Signed-off-by: Erik Skultety > > > --- > > > docs/formatdomain.html.in |

[libvirt] Redhat 7: cgroup CPUACCT controller is not mounted

2017-02-27 Thread youssef.elfathi
Hi, With a non-root user account, I am launching virtual machines and would like to get CPU stats for each Core (using python API or not) but face the following problem: - When I issue the command "virsh --readonly cpu-stats MY_DOMAIN" I got the following error: error: Failed to retrieve CPU

Re: [libvirt] [RFC PATCH v2 REBASE 00/18] Introduce vGPU mdev framework to libvirt

2017-02-27 Thread Alex Williamson
On Mon, 27 Feb 2017 10:55:26 +0100 Erik Skultety wrote: > On Fri, Feb 24, 2017 at 11:10:00AM -0700, Alex Williamson wrote: > > On Mon, 20 Feb 2017 15:28:13 +0100 > > Erik Skultety wrote: > > > > > since the original v2 [1]: > > > - resolved a few

[libvirt] [PULL 10/11] i386: Implement query-cpu-model-expansion QMP command

2017-02-27 Thread Eduardo Habkost
Implement query-cpu-model-expansion for target-i386. This should meet all the requirements while being simple. In the case of static expansion, it will use the new "base" CPU model, and in the case of full expansion, it will keep the original CPU model name+props, and append extra properties. A

Re: [libvirt] [PATCH 4/8] util: Rename virFileWaitForDevices

2017-02-27 Thread Laine Stump
On 02/20/2017 08:18 AM, John Ferlan wrote: The function is actually in virutil.c, but prototyped in virfile.h. This patch fixes that by renaming the function to virWaitForDevices, adding the prototype in virutil.h and libvirt_private.syms, and then changing the callers to use the new name.

Re: [libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-27 Thread Michal Privoznik
On 20.02.2017 14:18, John Ferlan wrote: > Add a new test to fchosttest in order to test creation of our vHBA > via the Storage Pool logic. Unlike the real code, we cannot yet use > the virVHBA* API's because they (currently) traverse the file system > in order to get the parent vport capable

Re: [libvirt] [PATCH 1/8] conf: Fix leak in virNodeDeviceDefParseXML

2017-02-27 Thread Michal Privoznik
On 20.02.2017 14:18, John Ferlan wrote: > The 'nodes' is overwritten after the first usage and possibly leaked > if any code in the first set of parsing goes to error. > > Found by Coverity. > > Signed-off-by: John Ferlan > --- > src/conf/node_device_conf.c | 10 --

[libvirt] [PATCH 0/2] fix migration related graphics listen code bugs

2017-02-27 Thread Pavel Hrdina
Pavel Hrdina (2): conf: store "autoGenerated" for graphics listen in status XML conf: properly skip graphics listen element in migratable XML src/conf/domain_conf.c | 18 +- src/qemu/qemu_domain.c | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) -- 2.11.1 --

[libvirt] [PATCH 1/2] conf: store "autoGenerated" for graphics listen in status XML

2017-02-27 Thread Pavel Hrdina
When libvirtd is started we call qemuDomainRecheckInternalPaths to detect whether a domain has VNC socket path generated by libvirt based on option from qemu.conf. However if we are parsing status XML for running domain the existing socket path can be generated also if the config XML uses the new

Re: [libvirt] [Qemu-devel] Question regarding Snapshots

2017-02-27 Thread Eric Blake
On 02/27/2017 07:17 AM, Kashyap Chamarthy wrote: > On Mon, Feb 27, 2017 at 01:33:56PM +0100, Kashyap Chamarthy wrote: > > [...] > Can you make a snapshot, then go back to the base and ignore that snapshot like a closed branch, make another snapshot, and then go back and forth from

Re: [libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-27 Thread Michal Privoznik
On 27.02.2017 17:50, John Ferlan wrote: > > > On 02/27/2017 10:36 AM, Michal Privoznik wrote: >> On 20.02.2017 14:18, John Ferlan wrote: >>> Add a new test to fchosttest in order to test creation of our vHBA >>> via the Storage Pool logic. Unlike the real code, we cannot yet use >>> the

[libvirt] [PATCH 2/2] conf: properly skip graphics listen element in migratable XML

2017-02-27 Thread Pavel Hrdina
We should skip only if the 'socket' path is specified because if there is no 'socket' path we need to keep that element in migratable XML. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1366088 Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 1 + 1 file

Re: [libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-27 Thread John Ferlan
On 02/27/2017 10:36 AM, Michal Privoznik wrote: > On 20.02.2017 14:18, John Ferlan wrote: >> Add a new test to fchosttest in order to test creation of our vHBA >> via the Storage Pool logic. Unlike the real code, we cannot yet use >> the virVHBA* API's because they (currently) traverse the file

Re: [libvirt] [PATCH 1/8] conf: Fix leak in virNodeDeviceDefParseXML

2017-02-27 Thread Laine Stump
On 02/20/2017 08:18 AM, John Ferlan wrote: The 'nodes' is overwritten after the first usage and possibly leaked if any code in the first set of parsing goes to error. ACK. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 6/8] util: Alter virNodeDevice{Create|Delete}Vport to use nodedev APIs

2017-02-27 Thread Laine Stump
On 02/20/2017 08:18 AM, John Ferlan wrote: If we have a connection pointer there's no sense walking through the sysfs in order to create/destroy the vHBA. Instead, let's make use of the node device create/destroy API's. Since we don't have to rewrite all the various parent options for the test

Re: [libvirt] [Qemu-devel] [PATCH RESEND] qdev: Make "hotplugged" property read-only

2017-02-27 Thread Markus Armbruster
Eduardo Habkost writes: > The "hotplugged" property is user visible, but it was never meant > to be set by the user. There are probably multiple ways to break > or crash device code by overriding the property. For example, we > recently fixed a crash in rtc_set_memory()

Re: [libvirt] docs: Document the new hostdev and address type 'mdev'

2017-02-27 Thread Martin Polednik
On 20/02/17 15:28 +0100, Erik Skultety wrote: Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 48 +++ 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in

Re: [libvirt] [PATCH 6/8] util: Alter virNodeDevice{Create|Delete}Vport to use nodedev APIs

2017-02-27 Thread John Ferlan
On 02/27/2017 01:15 PM, Laine Stump wrote: > On 02/20/2017 08:18 AM, John Ferlan wrote: >> If we have a connection pointer there's no sense walking through the >> sysfs in order to create/destroy the vHBA. Instead, let's make use of >> the node device create/destroy API's. >> >> Since we don't

Re: [libvirt] [PATCH 3/8] util: Convert virStoragePoolSourceAdapter to virStorageAdapter

2017-02-27 Thread John Ferlan
On 02/27/2017 10:36 AM, Michal Privoznik wrote: > On 20.02.2017 14:18, John Ferlan wrote: >> Introduce src/util/virstoragedevice.{c,h}. Rather than have virstoragefile >> be a repository for more things - create a new module to share the adapter >> definitions between the storage pool and

Re: [libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-27 Thread John Ferlan
[...] >> Anyway, so as an adjustment at least here... I could move the hunk below >> the pool->active = 1 and before the event. Then drop the lock entirely >> before call the testCreateVport. Would also need to add a 'isLocked' so >> that the unlock isn't called unnecessarily. Of course that's

Re: [libvirt] [PATCH v2 03/14] qemu: Move exit monitor calls in failure paths

2017-02-27 Thread Jiri Denemark
On Thu, Feb 23, 2017 at 13:42:05 -0500, John Ferlan wrote: > Since qemuDomainObjExitMonitor can also generate error messages, > let's move it inside any error message saving code on error paths > for various hotplug add activities. > > Signed-off-by: John Ferlan > --- >

Re: [libvirt] [PATCH v2 04/14] qemu: Refactor hotplug to introduce qemuDomain{Add|Del}TLSObjects

2017-02-27 Thread Jiri Denemark
On Thu, Feb 23, 2017 at 13:42:06 -0500, John Ferlan wrote: > Refactor the TLS object adding code to make two separate API's that will > handle the add/remove of the "secret" and "tls-creds-x509" objects including > the Enter/Exit monitor commands. > > Signed-off-by: John Ferlan

Re: [libvirt] [RFC PATCH v2 REBASE 00/18] Introduce vGPU mdev framework to libvirt

2017-02-27 Thread Erik Skultety
On Fri, Feb 24, 2017 at 11:10:00AM -0700, Alex Williamson wrote: > On Mon, 20 Feb 2017 15:28:13 +0100 > Erik Skultety wrote: > > > since the original v2 [1]: > > - resolved a few merge conflicts caused by @9d92f533 which refactored out > > some > > duplicate code which

Re: [libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-02-27 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 05:36 PM +0100, "Daniel P. Berrange" wrote: > On Thu, Feb 23, 2017 at 05:22:44PM +0100, Marc Hartmayer wrote: >> On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik >> wrote: >> > On 02/23/2017 10:44 AM, Marc Hartmayer

Re: [libvirt] docs: Document the new hostdev and address type 'mdev'

2017-02-27 Thread Erik Skultety
On Mon, Feb 27, 2017 at 09:33:51AM +0100, Martin Polednik wrote: > On 20/02/17 15:28 +0100, Erik Skultety wrote: > > Signed-off-by: Erik Skultety > > --- > > docs/formatdomain.html.in | 48 > > +++ > > 1 file changed, 44

Re: [libvirt] [PATCH 00/14] Introduce NVDIMM support

2017-02-27 Thread Michal Privoznik
On 23.02.2017 10:02, Michal Privoznik wrote: > NVDIMMs are new type of ultra fast storage that's plugged into DIMM slot and > can hold the stored info throughout reboots. After all, NV stands for > non-volatile. In virtualization world, this has an awesome advantage - less > VM_EXITs on 'disk' IO.

Re: [libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-02-27 Thread Daniel P. Berrange
On Mon, Feb 27, 2017 at 10:59:39AM +0100, Marc Hartmayer wrote: > On Thu, Feb 23, 2017 at 05:36 PM +0100, "Daniel P. Berrange" > wrote: > > On Thu, Feb 23, 2017 at 05:22:44PM +0100, Marc Hartmayer wrote: > >> On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik > >>

[libvirt] [PATCH go v2] domain.go: wrong calculation of bitmask in PinVcpuFlags()

2017-02-27 Thread Leonid Podolny
--- domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.go b/domain.go index 2bd9852..7276ef8 100644 --- a/domain.go +++ b/domain.go @@ -1768,7 +1768,7 @@ func (d *Domain) PinVcpuFlags(vcpu uint, cpuMap []bool, flags DomainModification ccpumap :=