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
9 years, 8 months
[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
9 years, 8 months
[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
9 years, 8 months
[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
9 years, 8 months
[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
9 years, 8 months
[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.
9 years, 8 months
[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
9 years, 8 months
[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
9 years, 8 months
[libvirt] [PATCH] qemu: skip precreation of network disks
by Michael Chapman
Commit cf54c60699833b3791a5d0eb3eb5a1948c267f6b introduced the ability
to create missing storage volumes during migration. For network disks,
however, we may not necessarily be able to detect whether they already
exist -- there is no straight-forward way to map the disk to a storage
volume, and even if there were it's possible no configured storage pool
actually contains the disk.
It is better to assume the network disk exists in this case, rather than
aborting the migration completely. If the volume really is missing, QEMU
will generate an appropriate error later in the migration.
Signed-off-by: Michael Chapman <mike(a)very.puzzling.org>
---
src/qemu/qemu_migration.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 83be435..ebe8af5 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1507,9 +1507,13 @@ qemuMigrationPrecreateDisk(virConnectPtr conn,
flags |= VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA;
break;
+ case VIR_STORAGE_TYPE_NETWORK:
+ VIR_DEBUG("Skipping creation of network disk '%s'",
+ disk->dst);
+ return 0;
+
case VIR_STORAGE_TYPE_BLOCK:
case VIR_STORAGE_TYPE_DIR:
- case VIR_STORAGE_TYPE_NETWORK:
case VIR_STORAGE_TYPE_NONE:
case VIR_STORAGE_TYPE_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
--
2.1.0
9 years, 8 months