[libvirt] [RFC PATCH v2 00/12] qemu: add support to hot-plug/unplug cpu device
by Zhu Guihua
If you apply the folowing patchset in order
[PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support
https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01552.html,
[PATCH v2 0/5] Common unplug and unplug request cb for memory and CPU hot-unplug
https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg03929.html
and [PATCH v2 00/11] cpu: add i386 cpu hot remove support
https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01557.html,
qemu can support hotplug and hot-unplug cpu device.
So this patch series will make libvirt support hotplug and hot-unplug cpu
device for qemu driver.
This patch series add a new API to support cpu hot-plug/unplug, and leave the
existing API by invoking qemu command 'cpu-add' as a legacy.
This patch series realize cpu hot-plug/unplug by libvirt command
'attach-device' and 'detach-device', and invoke qemu command 'device_add'
and 'device_del' to support this feature.
v2:
- update cpu device's definition, and cpu's apic_id is hidded to users.
- add check for compatibility between host cpu and hot added cpu
- add a capability for *-x86_64-cpu
Zhu Guihua (12):
domain_conf: add support for cpu device configuration in XML
domain_conf: introduce cpu def helpers
domain_conf: introduce cpu device hotplug helpers
qemu_driver: implement cpu device hotplug on config level
qemu_command: introduce a func for cpu device alias assignment
domain_conf: allocate cpu's apic id dynamically
qemu: add a capability for x86_64-cpu
qemu: introduce qemuBuildCPUDeviceStr
qemu: implement cpu device hotplug on live level
qemu: implement cpu device hotunplug on live level
qemu_monitor_json: sort JSON array of cpu info
qemu_driver: detect threads corresponding to Vcpus
docs/formatdomain.html.in | 28 ++++
docs/schemas/domaincommon.rng | 3 +
src/conf/domain_conf.c | 189 +++++++++++++++++++++++++-
src/conf/domain_conf.h | 33 +++++
src/libvirt_private.syms | 6 +
src/qemu/qemu_capabilities.c | 3 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 120 +++++++++++++++++
src/qemu/qemu_command.h | 10 ++
src/qemu/qemu_driver.c | 299 ++++++++++++++++++++++++------------------
src/qemu/qemu_driver.h | 8 ++
src/qemu/qemu_hotplug.c | 140 ++++++++++++++++++++
src/qemu/qemu_hotplug.h | 12 ++
src/qemu/qemu_monitor_json.c | 31 ++++-
src/util/virbitmap.c | 2 +-
src/util/virbitmap.h | 2 +
16 files changed, 753 insertions(+), 134 deletions(-)
--
1.9.3
10 years
Re: [libvirt] Windows 7 guest installer does not detect drive if physical partition used instead of disk file.
by Stefan Hajnoczi
On Sat, Mar 21, 2015 at 01:50:46AM +0800, Emmanuel Noobadmin wrote:
> Running
> 3.18.9-200.fc21.x86_64
> qemu 2:2.1.3-3.fc21
> libvirt 1.2.9.2-1.fc21
> System is a Thinkpad X250 with Intel i7-5600u Broadwell GT2
>
> I'm trying to replace the Win7 installation on my laptop with Fedora
> 21 and virtualizing Windows 7 for work purposes. I'd prefer to give
> the guest its own NTFS partition instead of using a file for both
> performance and ease of potential recovery.
>
> So I've set aside unpartitioned space on the hard disk and added
> /dev/sda to the virt-manager storage pool, created a new volume and
> assigned it to the guest as an IDE drive. Unfortunately, the Windows 7
> installer does not see this drive despite being "IDE" and not virtio.
> If I use a qcow2 file as the drive, the installer has no problems
> detecting it.
>
> To eliminate virt-manager from the equation, I've also tried to do a
> very basic install using virt-install with similar results, the
> physical partition cannot be detected regardless of bus type
> (IDE/SATA/virtio) even with the signed Redhat virtio drivers loaded by
> the installer.
>
> I was unable to find any similar issues or solutions online except a 2
> year old thread on linuxquestions which quoted that we must specify
> the whole disk instead of a partition. However, I cannot find the
> source of that quote.
> http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90...
>
> Is this really the case and the reason why Windows 7 cannot see the
> physical partition or there is something else I am doing wrong?
I have CCed the libvirt mailing list, since KVM is a component here but
your question seems to be mainly about libvirt, virt-manager,
virt-install, etc.
It sounds like you want an NTFS partition on /dev/sda. That requires
passing the whole /dev/sda drive to the guest - and the Windows
installer might overwrite your GRUB Master Boot Record. Be careful when
trying to do this.
Also keep in mind that the virtual machine's hardware and your physical
hardware are probably quiet different (different chipsets, PCI devices,
etc). Windows might not be happy booting on the physical host if it was
installed under KVM, and vice versa. This is known as
physical-to-virtual (p2v) migration and means some tweaks or driver
installs may be necessary to make Windows run after switching.
Stefan
10 years
[libvirt] [PATCHv3 00/12] Add support for memory hotplug
by Peter Krempa
This version includes review feedback changes from John and also fixes the
<memory> element documentation and code that calculates it to support possible
non-NUMA configs with memory hotplug if any hypervisor would support that in the
future.
Peter Krempa (12):
qemu: monitor: Don't leak @props with non-JSON in qemuMonitorAddObject
libxl: Refactor logic in domain post parse callback
conf: Add support for parsing and formatting max memory and slot count
qemu: Implement setup of memory hotplug parameters
conf: Add device address type for dimm devices
conf: Add interface to parse and format memory device information
qemu: memdev: Add infrastructure to load memory device information
qemu: migration: Forbid migration with memory modules lacking info
qemu: add support for memory devices
qemu: conf: Add support for memory device cold(un)plug
qemu: Implement memory device hotplug
qemu: Implement memory device hotunplug
docs/formatdomain.html.in | 112 +++-
docs/schemas/domaincommon.rng | 76 +++
src/bhyve/bhyve_domain.c | 9 +-
src/conf/domain_conf.c | 576 ++++++++++++++++++++-
src/conf/domain_conf.h | 59 +++
src/libvirt_private.syms | 7 +
src/libxl/libxl_domain.c | 15 +-
src/lxc/lxc_domain.c | 8 +
src/openvz/openvz_driver.c | 14 +-
src/parallels/parallels_driver.c | 6 +-
src/phyp/phyp_driver.c | 6 +-
src/qemu/qemu_command.c | 166 +++++-
src/qemu/qemu_command.h | 15 +
src/qemu/qemu_domain.c | 80 +++
src/qemu/qemu_domain.h | 5 +
src/qemu/qemu_driver.c | 29 ++
src/qemu/qemu_hotplug.c | 187 +++++++
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_migration.c | 14 +
src/qemu/qemu_monitor.c | 48 +-
src/qemu/qemu_monitor.h | 14 +
src/qemu/qemu_monitor_json.c | 122 +++++
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_process.c | 4 +
src/uml/uml_driver.c | 9 +-
src/vbox/vbox_common.c | 6 +-
src/vmware/vmware_driver.c | 6 +-
src/vmx/vmx.c | 6 +-
src/xen/xen_driver.c | 7 +
src/xenapi/xenapi_driver.c | 9 +-
tests/domainschemadata/maxMemory.xml | 19 +
.../qemuxml2argv-memory-hotplug-dimm.args | 11 +
.../qemuxml2argv-memory-hotplug-dimm.xml | 50 ++
.../qemuxml2argv-memory-hotplug-nonuma.xml | 22 +
.../qemuxml2argv-memory-hotplug.args | 6 +
.../qemuxml2argv-memory-hotplug.xml | 34 ++
tests/qemuxml2argvtest.c | 6 +
tests/qemuxml2xmltest.c | 4 +
38 files changed, 1747 insertions(+), 31 deletions(-)
create mode 100644 tests/domainschemadata/maxMemory.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nonuma.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.xml
--
2.2.2
10 years
[libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr
by Peter Krempa
In the last section if the function determines that the config is
invalid when QEMU doesn't support the memory device the JSON config
object would be returned even if it doesn't make sense.
Assign the object to be returned only on success.
---
src/qemu/qemu_command.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 63d43d4..04e7bcc 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4750,9 +4750,6 @@ qemuBuildMemoryBackendStr(unsigned long long size,
goto cleanup;
}
- *backendProps = props;
- props = NULL;
-
if (!hugepage) {
bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, guestNode);
@@ -4767,11 +4764,15 @@ qemuBuildMemoryBackendStr(unsigned long long size,
/* report back that using the new backend is not necessary to achieve
* the desired configuration */
if (!userNodeset && !nodeSpecified) {
+ *backendProps = props;
+ props = NULL;
ret = 1;
goto cleanup;
}
}
+ *backendProps = props;
+ props = NULL;
ret = 0;
cleanup:
--
2.2.2
10 years
[libvirt] [PATCH] Fix typo in error message
by Ján Tomko
by rewriting it completely from:
error: unsupported configuration: virtio only support device address
type 'PCI'
to:
error: unsupported configuration: virtio disk cannot have an address of type
drive
Since we now support CCW addresses as well.
---
src/qemu/qemu_command.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 63d43d4..a747eb4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2423,8 +2423,9 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
continue;
if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("virtio only support device address type 'PCI'"));
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("virtio disk cannot have an address of type %s"),
+ virDomainDeviceAddressTypeToString(def->disks[i]->info.type));
goto error;
}
--
2.0.5
10 years
[libvirt] [PATCH] qemu: Set default SCSI controller model for S390 arch
by Boris Fiuczynski
When no model is specified in the domain definition for
a scsi controller and the architectur is s390 than virtio-scsi
is set as default model.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
Reviewed-by: Daniel Hansel <daniel.hansel(a)linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi(a)linux.vnet.ibm.com>
---
src/qemu/qemu_domain.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 41d1263..949bf8b 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1148,6 +1148,13 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
ARCH_IS_S390(def->os.arch))
dev->data.controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE;
+ /* set the default SCSI controller model for S390 arches */
+ if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER &&
+ dev->data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI &&
+ dev->data.controller->model == -1 &&
+ ARCH_IS_S390(def->os.arch))
+ dev->data.controller->model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI;
+
/* auto generate unix socket path */
if (dev->type == VIR_DOMAIN_DEVICE_CHR &&
dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
--
2.3.0
10 years
[libvirt] lifecycle: shutdown: should it have timeout when using qemu-agent?
by zhang bo
The problem we encountered is:
1) use qemu-agent to shutdown a domain.
2) libvirt will block in "qemuAgentShutdown()", if the domain itself got stucked when it powers-off.
It's the *guest domain*'s fault that it stucks when shutdown. However, we could not handle the domain in libvirt anymore, except for the jobs such as DESTROY or QUERY.
So, here comes the question:
What's the normal solution to this problem? shall we:
1) use DESTROY to forcelly poweroff the domain, in openstack or other applications that uses libvirt.
or
2) leave it to the administrator users, if they find this problem, let them manually DESTROY the domain.
or
3) let SHUTDOWN timeout in libvirt when the guest domain got stucked.
Looking forward to your reply, thanks in advance.
10 years
[libvirt] [PATCH v4 0/9] A bunch of extensions to libxl driver
by Marek Marczykowski-Górecki
This are some additional features to libxl driver. Some of them require change
in domain config structures/syntax. Details described with each patch.
I've dropped patches already applied in this version.
Patches for stubdom support in xenconfig and some more tests will be later.
Marek Marczykowski-Górecki (8):
libxl: add tablet/mouse input device support
xenconfig: add support for multiple USB devices syntax
tests: xenconfig: test for multiple USB devices and other HVM options
conf: add virDomainHasNet
libxl: prevent attaching multiple netdevs with the same MAC
libxl: support domain config modification in virDomainRestoreFlags
libxl: Stubdom emulator type
libxl: pass cmdline to HVM guests
tests: add some simple libxl XML->XML tests
docs/formatdomain.html.in | 13 ++
docs/schemas/domaincommon.rng | 10 ++
src/conf/domain_conf.c | 35 ++++
src/conf/domain_conf.h | 4 +-
src/libvirt_private.syms | 1 +
src/libxl/libxl_conf.c | 60 +++++++
src/libxl/libxl_driver.c | 32 +++-
src/xenconfig/xen_common.c | 66 -------
src/xenconfig/xen_xl.c | 127 ++++++++++++++
src/xenconfig/xen_xm.c | 72 ++++++++
tests/Makefile.am | 9 +-
tests/domainschematest | 2 +-
tests/xlconfigdata/test-fullvirt-multiusb.cfg | 29 ++++
tests/xlconfigdata/test-fullvirt-multiusb.xml | 48 ++++++
tests/xlconfigtest.c | 1 +
tests/xlxml2xmldata/xlxml2xml-hvm-stubdom.xml | 42 +++++
tests/xlxml2xmldata/xlxml2xml-hvm.xml | 40 +++++
tests/xlxml2xmldata/xlxml2xml-network-bridged.xml | 38 +++++
.../xlxml2xml-network-driver-domain.xml | 39 +++++
tests/xlxml2xmldata/xlxml2xml-network-routed.xml | 39 +++++
tests/xlxml2xmldata/xlxml2xml-pv.xml | 38 +++++
tests/xlxml2xmltest.c | 189 +++++++++++++++++++++
tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 4 +-
tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 4 +-
24 files changed, 863 insertions(+), 79 deletions(-)
create mode 100755 tests/xlconfigdata/test-fullvirt-multiusb.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-multiusb.xml
create mode 100644 tests/xlxml2xmldata/xlxml2xml-hvm-stubdom.xml
create mode 100644 tests/xlxml2xmldata/xlxml2xml-hvm.xml
create mode 100644 tests/xlxml2xmldata/xlxml2xml-network-bridged.xml
create mode 100644 tests/xlxml2xmldata/xlxml2xml-network-driver-domain.xml
create mode 100644 tests/xlxml2xmldata/xlxml2xml-network-routed.xml
create mode 100644 tests/xlxml2xmldata/xlxml2xml-pv.xml
create mode 100644 tests/xlxml2xmltest.c
--
2.1.0
10 years
[libvirt] [PATCH] Fix underlinking of libvirt_driver_interface.so
by Natanael Copa
Always add udev linker flags when WITH_UDEV is enabled to avoid
underlinking.
See commit 43dbcb15 (interface: always build all available backends)
Signed-off-by: Natanael Copa <ncopa(a)alpinelinux.org>
---
src/Makefile.am | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 956d9ce..00b47e7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1457,12 +1457,11 @@ libvirt_driver_interface_la_LIBADD =
if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
-else ! WITH_NETCF
+endif WITH_NETCF
if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
endif WITH_UDEV
-endif ! WITH_NETCF
if WITH_DRIVER_MODULES
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
--
2.3.3
10 years