Re: [libvirt] Can't connect ESXi ssl with virsh

2012-03-05 Thread Hu Tao
On Mon, Mar 05, 2012 at 02:50:51AM -0500, Zhimou Peng wrote: And my CA is also my client in this case. I just noticed it. 4, change the ESXi to maintance mode and change ssl keys on /etc/vmware/ssl. restart hostd server then quit the maintance mode. Steps of changing the default

[libvirt] [Patch]: spice agent-mouse support [v3]

2012-03-05 Thread Zhou Peng
Signed-off-by: Zhou Peng zhoup...@nfs.iscas.ac.cn spice agent-mouse support Usage: graphics type='spice' mouse mode='client'|'server'/ graphics/ diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 6fcca94..0adf859 100644 --- a/docs/formatdomain.html.in +++

Re: [libvirt] Can't connect ESXi ssl with virsh

2012-03-05 Thread Zhimou Peng
I'll have a try :) Thanks - Original Message - From: Hu Tao hu...@cn.fujitsu.com To: Zhimou Peng zhp...@redhat.com Cc: libvir-list@redhat.com, Tingting Zheng tzh...@redhat.com Sent: Monday, March 5, 2012 4:09:59 PM Subject: Re: [libvirt] Can't connect ESXi ssl with virsh On Mon, Mar 05,

Re: [libvirt] Can't connect ESXi ssl with virsh

2012-03-05 Thread Zhimou Peng
Ehh...I followed the ESXi5.0 guide.(my ENV is ESXi) http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.security.doc_50/GUID-A261E6D8-03E4-48ED-ADB6-473C2DAAB7AD.html

Re: [libvirt] [PATCH] cpu: Add new flag supported by qemu to the cpu definition

2012-03-05 Thread Peter Krempa
On 03/03/2012 03:06 AM, Eric Blake wrote: On 02/29/2012 07:53 AM, Peter Krempa wrote: Some new cpu features were added to qemu. This patch adds some of them to our CPU map. --- Thanks; that helped review. ACK. Pushed; Thanks Peter -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 2/9] docs: Add documentation for new attribute tray of disk target

2012-03-05 Thread Osier Yang
Example XML: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/tmp/cdrom.img'/ target dev='hdd' bus='ide' tray='open'/ /disk --- docs/formatdomain.html.in | 13 + docs/schemas/domaincommon.rng |8 2 files

[libvirt] [PATCH 1/9] Add support for event tray moved of removable disks

2012-03-05 Thread Osier Yang
This patch introduces a new event type for the QMP event DEVICE_TRAY_MOVED, which occurs when the tray of a removable disk is moved (i.e opened or closed): VIR_DOMAIN_EVENT_ID_TRAY_MOVED The event's data includes the device alias and the tray's status, which indicates whether the tray has

[libvirt] [PATCH 3/9] conf: Parse and for the tray attribute

2012-03-05 Thread Osier Yang
The tray is only allowed for removable disks, i.e. CDROM and Floppy disks. As the value for tray defaults to closed, lots of tests are updated to include tray='closed' in the disk target XML. --- src/conf/domain_conf.c | 33 +++-

[libvirt] [PATCH 5/9] qemu: Update tray status while tray moved event is emitted

2012-03-05 Thread Osier Yang
With this patch, libvirt won't start the guest with the medium source which already ejected by guest when doing migration, or saving/restoring. --- src/qemu/qemu_process.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c

[libvirt] [PATCH 0/9] Add supports for three new QMP events

2012-03-05 Thread Osier Yang
This patch series adds support for 3 new QMP events: WAKEUP, SUSPEND, and DEVICE_TRAY_MOVED, and related changes on domain's conf and status. [1/9] Add support for tray moved event [2/9] ~ [5/9]: New attribute tray is added to disk target, it indicates the tray status of removable disk, i.e.

[libvirt] [PATCH 8/9] qemu: Update domain status to paused while suspend event is emitted

2012-03-05 Thread Osier Yang
This introduces a new paused reason VIR_DOMAIN_PAUSED_SUSPEND, and new suspend event type VIR_DOMAIN_EVENT_SUSPENDED_SUSPEND. While a SUSPEND event occurs, the running domain status will be transferred to paused with reason VIR_DOMAIN_PAUSED_SUSPEND, and a new domain lifecycle event emitted with

[libvirt] [PATCH 4/9] qemu: Do not start with source for removable disks if tray is open

2012-03-05 Thread Osier Yang
This is similiar with physical world, one will be surprised if the box starts with medium exists while the tray is open. New tests are added, tests disk-{cdrom,floppy}-tray are for the qemu supports -device flag, and disk-{cdrom,floppy}-no-device-cap are for old qemu, i.e. which doesn't support

[libvirt] [PATCH 6/9] Add support for the wakeup event

2012-03-05 Thread Osier Yang
This patch introduces a new event type for the QMP event WAKEUP: VIR_DOMAIN_EVENT_ID_WAKEUP The event doesn't take any data. Thus the callback definition is: typedef void (*virConnectDomainEventWakeupCallback)(virConnectPtr conn, virDomainPtr dom,

[libvirt] [PATCH 7/9] Add support for the event suspend

2012-03-05 Thread Osier Yang
This patch introduces a new event type for the QMP event SUSPEND: VIR_DOMAIN_EVENT_ID_SUSPEND The event doesn't take any data. Thus the callback definition is: typedef void (*virConnectDomainEventSuspendCallback)(virConnectPtr conn, virDomainPtr dom,

[libvirt] [PATCH 9/9] qemu: Update domain status to running while wakeup event is emitted

2012-03-05 Thread Osier Yang
This introduces a new running reason VIR_DOMAIN_RUNNING_WAKEUP, and new suspend event type VIR_DOMAIN_EVENT_STARTED_WAKEUP. While a wakeup event is emitted, the domain which was paused with reason VIR_DOMAIN_PAUSED_SUSPEND will be transferred to running with reason VIR_DOMAIN_RUNNING_WAKEUP, and

[libvirt] [PATCH] qemu: Fix indention

2012-03-05 Thread Osier Yang
Pushed under trivial rule. --- src/qemu/qemu_driver.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2afcc3f..27478c0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12136,10 +12136,10 @@

[libvirt] [PATCH] Fix typo and add missed comment for diskChange callback

2012-03-05 Thread Osier Yang
Comment for parameter devAlias is missed. And a typo should be caused by copy paste. -- Pushed under trivial rule. --- include/libvirt/libvirt.h.in |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index

Re: [libvirt] [PATCH] build: Fix build with dtrace + apparmor

2012-03-05 Thread Jiri Denemark
On Thu, Mar 01, 2012 at 08:45:20 -0700, Eric Blake wrote: On 03/01/2012 08:12 AM, Jiri Denemark wrote: Building virt-aa-helper with dtrace probes enabled, ldd complained about undefined references: ./.libs/libvirt_util.a(libvirt_util_la-event_poll.o):(.note.stapsdt+0x24): undefined

Re: [libvirt] [PATCH] rpc: Fix client crash on connection close

2012-03-05 Thread Jiri Denemark
On Fri, Mar 02, 2012 at 16:12:16 -0700, Eric Blake wrote: On 03/02/2012 01:49 PM, Jiri Denemark wrote: A multi-threaded client with event loop may crash if one of its threads closes a connection while event loop is in the middle of sending keep-alive message (either request or response).

Re: [libvirt] [PATCH v2] libvirt-guests: Add parallel startup and shutdown of guests

2012-03-05 Thread Peter Krempa
On 03/03/2012 03:03 AM, Eric Blake wrote: On 03/01/2012 07:23 AM, Peter Krempa wrote: With this patch, it's possible to shut down guests in parallel. Parallel startup was possible before, but this functionality was not documented properly. To enable parallel startup set the START_DELAY to 0.

Re: [libvirt] [PATCH] qemu: Shared or readonly disks are always safe wrt migration

2012-03-05 Thread Michal Privoznik
On 05.03.2012 15:15, Jiri Denemark wrote: No matter what cache mode is used, readonly disks are always safe wrt migration. Shared disks are required to be readonly or to disable host-side cache, which makes them safe as well. --- src/qemu/qemu_migration.c |8 +--- 1 files changed, 5

[libvirt] [PATCH] qemu: Shared or readonly disks are always safe wrt migration

2012-03-05 Thread Jiri Denemark
No matter what cache mode is used, readonly disks are always safe wrt migration. Shared disks are required to be readonly or to disable host-side cache, which makes them safe as well. --- src/qemu/qemu_migration.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH] qemu: Shared or readonly disks are always safe wrt migration

2012-03-05 Thread Jiri Denemark
On Mon, Mar 05, 2012 at 15:20:10 +0100, Michal Privoznik wrote: On 05.03.2012 15:15, Jiri Denemark wrote: No matter what cache mode is used, readonly disks are always safe wrt migration. Shared disks are required to be readonly or to disable host-side cache, which makes them safe as well.

[libvirt] [PATCH] util: fail attempts to use same mac address for guest and tap

2012-03-05 Thread Laine Stump
This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=798467 If a guest's tap device is created using the same MAC address the guest uses for its own network card (which connects to the tap device), the Linux kernel will log the following message and traffic will not pass:

Re: [libvirt] [PATCH] util: fail attempts to use same mac address for guest and tap

2012-03-05 Thread Eric Blake
On 03/05/2012 09:05 AM, Laine Stump wrote: This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=798467 If a guest's tap device is created using the same MAC address the guest uses for its own network card (which connects to the tap device), the Linux kernel will log

Re: [libvirt] [PATCH 1/4] pci: Add two new pci utils pciDeviceGetVirtualFunctionInfo and pciConfigAddressToSysfsFile

2012-03-05 Thread Laine Stump
On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com pciDeviceGetVirtualFunctionInfo returns pf netdevice name and virtual function index for a given vf. This is just a wrapper around existing functions to return vf's pf and vf_index with one api call

Re: [libvirt] [PATCH] blockResize: add flag for bytes

2012-03-05 Thread Eric Blake
On 03/03/2012 05:36 PM, Laine Stump wrote: On 03/03/2012 09:48 AM, Eric Blake wrote: Qemu supports sizing by bytes; we shouldn't force the user to round up if they really wanted an unaligned total size. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_RESIZE_BYTES): New flag. *

Re: [libvirt] [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Laine Stump
On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions to replace and store vf configs (Only mac address is handled today. But the functions can be easily extended for vlans and

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-05 Thread Laine Stump
I encountered two conflicts when I rebased this patch to upstream. Noted in the comments. On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch includes the following changes - removes some netlink functions which are now available in virnetdev.c - Adds

[libvirt] [PATCH] Fix build after commit e3ba4025

2012-03-05 Thread Jim Fehlig
This patch fixes some build error I've encountered, but would prefer an ACK before pushing. Thanks, Jim From ff81637b66793fd4b2b46e8e04357e8d406dde31 Mon Sep 17 00:00:00 2001 From: Jim Fehlig jfeh...@suse.com Date: Mon, 5 Mar 2012 12:08:54 -0700 Subject: [PATCH] Fix build after commit e3ba4025

Re: [libvirt] [PATCH] Fix build after commit e3ba4025

2012-03-05 Thread Eric Blake
On 03/05/2012 12:17 PM, Jim Fehlig wrote: This patch fixes some build error I've encountered, but would prefer an ACK before pushing. Thanks, Jim +++ b/src/util/virnetdevvportprofile.c @@ -1071,7 +1071,7 @@ int virNetDevVPortProfileAssociate(const char *macvtap_ifname

[libvirt] [PATCH] util: eliminate crash in virNetDevMacVLanCreateWithVPortProfile

2012-03-05 Thread Laine Stump
From: root r...@vlap.laine.org Commit 723d5c (added after the release of 0.9.10) adds a NetlinkEventClient for each interface sent to virNetDevMacVLanCreateWithVPortProfile. This should only be done if the interface actually *has* a virtPortProfile, otherwise the event handler would be a NOP. The

Re: [libvirt] [PATCH] util: eliminate crash in virNetDevMacVLanCreateWithVPortProfile

2012-03-05 Thread Michal Privoznik
On 05.03.2012 20:42, Laine Stump wrote: From: root r...@vlap.laine.org Commit 723d5c (added after the release of 0.9.10) adds a NetlinkEventClient for each interface sent to virNetDevMacVLanCreateWithVPortProfile. This should only be done if the interface actually *has* a virtPortProfile,

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-05 Thread Roopa Prabhu
On 3/5/12 11:16 AM, Laine Stump la...@laine.org wrote: I encountered two conflicts when I rebased this patch to upstream. Noted in the comments. On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch includes the following changes - removes some

Re: [libvirt] [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Roopa Prabhu
On 3/5/12 10:23 AM, Laine Stump la...@laine.org wrote: On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions to replace and store vf configs (Only mac address is handled today.

Re: [libvirt] [PATCH] util: fail attempts to use same mac address for guest and tap

2012-03-05 Thread Laine Stump
On 03/05/2012 11:14 AM, Eric Blake wrote: On 03/05/2012 09:05 AM, Laine Stump wrote: This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=798467 If a guest's tap device is created using the same MAC address the guest uses for its own network card (which connects to

Re: [libvirt] [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Roopa Prabhu
On 3/5/12 11:50 AM, Roopa Prabhu ropra...@cisco.com wrote: On 3/5/12 10:23 AM, Laine Stump la...@laine.org wrote: On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions

Re: [libvirt] [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Laine Stump
On 03/05/2012 02:50 PM, Roopa Prabhu wrote: On 3/5/12 10:23 AM, Laine Stump la...@laine.org wrote: On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions to replace and store vf

Re: [libvirt] [PATCH] Fix build after commit e3ba4025

2012-03-05 Thread Jim Fehlig
Eric Blake wrote: On 03/05/2012 12:17 PM, Jim Fehlig wrote: +++ b/src/util/virnetlink.h @@ -55,7 +55,7 @@ int virNetlinkEventServiceStart(void); /** * virNetlinkEventServiceIsRunning: returns if the netlink event service is running. */ -bool

Re: [libvirt] [PATCH 12/17] qemu: refactor hotplug detach of hostdevs

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This refactoring is necessary to support hotplug detach of type=hostdev network devices, but needs to be in a separate patch to make potential debugging of regressions more practical. Rather than the lowest level functions searching for a matching

Re: [libvirt] [PATCH 14/17] qemu: support type='hostdev' network devices at domain start

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This patch makes sure that each network device (interface) of type='hostdev' appears on both the hostdevs list and the nets list of the virDomainDef, and it modifies the qemu driver startup code so that these devices will be presented to qemu on the

Re: [libvirt] [PATCH 15/17] conf: change virDomainNetRemove from static to global

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This exact code is duplicated in qemuDomainDetachNetDevice(). --- New patch in V2. (yeah, I just noticed the movement of the virDomainHostdevXX() declarations in this patch; I guess I was rearranging for consistent ordering. If this concerns anyone,

Re: [libvirt] [PATCH 13/17] conf: parse/format type='hostdev' network interfaces

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This is the new interface type that sets up a PCI/USB network device to be assigned to the guest with PCI/USB passthrough after initializing some network device-specific things from the config (e.g. MAC address, virtualport profile parameters). Here is

Re: [libvirt] [PATCH 16/17] qemu: use virDomainNetRemove instead of inline code

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: The code being replaced is exactly identical to the newly global function, right down to the comment. --- New patch in V2 src/qemu/qemu_hotplug.c | 14 +- 1 files changed, 1 insertions(+), 13 deletions(-) ACK definitely. Michal --

Re: [libvirt] [PATCH 17/17] qemu: support type=hostdev network device hotplug attach/detach

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: qemuDomainAttachNetDevice - re-ordered some things at start of function because networkAllocateActualDevice should always be run and a slot in def-nets always allocated, but host_net_add isn't needed if the actual type is hostdev. -

Re: [libvirt] [PATCH 15/17] conf: change virDomainNetRemove from static to global

2012-03-05 Thread Laine Stump
On 03/05/2012 03:45 PM, Michal Privoznik wrote: On 28.02.2012 21:14, Laine Stump wrote: This exact code is duplicated in qemuDomainDetachNetDevice(). --- New patch in V2. (yeah, I just noticed the movement of the virDomainHostdevXX() declarations in this patch; I guess I was rearranging for

Re: [libvirt] [PATCH 13/17] conf: parse/format type='hostdev' network interfaces

2012-03-05 Thread Laine Stump
On 03/05/2012 03:45 PM, Michal Privoznik wrote: On 28.02.2012 21:14, Laine Stump wrote: This is the new interface type that sets up a PCI/USB network device to be assigned to the guest with PCI/USB passthrough after initializing some network device-specific things from the config (e.g. MAC

Re: [libvirt] [PATCH 17/17] qemu: support type=hostdev network device hotplug attach/detach

2012-03-05 Thread Laine Stump
On 03/05/2012 03:46 PM, Michal Privoznik wrote: On 28.02.2012 21:14, Laine Stump wrote: qemuDomainAttachNetDevice - re-ordered some things at start of function because networkAllocateActualDevice should always be run and a slot in def-nets always allocated, but host_net_add isn't

[libvirt] [PATCHv2 09/15] xml: use better types for memory values

2012-03-05 Thread Eric Blake
Using 'unsigned long' for memory values is risky on 32-bit platforms, as a PAE guest can have more than 4GiB memory. Our API is (unfortunately) locked at 'unsigned long' and a scale of 1024, but the rest of our system should consistently use 64-bit values, especially since the previous patch

[libvirt] [PATCHv2 03/15] util: new function for scaling numbers

2012-03-05 Thread Eric Blake
Scaling an integer based on a suffix is something we plan on reusing in several contexts: XML parsing, virsh CLI parsing, and possibly elsewhere. Make it easy to reuse, as well as adding in support for powers of 1000. * src/util/util.h (virScaleInteger): New function. * src/util/util.c

[libvirt] [PATCHv2 00/15] clean up unit handling of memory and storage

2012-03-05 Thread Eric Blake
This turned into a bigger project than I originally planned, but I'm happy with how things look after this series. v1 (memory): https://www.redhat.com/archives/libvir-list/2012-February/msg00959.html v1 (virsh): https://www.redhat.com/archives/libvir-list/2012-March/msg00108.html In this series:

[libvirt] [PATCHv2 13/15] virsh: add command aliases, and rename nodedev-detach

2012-03-05 Thread Eric Blake
Just because our public API has a typo doesn't mean that virsh has to keep the typo. * tools/virsh.c (VSH_CMD_FLAG_ALIAS): New flag. (nodedevCmds): Use it. (cmdHelp): Omit alias commands. (cmdNodeDeviceDettach): Rename... (cmdNodeDeviceDetach): ...to this. * tools/virsh.pod (nodedev-detach):

[libvirt] [PATCHv2 01/15] docs: use correct terminology for 1024 bytes

2012-03-05 Thread Eric Blake
Yes, I like kilobytes better than kibibytes (when I say kilobytes, I generally mean 1024). But since the term is ambiguous, it can't hurt to say what we mean, by using both the correct name and calling out the numeric equivalent. * src/libvirt.c (virDomainGetMaxMemory, virDomainSetMaxMemory)

[libvirt] [PATCHv2 06/15] storage: support more scaling suffixes

2012-03-05 Thread Eric Blake
Disk manufacturers are fond of quoting sizes in powers of 10, rather than powers of 2 (after all, 2.1 GB sounds larger than 2.0 GiB, even though the exact opposite is true). So, we might as well follow coreutils lead in supporting three types of suffix: single letter ${u} (which we already had)

[libvirt] [PATCHv2 12/15] virsh: use option aliases

2012-03-05 Thread Eric Blake
Command line interfaces should use dash, not underscore, as many keyboard layouts allow that to be typed with fewer shift key presses. Also, the US spelling of --tunneled gets more google hits than the UK spelling of --tunnelled. * tools/virsh.c (opts_migrate): Allow US variant.

[libvirt] [PATCHv2 04/15] xml: share 'unit' in RNG

2012-03-05 Thread Eric Blake
The code supported unit='E' for exabyte, but the RNG did not; conversely, the RNG supported z and y but the code did not (I'm jealous if you have that much storage, particularly since it won't fit in 64-bit off_t). Also, the code supported allocation unit='...', but not the RNG. In an effort to

[libvirt] [PATCHv2 14/15] virsh: improve storage unit parsing

2012-03-05 Thread Eric Blake
Now can now do: virsh vol-resize $vol 10M virsh blockresize $dom $vol 10M to get both interfaces to resize to 10MiB. The remaining wart is that vol-resize defaults to bytes, but blockresize defaults to KiB, but we can't break existing scripts; oh well, it's no worse than the same wart of the

[libvirt] [PATCHv2 07/15] xml: drop unenforced minimum memory limit from RNG

2012-03-05 Thread Eric Blake
The test domain allows memory0/memory, but the RNG was stating that memory had to be at least 4096000 bytes. Hypervisors should enforce their own limits, rather than complicating the RNG. Meanwhile, some copy and paste had introduced some fishy constructs in various unit tests. *

[libvirt] [PATCHv2 02/15] api: add overflow error

2012-03-05 Thread Eric Blake
Overflow can be user-induced, so it deserves more than being called an internal error. Note that in general, 32-bit platforms have far more places to trigger this error (anywhere the public API used 'unsigned long' but the other side of the connection is a 64-bit server); but some are possible on

[libvirt] [PATCHv2 15/15] virsh: improve memory unit parsing

2012-03-05 Thread Eric Blake
The last vestige of the inaccurate 'kilobytes' when we meant 1024 is now gone. And virsh is now useful for setting memory in units other than KiB. * tools/virsh.c (cmdSetmem, cmdSetmaxmem): Use new helper routine, allow passing bogus arguments on to hypervisor to test driver sanity checking, and

[libvirt] [PATCHv2 05/15] xml: output memory unit for clarity

2012-03-05 Thread Eric Blake
Make it obvious to 'dumpxml' readers what unit we are using, since our default of KiB for memory (1024) differs from qemu's default of MiB; while we use bytes for storage. Tests were updated via: $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i

[libvirt] [PATCHv2 10/15] xml: allow scaled memory on input

2012-03-05 Thread Eric Blake
Output is still in kibibytes, but input can now be in different scales for ease of typing. * src/conf/domain_conf.c (virDomainParseMemory): New helper. (virDomainDefParseXML): Use it when parsing. * docs/schemas/domaincommon.rng: Expand XML; rename memoryKBElement to memoryElement and update

[libvirt] [PATCHv2 11/15] virsh: add option aliases

2012-03-05 Thread Eric Blake
In the past, we have created some virsh options with less-than-stellar names. For back-compat reasons, those names must continue to parse, but we don't want to document them in help output. This introduces a new option type, an alias, which points to a canonical option name later in the option

[libvirt] [PATCHv2 08/15] xml: use long long internally, to centralize overflow checks

2012-03-05 Thread Eric Blake
On 64-bit platforms, unsigned long and unsigned long long are identical, so we don't have to worry about overflow checks. On 32-bit platforms, anywhere we narrow unsigned long long back to unsigned long, we have to worry about overflow; it's easier to do this in one place by having most of the

[libvirt] [PATCH 3/4 v3] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-05 Thread Roopa Prabhu
From: Roopa Prabhu ropra...@cisco.com This patch includes the following changes - removes some netlink functions which are now available in virnetdev.c - Adds a vf argument to all port profile functions For 802.1Qbh devices, the port profile calls can use a vf argument if passed by the caller.

[libvirt] [PATCH 2/4 v3] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Roopa Prabhu
From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions to replace and store vf configs (Only mac address is handled today. But the functions can be easily extended for vlans and other vf configs) - function to dump link dev info

[libvirt] [PATCH 4/4 v3] qemu_hostdev: Add support to install port profile and mac address on hostdevs

2012-03-05 Thread Roopa Prabhu
From: Roopa Prabhu ropra...@cisco.com These changes are applied only if the hostdev has a parent net device. If the parent netdevice has virtual port information, the original virtualport associate functions are called (these set and restore both mac and port profile on an interface). Else, only

[libvirt] [PATCH 0/4 v3] Support mac and port profile for interface type='hostdev'

2012-03-05 Thread Roopa Prabhu
v3: Changes include: - Review comments from Laine - rebased with latest upstream v2: changes include: - feedback from stefan for 802.1Qbg. Code now prints an error if virtualport is specified for 802.1Qbg on an interface of type hostdev - feedback from laine for non-sriov devices. Interface

[libvirt] [PATCH 1/4 v3] pci: Add two new pci utils pciDeviceGetVirtualFunctionInfo and pciConfigAddressToSysfsFile

2012-03-05 Thread Roopa Prabhu
From: Roopa Prabhu ropra...@cisco.com pciDeviceGetVirtualFunctionInfo returns pf netdevice name and virtual function index for a given vf. This is just a wrapper around existing functions to return vf's pf and vf_index with one api call pciConfigAddressToSysfsfile returns the sysfile pci device

Re: [libvirt] [PATCH] Add migration APIs for libxl driver

2012-03-05 Thread Jim Fehlig
Chunyan Liu wrote: Add migration APIs for libxl driver. Implemented in migration version 3. Based on xen 4.1. I didn't get a chance to test this yet, but have some initial review comments. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 617

Re: [libvirt] [PATCH] Add migration APIs for libxl driver

2012-03-05 Thread Chun Yan Liu
I didn't get a chance to test this yet, but have some initial review comments. Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 617 ++ src/libxl/libxl_driver.h | 17 ++- 2 files changed, 632 insertions(+), 2 deletions(-) diff