Re: issue about libvirtd: daemon can not start

2023-05-30 Thread Han Han
On Fri, May 5, 2023 at 3:13 PM 王东亚  wrote:

> hi,
>
> I installed kmv on ubuntu-22.04-desktop-amd64, after installing some
> necessary package (qemu-kvm libvirt-daemon-system libvirt-clients
> bridge-utils virtinst), the libvirtd can not get start, actually, when I
> running *systemctl start libvirtd.service*,
>
libvirt-daemon*.deb should be installed as well. They will provide the
drivers for qemu, storage, etc.

 ubuntu-22.04-desktop-amd64 is using libvirt 8.0.0. For that libvirt
version, it is better to switch to libvirt modular daemons(
https://libvirt.org/daemons.html#modular-driver-daemons)
So please stop libvirtd service and start the necessary sockets of libvirt
modular daemons, like virtlogd.socket, virtqemud.socket,
virtstoraged.socket, and virtnetwork.socket.
And then you can continue your next steps.

> it'll run a little while (about 3 sec) and then it stops, or should I say
> it never start. I checked the status, it says  *ExecStart=/user/sbin/libvirtd
> $LIBVIRTD_ARGS (code=dumped, signal=TRAP)*
> I processed* journalctl -p err, it says   ../../../glib/gmem.c:167 failed
> to allocate xxx bytes*
> my laptop has 8G phycial memory
> any suggestion will be appricate.
> Best Regards.
>
> --
>
>


Re: [s3-bug-review] question about virtio related options: ats=on and iommu=on

2023-01-08 Thread Han Han
On Mon, Jan 9, 2023 at 12:01 PM Yalan Zhang  wrote:

> Hi,
>
> I have a question about the virtio related options, could someone please
> help to confirm?
> In my understanding, the ats='on' should depend on the "iommu=on", but I'm
> not sure about it.
> Please check the details below.
> Thank you!
>
> Details:
> 1. set vm with intel iommu device, and enable iommu for virtio
> filesystem  device:
> # virsh dumpxml rhel  --xpath //iommu
> 
>   
> 
>
> Set iommu="on" ats="on" for virtio filesystem device:
> # virsh dumpxml rhel --xpath //filesystem
> 
>   
>   
> 
>   
>   
>   
>function="0x0"/>
> 
>
> 2. failed to start the vm since "iommu_platform=true is not supported by
> the device"
> # virsh start rhel
> error: Failed to start domain 'rhel'
> error: internal error: qemu unexpectedly closed the monitor:
> 2023-01-09T03:48:03.198629Z qemu-kvm: -device
> {"driver":"vhost-user-fs-pci","iommu_platform":true,"ats":true,"id":"fs0","chardev":"chr-vu-fs0","queue-size":512,"tag":"mount_tag1","bus":"pci.4","addr":"0x0"}:
> iommu_platform=true is not supported by the device
>
> The error msg comes from the qemu commit
https://gitlab.com/qemu-project/qemu/-/commit/e65902a913bf31ba79a83a3bd3621108b85cf645
See the commit msg for more info

> 3. update the xml to be with only ats="on", vm can start successfully,
> which is not expected.
> # virsh dumpxml rhel --xpath //filesystem
> 
>   
>   
> 
>   
>   
>   
>   
>function="0x0"/>
> 
>
> the qemu cmd line:
> -chardev
> socket,id=chr-vu-fs0,path=/var/lib/libvirt/qemu/domain-5-rhel/fs0-fs.sock \
> -device
> '{"driver":"vhost-user-fs-pci","ats":true,"id":"fs0","chardev":"chr-vu-fs0","queue-size":512,"tag":"mount_tag1","bus":"pci.4","addr":"0x0"}'
>
> Refer to libvirt.org:
> QEMU's virtio devices have some attributes related to the virtio transport
> under the driver element: The iommu attribute enables the use of emulated
> IOMMU by the device.
> The attribute ats controls the Address Translation Service support for
> PCIe devices. This is needed to make use of IOTLB support (see IOMMU
> devices). Possible values are on or off.
>
> In my understanding, the ats='on' should depend on the iommu='on', so if
> the device does not support iommu, it should not support ats, eigher.
> I'm not sure if the understanding is correct.
>
Not really. ats means Address Translation Services

a capability for PCIe device.
iommu means device can be used on IOMMU platform


>
> Could someone please help to confirm it?
> Thank you!
>
>
> Yalan
>


Re: The default USB controller of pc machine type

2022-07-15 Thread Han Han
On Wed, Jul 13, 2022 at 7:04 PM Daniel P. Berrangé 
wrote:

> On Wed, Jul 13, 2022 at 07:00:17PM +0800, Han Han wrote:
> > Hello,
> > I found that the default USB controller for q35 machine type is qemu-xhci
> > while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0
> > qemu-kvm-7.0.0):
> > ➜  ~ cat /tmp/usb.xml
> > 
> >   USB
> >   1a81d4ef-6537-4ae8-b257-8a15e0c0525f
> >   2097152
> >   2097152
> >   1
> >   
> > hvm
> > 
> >   
> >   
> > /usr/libexec/qemu-kvm
> >   
> > 
> >
> > ➜  ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb
> > Domain 'USB' defined from /tmp/usb.xml
> >
> > 
> >
> >
> > ➜  ~ cat /tmp/usb-pc.xml
> > 
> >   USB
> >   1a81d4ef-6537-4ae8-b257-8a15e0c0525f
> >   2097152
> >   2097152
> >   1
> >   
> > hvm
> > 
> >   
> >   
> > /usr/libexec/qemu-kvm
> >   
> > 
> >
> > ➜  ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb
> > Domain 'USB' defined from /tmp/usb-pc.xml
> >
> > 
> >
> > And the default usb controller for q35 has been added since:
> > ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35
> domains
> >
> > As I know, pc machine supports qemu-xhci as well.   Morever, the
> > performance of qemu-xhci is better than piix3-uhci. So why not update the
> > default usb controller of pc machine type to qemu-xhci? I think we can
> > improve it here.
>
> A qemu-xhci controller can be added to any x86 machien type regardless
> of the default, and most mgmt apps will do exactly that.
>

Does that mean, the default USB controller for a specific x86 machine type
does NOT matter?
And leave the default USB controller to up-layer mgmt apps?

>
> With regards,
> Daniel
> --
> |: https://berrange.com  -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-
> https://www.instagram.com/dberrange :|
>
>


The default USB controller of pc machine type

2022-07-13 Thread Han Han
Hello,
I found that the default USB controller for q35 machine type is qemu-xhci
while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0
qemu-kvm-7.0.0):
➜  ~ cat /tmp/usb.xml

  USB
  1a81d4ef-6537-4ae8-b257-8a15e0c0525f
  2097152
  2097152
  1
  
hvm

  
  
/usr/libexec/qemu-kvm
  


➜  ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb
Domain 'USB' defined from /tmp/usb.xml




➜  ~ cat /tmp/usb-pc.xml

  USB
  1a81d4ef-6537-4ae8-b257-8a15e0c0525f
  2097152
  2097152
  1
  
hvm

  
  
/usr/libexec/qemu-kvm
  


➜  ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb
Domain 'USB' defined from /tmp/usb-pc.xml



And the default usb controller for q35 has been added since:
ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 domains

As I know, pc machine supports qemu-xhci as well.   Morever, the
performance of qemu-xhci is better than piix3-uhci. So why not update the
default usb controller of pc machine type to qemu-xhci? I think we can
improve it here.


Re: After restarted libvirtd service, live migration VM hit an issue 'Target CPU check default does not match source none'

2022-06-15 Thread Han Han
On Sun, Jun 12, 2022 at 9:31 PM 梁朝军  wrote:

> Hi All,
>
> BTW, don't send the email to any member of the mail list. It is not
someone's duty to answer it.
Just only send it to the mail list.


> After  restarted the libvirtd service on the source host,  we start live
> migration VM to destination host and often hit an issue 'unsupported
> configuration: Target CPU check default does not match source none’
>
> We don’t configure any special setting for CPU model when start VM and I
> think it should be ‘custom’ mode by default . Furthermore , those two hosts
> for doing live migration have almost the same capabilities as below.
>
Please provides the guest CPU XML, the CPU model of the src and the dst
hosts:
# virsh dumpxml YOUR_VM --inactive|xmllint --xpath //cpu -
(VM is live)
# virsh dumpxml YOUR_VM |xmllint --xpath //cpu -

# virsh capabilities|xmllint --xpath //cpu -



> It’s confused me why failed to check the cpu configuration after restart
> libvitd service on source host?
>
>
>
> The libvirt version is 7.9.0, package: 1.el8 (Unknown,
> 2021-11-28-22:35:11) private build
> Host OS version : rhat8.4
> QEMU version: QEMU 5.1 private build
>
> Any comments are appreciated.
>
>
> Thanks
>
>


When does the balloon-change or control-error event occur

2022-04-07 Thread Han Han
Hi developers,
I have questions about balloon-change or control-error event:
1. What's the meaning of these events
2. When do the events occur?

The comments of their callbacks don't mention that(
https://gitlab.com/libvirt/libvirt/-/blob/master/include/libvirt/libvirt-domain.h#L4130
https://gitlab.com/libvirt/libvirt/-/blob/master/include/libvirt/libvirt-domain.h#L3736
)


Questions on device-added and device-removed events

2021-11-17 Thread Han Han
Hi developers,
When the guest OS is booting, the event for live attachment could be caught
by libvirt, while the event for live detachment could not.
Version:
libvirt-7.9
qemu-kvm-6.1

Steps:
Terminal 1:
➜  ~ virsh event --loop --all

Terminal 2:
➜  ~ virsh start avocado-vt-vm1; qemu-img create /tmp/vdb 10M; virsh
attach-disk avocado-vt-vm1 /tmp/vdb vdb; virsh detach-disk avocado-vt-vm1
vdb

The outputs from terminal 1:
event 'agent-lifecycle' for domain 'avocado-vt-vm1': state: 'disconnected'
reason: 'domain started'
event 'lifecycle' for domain 'avocado-vt-vm1': Resumed Unpaused
event 'lifecycle' for domain 'avocado-vt-vm1': Started Booted
event 'device-added' for domain 'avocado-vt-vm1': virtio-disk1
event 'agent-lifecycle' for domain 'avocado-vt-vm1': state: 'connected'
reason: 'channel event'

As you can see, the device live attachment and the device detachment are
both executed when the guest OS is booting, but there is only the event
'device-added' is recorded.
So my questions are:
1. Is it the expected results for the results above?
2. If so, what is the internal difference between 'device-added' and
'device-removed'?
3. I notice there is the DEVICE_DELETED event in qmp? Any relation between
the 'device-removed' of libvirt and the DEVICE_DELETED of qmp?


Re: can't connect to virtlogd: Unable to open system token /run/libvirt/common/system.token: Permission denied

2021-11-15 Thread Han Han
On Mon, Nov 15, 2021 at 10:49 PM 梁朝军  wrote:

> Hi all,
>
> I have encountered a new issue when start a VM with new builded libvirt.
> I failed to start VM from defined xml and hit the error like "can't
> connect to virtlogd: Unable to open system token
> /run/libvirt/common/system.token: Permission denied”
>
> Known bug https://bugzilla.redhat.com/show_bug.cgi?id=1966842

Update selinux-policy + clean up /run/libvirt/common/ + restart libvirtd &
virtlogd will resolve this issue.

> Any inputs are appreciated.
>
> The libvit version:
> libvirtd -V
> setlocale: No such file or directory
> libvirtd (libvirt) 7.6.0
>
> Os : cat /etc/redhat-release
> Red Hat Enterprise Linux release 8.4 (Ootpa)
>
> Linux kernel:
> uname -a
> Linux localhost.localdomain 4.18.0-305.el8.x86_64 #1 SMP Thu Apr 29
> 08:54:30 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
>
> QEMU version:
> usr/libexec/qemu-kvm --help
> QEMU emulator version 5.1.0 (qemu-kvm-5.1.0-1.el8)
> Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
>
> Thanks!
>
>


Re: about pcie-hot-plug on aarch64

2021-10-10 Thread Han Han
On Fri, Oct 8, 2021 at 5:16 PM Jaze Lee  wrote:

> Hello,
> We run Openstack Stein on arm. It  runs nova-compute(use libvirt
> as virt driver) on arm host. We found when built with disks (use ceph
> rbd) on arm hosts, the vm can not attach all disk correctly. For
> example, built with six disks, the vm may attach three disks. No
> obvious error can be fond in nova-compute, libvirt. We compare aarch64
> and x86, find when detach disk, the dmesg of the vm's os is different.
> May be the pciehg parameter is different?
>
> Please provide the version of libvirt, qemu,  openstack-nova and librbd1.

> Did anyone met the problem?  Or some suggestions?
>
>
> x86:
> Nothing at all
>
> aarch64:
> Sep 29 15:28:55 * kernel: pciehp :00:01.5:pcie004: Slot(0-5):
> Attention button pressed
> Sep 29 15:28:55 * kernel: pciehp :00:01.5:pcie004: Slot(0-5):
> Powering off due to button press
> Sep 29 15:29:00 * kernel: pciehp :00:01.5:pcie004: Slot(0-5):
> Attention button pressed
> Sep 29 15:29:00 * kernel: pciehp :00:01.5:pcie004: Slot(0-5): Button
> cancel
> Sep 29 15:29:00 * kernel: pciehp :00:01.5:pcie004: Slot(0-5):
> Action canceled due to button press
> Sep 29 15:29:07 * kernel: pciehp :00:01.5:pcie004: Slot(0-5):
> Attention button pressed
> Sep 29 15:29:07 * kernel: pciehp :00:01.5:pcie004: Slot(0-5):
> Powering off due to button press
> Sep 29 15:29:13 * kernel: pciehp :00:01.5:pcie004: Slot(0-5): Link Up
> Sep 29 15:29:16 * kernel: pciehp :00:01.5:pcie004: Failed to check
> link status
> Sep 29 15:29:18 * kernel: pciehp :00:01.6:pcie004: Slot(0-6):
> Attention button pressed
> Sep 29 15:29:18 * kernel: pciehp :00:01.6:pcie004: Slot(0-6):
> Powering off due to button press
> Sep 29 15:29:23 * kernel: pciehp :00:01.6:pcie004: Slot(0-6):
> Attention button pressed
> Sep 29 15:29:23 * kernel: pciehp :00:01.6:pcie004: Slot(0-6): Button
> cancel
> Sep 29 15:29:23 * kernel: pciehp :00:01.6:pcie004: Slot(0-6):
> Action canceled due to button press
> Sep 29 15:29:30 * kernel: pciehp :00:01.6:pcie004: Slot(0-6):
> Attention button pressed
> Sep 29 15:29:30 * kernel: pciehp :00:01.6:pcie004: Slot(0-6):
> Powering off due to button press
> Sep 29 15:29:36 * kernel: pciehp :00:01.6:pcie004: Slot(0-6): Link Up
> Sep 29 15:29:39 * kernel: pciehp :00:01.6:pcie004: Failed to check
> link status
> Sep 29 15:29:39 * kernel: pciehp :00:01.7:pcie004: Slot(0-7):
> Attention button pressed
> Sep 29 15:29:39 * kernel: pciehp :00:01.7:pcie004: Slot(0-7):
> Powering off due to button press
> Sep 29 15:29:45 * kernel: pciehp :00:01.7:pcie004: Slot(0-7):
> Attention button pressed
> Sep 29 15:29:45 * kernel: pciehp :00:01.7:pcie004: Slot(0-7): Button
> cancel
> Sep 29 15:29:45 * kernel: pciehp :00:01.7:pcie004: Slot(0-7):
> Action canceled due to button press
> Sep 29 15:29:52 * kernel: pciehp :00:01.7:pcie004: Slot(0-7):
> Attention button pressed
> Sep 29 15:29:52 * kernel: pciehp :00:01.7:pcie004: Slot(0-7):
> Powering off due to button press
> Sep 29 15:29:58 * kernel: pciehp :00:01.7:pcie004: Slot(0-7): Link Up
> Sep 29 15:30:01 * kernel: pciehp :00:02.0:pcie004: Slot(0-8):
> Attention button pressed
> Sep 29 15:30:01 * kernel: pciehp :00:02.0:pcie004: Slot(0-8):
> Powering off due to button press
>
>


Re: how to get enabled features

2021-10-10 Thread Han Han
On Fri, Oct 1, 2021 at 10:00 AM Jiatong Shen  wrote:

> Hello community,
>
>   I am trying to learn how to use dtrace and systemtap for libvirt, as the
> documentation says it seems to enable `--with-dtrace` when compiling. I am
> installing libvirt using apt install and is it possible to determine if
> dtrace is built by
>
If your libvirt is built yourself, you should enable dtrace by
`--with-dtrace`(version<6.7.0) or `-Ddtrace=enabled`(version>=6.7.0). See
https://libvirt.org/kbase/systemtap.html

Since you mentioned your libvirt is installed by apt, the dtrace is enabled
or not depending on whether the package builder enables dtrace or not when
building the libvirt package. For debian, you can check the libvirt build
result of your libvirt version(
https://buildd.debian.org/status/logs.php?pkg=libvirt). If there is
`--with-dtrace` or `-Ddtrace=enabled` in the build result, it usually means
the libvirt dtrace is enabled.

> running some libvirt commands?
>
> Thank you.
>
> --
>
> Best Regards,
>
> Jiatong Shen
>


Fail to do blockcopy to network dest xml with --reuse-external

2021-06-27 Thread Han Han
Hello, libvirt developers,
Recently I find an issue of libvirt blockcopy:
Versions:
libvirt-7.4.0
qemu-kvm-6.0.0

Steps:
1. Create a nbd server
# qemu-img create -f qcow2 /var/lib/libvirt/images/fedora-1.qcow2 10G -o
preallocation=full

# qemu-nbd -e 10 /var/lib/libvirt/images/fedora-1.qcow2 -p 10001

2. Prepare a running VM
# virsh list
 Id   Name State

 3fedora   running

# virsh dumpxml 3|xmllint --xpath //disk -

  
  
  
  
  
  


3. Blockcopy to a nbd dest xml with --reuse-external
# cat /tmp/copy.xml

  
  

  
  
  


# virsh blockcopy fedora hda --xml /tmp/copy.xml --transient-job --wait
--verbose --finish  --reuse-external
error: unsupported configuration: reused mirror destination format must be
specified

But it works without --reuse-external
# virsh blockcopy fedora hda --xml /tmp/copy.xml --transient-job --wait
--verbose --finish
Block Copy: [100 %]
Successfully copied


Since it is clear that the format of dest image is qcow2, the error message
"reused mirror destination format must be specified" is wrong. The
blockcopy with network disk + --reuse-external should either be supported
or post a better error message.

I am not sure if --reuse-external flag is only for file type disk. It seems
the description of VIR_DOMAIN_BLOCK_COPY_REUSE_EXT(
https://github.com/libvirt/libvirt/blob/7c08141f906e20e730c4b6407bc638e743deea48/src/libvirt-domain.c#L10479)
indicates this flag is for file only:
 * VIR_DOMAIN_BLOCK_COPY_REUSE_EXT flag is present stating that the file
 * was pre-created with the correct format and metadata and sufficient
 * size to hold the copy. In case the VIR_DOMAIN_BLOCK_COPY_SHALLOW flag
 * is used the pre-created file has to exhibit the same guest visible
contents
 * as the backing file of the original image. This allows a management app
to
 * pre-create files with relative backing file names, rather than the
default
 * of absolute backing file names.

Please help to confirm if it is a bug here.


Re: how to increase vram in windows guest?

2021-05-27 Thread Han Han
On Sat, May 22, 2021 at 9:09 PM gansteed  wrote:

> Hello:
> I'm using kvm to host a windows 7 guest vm, I've install the latest
> spice guest tools from
> https://spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe,
> and I've set video section like this:
>
> 
>vgamem="131072" heads="1" primary="yes"/>
>   
>function="0x0"/>
> 
>
> but the graphics in windows guest is laggy, I' found that the guest have
> only use 16MB as vram:
>
> How can I increase the real usage of vram in the windows guest vm?
>
There is no libvirt API or QEMU qmp to update video devices when a VM is
live.
You should shut off the VM and then edit the VM xml to update the values of ram
or vram in the qxl video element.
For the meaning of ram or vram, see
https://libvirt.org/formatdomain.html#video-devices


Re: Fail to build libvirt upstream rpm on fedora 33

2020-10-30 Thread Han Han
On Fri, Oct 30, 2020 at 5:12 PM Daniel P. Berrangé 
wrote:

> On Fri, Oct 30, 2020 at 10:30:00AM +0800, Han Han wrote:
> > Hello,
> > I encountered errors when building rpm on fedora33:
> >
> > Versions:
> > libvirt: v6.9.0-rc2
> > gcc-10.2.1-5.fc33.x86_64
> > meson-0.55.3-1.fc33.noarch
> > ninja-build-1.10.1-2.fc33.x86_64
> > binutils-2.35-11.fc33.x86_64
> >
> > Steps:
> > 1. Archive libvirt source code to ~/rpmbuild/SOURCES/libvirt-6.9.0.tar.xz
> > 2. Copy libvirt.spec.in to ~/rpmbuild/SPECS/libvirt.spec. Then `sed -i
> > s/@VERSION@/6.9.0/g ~/rpmbuild/SPECS/libvirt.spec`
> > 3. Build rpm:
> > $ rpmbuild -ba ~/rpmbuild/SPECS/libvirt.spec
>
>
> > FAILED: tests/cputest
> > gcc  -o tests/cputest src/libvirt_probes.o tests/cputest.p/cputest.c.o
> > -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie
> > -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a
> > tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto
> > -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall
> > -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
> > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> > -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro
> > -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
> > src/libvirt.so.0.6009.0 tests/libtest_utils_qemu_monitor.a
> > tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries
> > -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/
> > libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so
> > /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so
> > /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so
> > /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic
> > -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group
> > '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/'
> >
> -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src
> >
> -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests
> > /usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to
> > `__open_missing_mode'
> > collect2: error: ld returned 1 exit status
> > ninja: build stopped: subcommand failed.
> > error: Bad exit status from /var/tmp/rpm-tmp.xEqkEF (%build)
>
> Hmm, same binutils problem we're seeing on F34
>
> Thx :)

>
>https://bugzilla.redhat.com/show_bug.cgi?id=1889763
>
> Regards,
> Daniel
> --
> |: https://berrange.com  -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-
> https://www.instagram.com/dberrange :|
>
>


Fail to build libvirt upstream rpm on fedora 33

2020-10-29 Thread Han Han
Hello,
I encountered errors when building rpm on fedora33:

Versions:
libvirt: v6.9.0-rc2
gcc-10.2.1-5.fc33.x86_64
meson-0.55.3-1.fc33.noarch
ninja-build-1.10.1-2.fc33.x86_64
binutils-2.35-11.fc33.x86_64

Steps:
1. Archive libvirt source code to ~/rpmbuild/SOURCES/libvirt-6.9.0.tar.xz
2. Copy libvirt.spec.in to ~/rpmbuild/SPECS/libvirt.spec. Then `sed -i
s/@VERSION@/6.9.0/g ~/rpmbuild/SPECS/libvirt.spec`
3. Build rpm:
$ rpmbuild -ba ~/rpmbuild/SPECS/libvirt.spec

Then errors happen:
[1071/1255] gcc  -o tests/qemucapsprobe
tests/qemucapsprobe.p/qemucapsprobe.c.o -Wl,--as-needed -Wl,--no-undefined
-Wl,-export-dynamic -pie -O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro
-Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
-Wl,--start-group tests/libtest_qemu_driver.so src/libvirt.so.0.6009.0
-Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/
libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so
/usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so
/usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so
/usr/lib64/libyajl.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../src'
-Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests
-Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src
FAILED: tests/qemucapsprobe
gcc  -o tests/qemucapsprobe tests/qemucapsprobe.p/qemucapsprobe.c.o
-Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -O2 -flto=auto
-ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro
-Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
-Wl,--start-group tests/libtest_qemu_driver.so src/libvirt.so.0.6009.0
-Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/
libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so
/usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so
/usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so
/usr/lib64/libyajl.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../src'
-Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests
-Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src
/usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to
`__open_missing_mode'
collect2: error: ld returned 1 exit status
[1072/1255] gcc  -o tests/virtimetest src/libvirt_probes.o
tests/virtimetest.p/virtimetest.c.o -Wl,--as-needed -Wl,--no-undefined
-Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group
tests/libtest_utils.a -Wl,--no-whole-archive -O2 -flto=auto
-ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro
-Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
src/libvirt.so.0.6009.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic
-ldl /usr/lib64/libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/
libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so
/usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so
-lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic
-lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src'
-Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src
[1073/1255] gcc  -o tests/virstringtest src/libvirt_probes.o
tests/virstringtest.p/virstringtest.c.o -Wl,--as-needed -Wl,--no-undefined
-Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group
tests/libtest_utils.a -Wl,--no-whole-archive -O2 -flto=auto
-ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro
-Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
src/libvirt.so.0.6009.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic
-ldl /usr/lib64/libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/
libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so

Re: Why "discard":"unmap" is the default option for disks

2020-10-27 Thread Han Han
On Thu, Oct 22, 2020 at 2:40 PM Peter Krempa  wrote:

> On Thu, Oct 22, 2020 at 10:57:05 +0800, Han Han wrote:
> > Hello,
> > I find "discard":"unmap" is defaultly enabled in  qemu cmdline(libvirt
> > v6.6, qemu v5.1):
> > XML:
> > 
> >   
> >   
> >   
> >   
> >   
> >   
>
> [...]
>
> > QEMU cmdline:
>
> The -blockdev definition of storage splits up a storage into a protocol
> node, which handles storage access:
>
> In this case it's a 'file':
>
> > ... -blockdev
> >
> {"driver":"file","filename":"/var/lib/libvirt/images/new.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,
> > *"discard":"unmap"*}
>
> You can see, that 'discard: unmap' is enabled only here.
>
>
> The second layer is a 'format' node which handles the actual qcow2
> format:
>
> >-blockdev
> >
> {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}
>
> Here you can see that there's no 'discard' setting, since you didn't
> configure any setting in the disk.
>
> Now the above configuration is used as we want to allow the QCOW2 driver
> to discard it's unused internal sectors/structures. This can happen for
> example when you delete an internal snapshot. All the unused sectors get
> unref'd and discarded. This wouldn't be possible without enabling unmap
> for the protocol node and the qcow2 image would not decrease size
> otherwise.
>
> The user setting is configured only for the 'format' node since it
> handles whether the guest discard gets honoured or not.
>
> The 'format' node is then installed as the disk backend:
>
> Thx

> > -device
> >
> scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,drive=libvirt-2-format,id=scsi0-0-0-0,bootindex=1
>
> [...]
>
>
> > I think it's from
> >
> https://gitlab.com/libvirt/libvirt/-/blob/master/src/qemu/qemu_block.c#L1211
> > But I cannot find the reason from commit msgs or documents.
> > Could you please explain it?
>
> See above. I'm curious though why are you asking? You didn't mention
> that there's any problem with that.
>
> Yeah. No problems here. I was just a little surprised to find discard in
qemu cmdline when no such configurations in libvirt domain XML.


Why "discard":"unmap" is the default option for disks

2020-10-21 Thread Han Han
Hello,
I find "discard":"unmap" is defaultly enabled in  qemu cmdline(libvirt
v6.6, qemu v5.1):
XML:

  
  
  
  
  
  

  
  

  
  
  
  


QEMU cmdline:
... -blockdev
{"driver":"file","filename":"/var/lib/libvirt/images/new.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,
*"discard":"unmap"*} -blockdev
{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}
-device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,drive=libvirt-2-format,id=scsi0-0-0-0,bootindex=1
-blockdev
{"driver":"nbd","server":{"type":"inet","host":"localhost","port":"10809"},"export":"new","node-name":"libvirt-1-storage","auto-read-only":true,
*"discard":"unmap"*} -blockdev
{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}
-device
virtio-blk-pci,bus=pci.2,addr=0x0,drive=libvirt-1-format,id=virtio-disk1,werror=report,rerror=report
...

I think it's from
https://gitlab.com/libvirt/libvirt/-/blob/master/src/qemu/qemu_block.c#L1211
But I cannot find the reason from commit msgs or documents.
Could you please explain it?


[libvirt-users] Fail to build upstream libvirt on rhel8

2019-11-21 Thread Han Han
Hello,
A compilation failure happened when I tried building libvirt latest code on
rhel8

Version:
gcc-8.3.1-4.5.el8.x86_64
libvirt v5.9.0-352-g5e939cea89

Steps:
1. Clone libvirt source code
2. Create build dir, and run autogen.sh
# cd libvirt
# mkdir build && cd build
# ../autogen.sh --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib
--mandir=/usr/share/man --infodir=/usr/share/info --with-runstatedir=/run
--with-qemu --without-openvz --without-lxc --without-vbox --without-libxl
--with-sasl --with-polkit --with-libvirtd --without-phyp --with-esx
--without-hyperv --without-vmware --without-vz --without-bhyve
--with-remote-default-mode=legacy --with-interface --with-network
--with-storage-fs --with-storage-lvm --with-storage-iscsi
--with-storage-iscsi-direct --with-storage-scsi --with-storage-disk
--with-storage-mpath --with-storage-rbd --without-storage-sheepdog
--with-storage-gluster --without-storage-zfs --without-storage-vstorage
--with-numactl --with-numad --with-capng --without-fuse --with-netcf
--with-selinux --with-selinux-mount=/sys/fs/selinux --without-apparmor
--without-hal --with-udev --with-yajl --with-sanlock --with-libpcap
--with-macvtap --with-audit --with-dtrace --with-driver-modules
--with-firewalld --with-firewalld-zone --without-wireshark-dissector
--without-pm-utils --with-nss-plugin --with-qemu-user=qemu
--with-qemu-group=qemu --with-tls-priority=@LIBVIRT,SYSTEM --enable-werror
--enable-expensive-tests --with-init-script=systemd --without-login-shell
# make

Then error appears:
make[2]: Entering directory '/root/libvirt/build/include/libvirt'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/libvirt/build/include/libvirt'
Making all in src
make[2]: Entering directory '/root/libvirt/build/src'
  GEN  access/org.libvirt.api.policy
/bin/sh: access/org.libvirt.api.policy: No such file or directory
  GEN  access/viraccessapicheck.h
/bin/sh: access/viraccessapicheck.h: No such file or directory
make[2]: *** [Makefile:15067: access/viraccessapicheck.h] Error 1
make[2]: Leaving directory '/root/libvirt/build/src'
make[1]: *** [Makefile:1957: all-recursive] Error 1
make[1]: Leaving directory '/root/libvirt/build'
make: *** [Makefile:1850: all] Error 2

-- 
Best regards,
-------
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Where can I find the slirp-helper?

2019-11-06 Thread Han Han
Thank you. It works :)

On Thu, Nov 7, 2019 at 3:08 PM Yukin Chan  wrote:

> Hi Han,
>
> The slirp-helper is a helper program provided in libslirp rust bindings.
> It seems that you need to build it yourself ATM.
>
> git clone https://gitlab.freedesktop.org/slirp/libslirp-rs.git
>> cd libslirp-rs
>> cargo build --bin slirp-helper --features=all
>>
>
> Han Han  於 2019年11月7日 週四 下午2:01寫道:
>
>> For the libvirt 5.8 release, I find that there is a new comment in
>> qemu.conf:
>> #slirp_helper = "/usr/bin/slirp-helper"
>>
>> It indicates that there is a slirp-helper to help setup slirp network.
>> But I cannot
>> find it even after I built the latest qemu(v4.1.0-1378-g98b2e3c9ab) and
>> libvirt
>> (v5.9.0-rc1-2-g73f91d659b).
>>
>> Could you please tell me where I can find that helper program?
>>
>> Thanks
>> --
>> Best regards,
>> ---
>> Han Han
>> Quality Engineer
>> Redhat.
>>
>> Email: h...@redhat.com
>> Phone: +861065339333
>> ___
>> libvirt-users mailing list
>> libvirt-users@redhat.com
>> https://www.redhat.com/mailman/listinfo/libvirt-users
>
>
>
> --
>
> Regards,
>
> Yukin Chan
>
> She / Her / Hers
>
> QE Virtualization
>
> Red Hat APAC <https://www.redhat.com>
>
> 9 floor, Raycom Infotech Park, North Tower C
>
> 2 Kexueyuan Nanlu, Haidian District, Beijing, China
>
> T: 86-10-65627449
>
> PGP: AC7BCF02F44FA43F940A3B9A25D5E545D2C3D639
> <https://red.ht/sig>
>


-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Where can I find the slirp-helper?

2019-11-06 Thread Han Han
For the libvirt 5.8 release, I find that there is a new comment in
qemu.conf:
#slirp_helper = "/usr/bin/slirp-helper"

It indicates that there is a slirp-helper to help setup slirp network. But
I cannot
find it even after I built the latest qemu(v4.1.0-1378-g98b2e3c9ab) and
libvirt
(v5.9.0-rc1-2-g73f91d659b).

Could you please tell me where I can find that helper program?

Thanks
-- 
Best regards,
-----------
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Reg: Adding "edu" device using XML file

2019-10-23 Thread Han Han
On Wed, Oct 23, 2019 at 4:27 PM bharath paulraj 
wrote:

> Hello Han,
>
> Thanks for the response. The XML option with qemu:commandline works if the
> device is added during the VM creation. But I would like to hot-plug the
> device to the running VM. I can add the device using the command line
> 
>
> But I would like to add the device using the XML file, like  attach-device VM-Name xmlfile.xml>. If the XML support is not provided in
> libvirt, Is there a document or pointers available to show how to add new
> device in libvirt xml code?
>
> ASAIK there is no development guide for adding new device in libvirt xml
code.
Maybe you can refer to former watchdog device patch series:
https://www.redhat.com/archives/libvir-list/2009-October/msg00564.html
https://www.redhat.com/archives/libvir-list/2017-September/msg00078.html

> Thanks,
> Bharath
>
> On Wed, Oct 23, 2019 at 12:57 PM Han Han  wrote:
>
>>
>>
>> On Tue, Oct 22, 2019 at 5:41 PM bharath paulraj 
>> wrote:
>>
>>> Hi Team,
>>>
>>> I am exploring "edu" device in QEMU to add my own custom device. I am
>>> able to add the device using the command line. Would it be possible to add
>>> the device using XML file through libvirt?
>>>
>> Hello, edu device is not implemented to libvirt xml. However you can use
>> it via custom device in libvirt:
>> Just define a domain like following:
>> 
>> ...
>>  
>>
>> 
>>  
>> 
>>
>> More reference: https://libvirt.org/drvqemu.html#qemucommand
>>
>>>
>>>
>> --
>>> Regards,
>>> Bharath
>>> ___
>>> libvirt-users mailing list
>>> libvirt-users@redhat.com
>>> https://www.redhat.com/mailman/listinfo/libvirt-users
>>
>>
>>
>> --
>> Best regards,
>> ---
>> Han Han
>> Quality Engineer
>> Redhat.
>>
>> Email: h...@redhat.com
>> Phone: +861065339333
>>
>
>
> --
> Regards,
> Bharath
>


-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Reg: Adding "edu" device using XML file

2019-10-23 Thread Han Han
On Tue, Oct 22, 2019 at 5:41 PM bharath paulraj 
wrote:

> Hi Team,
>
> I am exploring "edu" device in QEMU to add my own custom device. I am able
> to add the device using the command line. Would it be possible to add the
> device using XML file through libvirt?
>
Hello, edu device is not implemented to libvirt xml. However you can use it
via custom device in libvirt:
Just define a domain like following:

...
 
   

 


More reference: https://libvirt.org/drvqemu.html#qemucommand

>
>
-- 
> Regards,
> Bharath
> ___
> libvirt-users mailing list
> libvirt-users@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users



-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] pcie-expander-bus doesn't support pcie-pci-bridge and pcie-switch-upstream-port

2018-10-17 Thread Han Han
On Wed, Oct 17, 2018 at 8:56 PM Andrea Bolognani 
wrote:

> On Wed, 2018-10-17 at 10:50 +0800, Han Han wrote:
> > In libvirt, I found pcie-expander-bus controller doesn't support
> pcie-to-pci-bridge and pcie-switch-upstream-port.
> [...]
> > # virsh -k0 -K0 define /tmp/c.xml
>
> Aside: the -k and -K virsh options are documented as
>
>   -k | --keepalive-interval=NUM
>   keepalive interval in seconds, 0 for disable
>   -K | --keepalive-count=NUM
>   number of possible missed keepalive messages
>
> So -k0 disables keepalive entirely, making -K0 unnecessary :)
>
> Thanks for your advice.

> > error: Failed to define domain from /tmp/c.xml
> > error: XML error: The device at PCI address :01:00.0 cannot be
> plugged into the PCI controller with index='1'. It requires a controller
> that accepts a pcie-to-pci-bridge.
> [...]
> > In function virDomainPCIAddressBusSetModel, I find pcie-expander-bus
> only supports pcie-root-port and dmi-to-pci-bridge
> >353 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
> >354 ┆   /* 32 slots, no hotplug, only accepts pcie-root-port or
> >355 ┆   ┆* dmi-to-pci-bridge
> >356 ┆   ┆*/
> >357 ┆   bus->flags = (VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT |
> >358 ┆   ┆   ┆   ┆   ┆ VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE);
> >359 ┆   bus->minSlot = 0;
> >360 ┆   bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
> >361 ┆   break;
>
> The above is consistent with pcie-root itself, which also doesn't
> support plugging a pcie-to-pci-bridge directly into it but requires
> a pcie-root <- pcie-root-port <- pcie-to-pci-bridge topology.
>
> Now, I don't quite recall *why* that is the case - perhaps Laine
> does? - but I'm sure we had very compelling reasons O:-)
>
> > But it works in qemu:
> > # /usr/libexec/qemu-kvm -machine q35 -m 1024 -device
> pxb-pcie,bus_nr=250,id=pci.1,bus=pcie.0,addr=0x4 -device
> pcie-pci-bridge,id=pci.250,bus=pci.1,addr=0x0 -device
> pcie-pci-bridge,id=pci.251,bus=pci.1,addr=0x1 -spice
> port=5902,addr=0.0.0.0,disable-ticketing /var/lib/libvirt/images/q35.qcow2
>
> It should be noted that QEMU in general allows users to make pretty
> unwise device placement choices without so much of a warning, so I
> would not take the above as proof the pcie-to-pci-bridge should be
> allowed to plug into pcie-expander-bus (or pcie-root) directly :)
>
> If  pcie<-pcie-expander-bus<-(pcie-to-pci-bridge |
pcie-switch-upstream-port) is an unwise device placement, we'd better to
add the reason to code comments or commit msg or documents.

> --
> Andrea Bolognani / Red Hat / Virtualization
>
>

-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] pcie-expander-bus doesn't support pcie-pci-bridge and pcie-switch-upstream-port

2018-10-16 Thread Han Han
In libvirt, I found pcie-expander-bus controller doesn't support
pcie-to-pci-bridge and pcie-switch-upstream-port.

Version: libvirt-4.9

# cat /tmp/c.xml
...


  
  
  


  

...
# virsh -k0 -K0 define
/tmp/c.xml

error: Failed to define domain from /tmp/c.xml
error: XML error: The device at PCI address :01:00.0 cannot be plugged
into the PCI controller with index='1'. It requires a controller that
accepts a pcie-to-pci-bridge.

# cat /tmp/b.xml
...


  
  
  


  
  

...
# virsh -k0 -K0 define /tmp/b.xml
error: Failed to define domain from /tmp/b.xml
error: XML error: The device at PCI address :01:00.0 cannot be plugged
into the PCI controller with index='1'. It requires a controller that
accepts a pci-switch-upstream-port.

In function virDomainPCIAddressBusSetModel, I find pcie-expander-bus only
supports pcie-root-port and dmi-to-pci-bridge
   353 case
VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
   354 ┆   /* 32 slots, no hotplug, only accepts pcie-root-port
or
   355 ┆   ┆*
dmi-to-pci-bridge
   356 ┆
┆*/
   357 ┆   bus->flags = (VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT
|
   358 ┆   ┆   ┆   ┆   ┆
VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE);
   359 ┆   bus->minSlot =
0;
   360 ┆   bus->maxSlot =
VIR_PCI_ADDRESS_SLOT_LAST;
   361 ┆   break;

But it works in qemu:
# /usr/libexec/qemu-kvm -machine q35 -m 1024 -device
pxb-pcie,bus_nr=250,id=pci.1,bus=pcie.0,addr=0x4 -device
pcie-pci-bridge,id=pci.250,bus=pci.1,addr=0x0 -device
pcie-pci-bridge,id=pci.251,bus=pci.1,addr=0x1 -spice
port=5902,addr=0.0.0.0,disable-ticketing /var/lib/libvirt/images/q35.qcow2

So why pcie-expander-bus doesn't these two controllers? For any concerns in
libvirt?
Thank you~


-- 
Best regards,
-----------
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Shared clipboard not working

2018-09-09 Thread Han Han
Please share  following info for debugging:
1. libvirt/qemu/spice-server version of host, spice-vdagent version of
guest.
2. spice-vdagent log: /var/log/spice-vdagent.log. Set logging level
according to
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/sect-SPICE_Log_Files.html
3. The guest xml. Dumped by `virsh dumpxml $VM`

On Wed, Sep 5, 2018 at 11:56 PM, Filipe Laíns  wrote:

> Hi!
>
> I have been plaing arround with libvirt and I've ran into a problem
> that I don't seem to able to fix, sharing the clipboard.
> Both my host and my guest are running Arch Linux. I have properly
> installed, enabled and started spice-vdagent on both machines and I
> don't see any error in the logs. Am I doing anything wrong? Do I need
> to have anything else in consideration?
>
> Any help is appreciated :)
>
> Thank you,
> Filipe Laíns
> 3DCE 51D6 0930 EBA4 7858 BA41 46F6 33CB B0EB 4BF2
>
> ___
> libvirt-users mailing list
> libvirt-users@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
>



-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] How about giving commit ID in release notes

2018-07-09 Thread Han Han
Hello developers,
Your release notes from libvirt(https://libvirt.org/news.html) are really
helpful to our users and QAs. How about giving commit ID of each item in
release notes, so that our user can gather more info from release notes.
For example,in v4.5.0 release note, add commit ID on each item:
capabilities: Provide info about host IOMMU support
Capabilities XML now provide information about host IOMMU support. (commit
dc34e7)

Though we can seach them from git, it is more accurate doing by the
authors.


-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Fail to compile libvirt with address sanitizer by clang-7

2018-04-11 Thread Han Han
It works. Thank you very much!!!

On Tue, Apr 10, 2018 at 2:40 PM, Michal Privoznik <mpriv...@redhat.com>
wrote:

> On 04/10/2018 05:22 AM, Han Han wrote:
> > Hi,
> > I tried to compile libvirt with address sanitizer(
> > https://github.com/google/sanitizers/wiki/AddressSanitizer) to discover
> > memory errors. But fails when make.
> > Code version:
> > $ git describe
> > v4.2.0-92-g3f204e4de
> >
> > Compile tools:
> > automake 1:1.15.1-3 all [installed]
> > clang-7 1:7~svn323616-1 amd64 [installed,automatic]
> > make 4.2.1-1 amd64 [installed,automatic]
> >
> > Compile steps:
> > $ ./bootstrap
> > $ CC=clang-7 CFLAGS="-g -O1 -fsanitize=address -fno-omit-frame-pointer
> > -Wno-error" LDFLAGS="-fsanitize=address" ./configure
> >
> > Configure succed.
> > $ make
> > But error appeared:
> > make  all-am
> > make[3]: Entering directory '/home/hhan/Software/libvirt/src'
> >   CCLD libvirt.la
> > ./.libs/libvirt_util.a(libvirt_util_la-viralloc.o): In function
> `virAlloc':
> > /home/hhan/Software/libvirt/src/util/viralloc.c:144: undefined
> reference to
> > `__asan_report_store8'
>
> Huh, I remember seeing different error when trying this (although I'm
> using gcc). However, I suspect '-Wl,-z -Wl,defs' arguments are problem.
> We add them onto linker cmd line. You can try applying this patch and
> see if it helps:
>
> diff --git i/configure.ac w/configure.ac
> index 18587270e6..e23c0e4c22 100644
> --- i/configure.ac
> +++ w/configure.ac
> @@ -237,7 +237,6 @@ LIBVIRT_COMPILE_WARNINGS
>  LIBVIRT_COMPILE_PIE
>  LIBVIRT_LINKER_RELRO
>  LIBVIRT_LINKER_NO_INDIRECT
> -LIBVIRT_LINKER_NO_UNDEFINED
>
>  LIBVIRT_ARG_APPARMOR
>  LIBVIRT_ARG_ATTR
>
>
> Michal
>



-- 
Best regards,
---
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Unable to libvirt wireshark dissector

2018-03-27 Thread Han Han
Hi guys,
I am trying to analyze libvirt rpc protocol by wireshark. But I found
wireshark doesn't dissect libvirt packets. Here are my environments
operations:

1. Environments:
My system: Debian GNU/Linux buster/sid with *kernel-4.15.0-1-amd64*
Packages installed:


*libvirt0-4.1.0-2-amd64 libvirt-wireshark-4.1.0-2-amd64
wireshark-2.4.5-1-amd64*
2. Libvirt configurations
*/etc/libvirt/libvirtd.conf*:



*listen_tls = 0listen_tcp = 1tcp_port = "16509"auth_tcp = "none"*

Libvirtd started with options


*--listen*
3. Check wireshark libvirt plugin:
Open menu: *Help* --> *About* *wireshark* --> *Plugins*. Libvirt plugin is
found:
*libvirt.so 4.1.0 dissector
/usr/lib/x86_64-linux-gnu/w…rk/plugins/2.4.5/libvirt.so*


4. Set wireshark listening on *lo* interface and filter as
'tcp.port==16509'. Execute virsh command via tcp protocol:
$ virsh -c qemu+tcp://localhost/system list

In wireshark, packets are parsed as TCP protocol. And I cannot find Libvirt
protocol in 'Decode as..' protocols list. And libvirt protocol is also not
found in *Edit* --> *Preference* --> *Protocols*.

So it seems libvirt packets are not dissected as libvirt protocol in
wireshark. How can I use the wireshark libvirt plugin?
-- 
Best regards,
-------
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333 <+86%2010%206533%209333>
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Does libvirt-sanlock support network disk?

2017-11-19 Thread Han Han
Thanks for your reply.

On Wed, Nov 8, 2017 at 4:58 PM, Daniel P. Berrange <berra...@redhat.com>
wrote:

> On Wed, Nov 08, 2017 at 02:42:35PM +0800, Han Han wrote:
> > Hello,
> > As we know, libvirt sanlock support file type storage. I wonder *if it
> > supports network storage.*
> > I tried *iSCSI*, but found it didn't generate any resource file:
>
> Correct, the code currently ignores locking for any non-local
> disk.
>
>
> Regards,
> Daniel
> --
> |: https://berrange.com  -o-https://www.flickr.com/photos/
> dberrange :|
> |: https://libvirt.org -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-https://www.instagram.com/
> dberrange :|
>



-- 
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Does libvirt-sanlock support network disk?

2017-11-07 Thread Han Han
Hello,
As we know, libvirt sanlock support file type storage. I wonder *if it
supports network storage.*
I tried *iSCSI*, but found it didn't generate any resource file:
Version: *qemu-2.10 libvirt-3.9 sanlock-3.5*
1. Set configuration:
qemu.conf:
*lock_manager = "sanlock"*

qemu-sanlock.conf:




*auto_disk_leases = 1disk_lease_dir = "/var/lib/libvirt/sanlock"host_id =
1user = "sanlock"group = "sanlock"*

# systemctl restart sanlock
# systemctl restart libvirtd

2. Start a VM with iSCSI disk and check
*resource file*
VM disk xml:

  
  

  
  
  
  


Start VM:
# virsh start iscsi
Domain iscsi started

Check resource file:
# ls  /var/lib/libvirt/sanlock
__LIBVIRT__DISKS__

No resource file generated.

So, does libvirt sanlock only support file or block type storage?



-- 
Han Han
Quality Engineer
Redhat.

Email: h...@redhat.com
Phone: +861065339333
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] virsh snapshot delete / live-migration issues

2017-05-05 Thread Han Han
It is a known issue: https://bugzilla.redhat.com/show_bug.cgi?id=1321304

On Tue, May 2, 2017 at 12:16 PM, chihhang wu <chihha...@gmail.com> wrote:
> Sorry, I made a mistake with my title. So I resend this email.
> --
>
> Hi,
>
> I'd like to live-migration after snapshots deleted.
>
> But it doesn't work.Here's my steps:
>
> # virsh snapshot-create VM
> # virsh snapshot-delete VM Snapshot
> # virsh migrate --live VM qemu+ssh://localadmin@compute3/system
>
> And  It comes out this message:
>
> # internal error: unable to execute QEMU command 'migrate-set-capabilities':
> There's a migration process in progress
>
> Even I create a no-metadata snapshot, it still have same error.
>
> After I reboot the VM, the live-migration finally works.
>
> Does it has any suggestion way or command to solve this problem without
> reboot the VM?
>
> Here's my environment:
>
> Ubuntu 14.04.5 LTS
> Compiled against library: libvirt 1.3.1
> Using library: libvirt 1.3.1
> Using API: QEMU 1.3.1
> Running hypervisor: QEMU 2.5.0
>
> Best regards,
>
> Chihhang Wu
>
>
> ___
> libvirt-users mailing list
> libvirt-users@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users



-- 
Han Han
Associate Quality Engineer
Redhat

Email: h...@redhat.com
Phone: +861065339333

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


Re: [libvirt-users] shutdown -r now hangs in qemu-/kvm-vm

2017-02-27 Thread Han Han
Please provide more info about the issue, such as your libvirt/qemu
version, your host OS version,
your VM OS version, your VM xml.

Thanks.

On Mon, Feb 27, 2017 at 4:12 PM, Dan Johansson  wrote:

> Since updating app-emulation/libvirt and/or app-emulation/qemu (both
> were updated at the same time) I have a problem executing "shutdown -r
> now" in the vm ("shutdown -h now" works fine).
>
> When I execute "shutdown -r now" in the vm the shutdown process runs
> perfect until "Remounting root-filesystem readonly" and than it hangs
> and I have to "Force Power Off" to reboot.
>
> Any suggestion what could be wrong and what I can do to solve it?
>
> --
> Dan Johansson,
> ***
> This message is printed on 100% recycled electrons!
> ***
>
> ___
> libvirt-users mailing list
> libvirt-users@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
>
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] Attaching disks with external snapshots

2016-08-18 Thread Han Han
Hi Erlon,
Since you say you got Permission denied error while the ACL mode is 777, I 
guess it is due to security system like selinux or apparmor.
As I know, selinux defaultly will disable qemu to use volume based on NFS. We 
need to use 'setsebool virt_use_nfs 1' to enable it.
Well, your OS is ubuntu, so I think apparmor causes the permission problem. Try 
to find a way to enable virt_use_nfs or disable apparmor. Then check if the 
problem can be reproduced.

Han 

- Original Message -
From: "Erlon Cruz" <sombra...@gmail.com>
To: "Han Han" <h...@redhat.com>
Cc: "Yang Yang" <yany...@redhat.com>, "Yuan Dan" <dy...@redhat.com>, "Xuesong 
Zhang" <xuzh...@redhat.com>, libvirt-users@redhat.com
Sent: Thursday, 18 August, 2016 12:44:36 PM
Subject: Re: [libvirt-users] Attaching disks with external snapshots

Hi Han,

Any update on this?

Erlon

On Wed, Aug 17, 2016 at 9:58 AM, Erlon Cruz <sombra...@gmail.com> wrote:

> Han,
>
> Did the same test again with libvirt debug enabled. This time I added the
> disk[1] without snaps (OK), and then added the disk[2] with snapshots. The
> libvirt log[3] (line 320) says:
>
> *Could not open
> '/opt/stack/data/nova/mnt/a3b4c6ddd9bf82edd4f726872be58d05/volume-a75b42e8-8175-4516-b724-43ee6f3d2520':
> Permission denied\r\n", "id": "libvirt-33"}]*
>
> But this file has 777 permissions. I can access it with any user I
> tried[4]. Tough its mounted over NFS, the permissions seems to be right.
>
> Erlon
>
> [1]  http://paste.openstack.org/show/556055/
> [2]  http://paste.openstack.org/show/556056/
> [3]  http://pastebin.com/CCFcKq5b
> [4]  http://paste.openstack.org/show/559018/
>
>
> On Tue, Aug 16, 2016 at 2:41 PM, Erlon Cruz <sombra...@gmail.com> wrote:
>
>> Hi Han,
>>
>> Thanks for helping. What is the XML before the snapshot is created? Can
>> you post the XML files you used too? The files are in the links pointed by
>> the numbers [1], [2] etc.
>>
>> The versions are:
>> qemu-system-x86_64 --version
>> QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.4), Copyright
>> (c) 2003-2008 Fabrice Bellard
>>
>> libvirtd --version
>> libvirtd (libvirt) 1.3.1
>>
>>
>>
>> Erlon
>>
>> On Mon, Aug 15, 2016 at 12:56 AM, Han Han <h...@redhat.com> wrote:
>>
>>> Hi,Erlon
>>> I was not able to reproduce your problem. It is ok to attach disk with
>>> external snapshot.
>>> I did it with following steps:
>>> # qemu-img create /tmp/vdb 100M
>>> Formatting '/tmp/vdb', fmt=raw size=104857600
>>> # virsh start snap
>>> Domain snap started
>>> # virsh snapshot-create-as snap s1 --disk-only --diskspec
>>> vdb,file=/tmp/vdb.s1 --quiesce
>>> Domain snapshot s1 created
>>> # virsh dumpxml snap|awk '/>> 
>>>   
>>>   
>>>   
>>> 
>>> 
>>> 
>>>   
>>>   
>>>   
>>>   >> function='0x0'/>
>>> 
>>> 
>>>   
>>>   
>>>   
>>> 
>>> 
>>> 
>>>   
>>>   
>>>   
>>>   >> function='0x0'/>
>>> 
>>>
>>> Save the dumped vdb's xml to /tmp/vdb.xml
>>> # virsh detach-device snap /tmp/vdb.xml
>>> Device detached successfully
>>> # virsh attach-device snap /tmp/vdb.xml
>>> Device attached successfully
>>> # virsh dumpxml snap|awk '/>> 
>>>   
>>>   
>>>   
>>> 
>>> 
>>> 
>>>   
>>>   
>>>   
>>>   >> function='0x0'/>
>>> 
>>> 
>>>   
>>>   
>>>   
>>> 
>>> 
>>> 
>>>   
>>>   
>>>   
>>>   >> function='0x0'/>
>>> 
>>>
>>> So I managed to attach disks with snapshot.
>>> I want to know what is your libvirt and qemu-kvm version?
>>> And can you provide your files: /tmp/disk.xml[1],
>>> /tmp/snap-from-disk.xml[2], /tmp/disk-with-snap.xml[4],
>>> /tmp/disk-with-snap.xml . I need more details.
>>>
>>> Han Han
>>>
>>> - Original Message -
>>> From: "Erlon Cruz" <sombra...@gmail.com>
>>> To: libvirt-users@redhat.com
>>

Re: [libvirt-users] host freeze when starting VM

2016-05-11 Thread Han Han
It seems a kernel bug as your description. And I found some kvm problems fixed 
in 4.4.4:
* Tue Nov 10 2015 Laura Abbott <labb...@redhat.com> - 4.4.0-0.rc0.git6.1 - 
Linux v4.3-9393-gbd4f203 * Tue Nov 10 2015 Josh Boyer 
<jwbo...@fedoraproject.org> - Fix Yoga 900 rfkill switch issues (rhbz 1275490) 
- Fix incorrect size calculations in megaraid with 64K pages (rhbz 1269300) - 
CVE-2015-8104 kvm: DoS infinite loop in microcode DB exception (rhbz 1278496 
1279691) - CVE-2015-5307 kvm: DoS infinite loop in microcode AC exception (rhbz 
1277172 1279688)


- Original Message -
From: "Alexander Petrenz" <petren...@gmail.com>
To: "Han Han" <h...@redhat.com>
Cc: libvirt-users@redhat.com
Sent: Thursday, May 12, 2016 5:22:11 AM
Subject: Re: [libvirt-users] host freeze when starting VM

Hi Han,

thanks for your reply. I'm using KVM as hypervisor. The versions are:
Kernel: 4.5.2
Libvirt: 1.3.4-1

But its quite embarrasing... when I was answering your mail I was having a
look if there is a new kernel I can build, since I have to rely on some
patches. I upgraded from 4.4.3 to 4.5.2 and now libvirt doesn´t have any
problem.

So thanks for the heads up!

Regards
Alex


On Tue, May 10, 2016 at 11:18 AM, Han Han <h...@redhat.com> wrote:

> Could you tell me you libvirt and kernel version? What is your hypervisor?
> Kvm or xen? And hypervisor's version?
>
> - Original Message -
> From: "Alexander Petrenz" <petren...@gmail.com>
> To: libvirt-users@redhat.com
> Sent: Saturday, May 7, 2016 5:37:41 AM
> Subject: [libvirt-users] host freeze when starting VM
>
> Hi together,
>
> when I´m starting a VM my host freezes gradually. This seems to happen
> because its running out of memory and no other process is able to do
> anything.
> I have 16GB of ram in total. 8GB are reserved for hugepages. So for the
> daily business on the host I have 8GB left. I don´t run many or
> extraordinary consuming software on the host - normally just a gnome
> session and the chromium browser. Right now htop tells me that 10.1 of 15.4
> GB are occupied, so that should be about 2GB, because I suppose 8GB are
> just reserved for the hugepages. I don´t have any swap space.
>
> In my latest attempt I gave a newly created VM 64MB of ram and this also
> brought the system down to its knees. So I would like to understand why
> this is happening. Is it some configuration issue I'm not aware of or maybe
> even some bug? Can someone give any idea on this?
>
> Thanks in advance
> Alex
>
> ___
> libvirt-users mailing list
> libvirt-users@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
>

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] host freeze when starting VM

2016-05-10 Thread Han Han
Could you tell me you libvirt and kernel version? What is your hypervisor? Kvm 
or xen? And hypervisor's version?

- Original Message -
From: "Alexander Petrenz" 
To: libvirt-users@redhat.com
Sent: Saturday, May 7, 2016 5:37:41 AM
Subject: [libvirt-users] host freeze when starting VM

Hi together, 

when I´m starting a VM my host freezes gradually. This seems to happen because 
its running out of memory and no other process is able to do anything. 
I have 16GB of ram in total. 8GB are reserved for hugepages. So for the daily 
business on the host I have 8GB left. I don´t run many or extraordinary 
consuming software on the host - normally just a gnome session and the chromium 
browser. Right now htop tells me that 10.1 of 15.4 GB are occupied, so that 
should be about 2GB, because I suppose 8GB are just reserved for the hugepages. 
I don´t have any swap space. 

In my latest attempt I gave a newly created VM 64MB of ram and this also 
brought the system down to its knees. So I would like to understand why this is 
happening. Is it some configuration issue I'm not aware of or maybe even some 
bug? Can someone give any idea on this? 

Thanks in advance 
Alex 

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] glib2 head file error when build libvirt with wireshark support

2016-02-15 Thread Han Han

The wireshark requirement:
# pkg-config --print-requires wireshark
Qt

It works after changing the pc file as you said. Thanks you!!!

- Original Message -
From: "Martin Kletzander" <mklet...@redhat.com>
To: "Han Han" <h...@redhat.com>
Cc: libvirt-users@redhat.com, "Luyao Huang" <lhu...@redhat.com>
Sent: Monday, February 15, 2016 4:40:11 AM
Subject: Re: [libvirt-users] glib2 head file error when build libvirt with 
wireshark support

On Mon, Feb 15, 2016 at 03:05:00AM -0500, Han Han wrote:
>I compile the latest libvirt from fedora rawhide, but failed.
>The version of my software:
>wireshark-devel-2.0.1-2.fc24.x86_64
>glib2-2.47.5-2.fc24.x86_64
>gcc-5.1.1-4.fc23.x86_64
>binutils-2.26-10.fc24.x86_64
>

Can you post the output of:

  pkg-config --print-requires wireshark

If it does not output glib-2.0 and gmodule-2.0, then it's your wireshark
broken.  I see they have it fixed upstream (thanks to Michal, BTW), so
the next release should be fine.  In the meantime, you can just edit
your /usr/lib/pkgconfig/wireshark.pc to have the following line in it:

  Requires: glib-2.0, gmodule-2.0, gthread-2.0

HTH,
Martin

>The error as following:
># ./autogen.sh --prefix=/usr && make
>.
>wireshark/src/plugin.c:5:21: fatal error: gmodule.h: No such file or directory
>compilation terminated.
>Makefile:2442: recipe for target 
>'wireshark/src/wireshark_src_libvirt_la-plugin.lo' failed
>make[3]: *** [wireshark/src/wireshark_src_libvirt_la-plugin.lo] Error 1
>make[3]: *** Waiting for unfinished jobs
>In file included from wireshark/src/packet-libvirt.c:27:0:
>/usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file 
>or directory
>compilation terminated.
>Makefile:2435: recipe for target 
>'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed
>make[3]: *** [wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo] Error 1
>make[3]: Leaving directory '/root/libvirt/tools'
>Makefile:2104: recipe for target 'all' failed
>make[2]: *** [all] Error 2
>make[2]: Leaving directory '/root/libvirt/tools'
>Makefile:2002: recipe for target 'all-recursive' failed
>make[1]: *** [all-recursive] Error 1
>make[1]: Leaving directory '/root/libvirt'
>Makefile:1897: recipe for target 'all' failed
>make: *** [all] Error 2
>
>When I disable wireshark support, make successfully.
># ./configure --without-wireshark-dissector && make
>
>But the file gmodule.h and glib.h exist on my system:
># locate gmodule.h
>/usr/include/glib-2.0/gmodule.h
># locate glib.h
>/usr/include/glib-2.0/glib.h
>/usr/share/gtk-doc/html/glib/glib.html
>/usr/src/kernels/4.5.0-0.rc0.git1.1.fc24.x86_64/include/config/blk/dev/bsglib.h
>/usr/src/kernels/4.5.0-0.rc3.git3.1.fc24.x86_64/include/config/blk/dev/bsglib.h
>
>___
>libvirt-users mailing list
>libvirt-users@redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


[libvirt-users] glib2 head file error when build libvirt with wireshark support

2016-02-15 Thread Han Han
I compile the latest libvirt from fedora rawhide, but failed.
The version of my software:
wireshark-devel-2.0.1-2.fc24.x86_64
glib2-2.47.5-2.fc24.x86_64
gcc-5.1.1-4.fc23.x86_64
binutils-2.26-10.fc24.x86_64

The error as following:
# ./autogen.sh --prefix=/usr && make
.
wireshark/src/plugin.c:5:21: fatal error: gmodule.h: No such file or directory
compilation terminated.
Makefile:2442: recipe for target 
'wireshark/src/wireshark_src_libvirt_la-plugin.lo' failed
make[3]: *** [wireshark/src/wireshark_src_libvirt_la-plugin.lo] Error 1
make[3]: *** Waiting for unfinished jobs
In file included from wireshark/src/packet-libvirt.c:27:0:
/usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file or 
directory
compilation terminated.
Makefile:2435: recipe for target 
'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed
make[3]: *** [wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo] Error 1
make[3]: Leaving directory '/root/libvirt/tools'
Makefile:2104: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/root/libvirt/tools'
Makefile:2002: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/libvirt'
Makefile:1897: recipe for target 'all' failed
make: *** [all] Error 2

When I disable wireshark support, make successfully.
# ./configure --without-wireshark-dissector && make

But the file gmodule.h and glib.h exist on my system:
# locate gmodule.h
/usr/include/glib-2.0/gmodule.h
# locate glib.h   
/usr/include/glib-2.0/glib.h
/usr/share/gtk-doc/html/glib/glib.html
/usr/src/kernels/4.5.0-0.rc0.git1.1.fc24.x86_64/include/config/blk/dev/bsglib.h
/usr/src/kernels/4.5.0-0.rc3.git3.1.fc24.x86_64/include/config/blk/dev/bsglib.h

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


Re: [libvirt-users] How to fix an incorrect storage pool?

2015-11-14 Thread Han Han
I am sorry that I don't know the method you say works or not. And I don't know 
if it's dangerous.
Good luck to you.

- Original Message -
From: "Phill Edwards" <philledwa...@gmail.com>
To: "Han Han" <h...@redhat.com>
Cc: libvirt-users@redhat.com
Sent: Thursday, November 12, 2015 12:50:10 PM
Subject: Re: [libvirt-users] How to fix an incorrect storage pool?

On 12 Nov 2015 13:27, "Han Han" <h...@redhat.com> wrote:
>
> It says that  Logical volume centos_hyv2/swap in use. Maybe
centos_hyv2/swap is mounted. So I think you should umount or
> swapoff centos_hyv2/swap first, make sure it is not used by other
process. Then try pool-destroy.
>

Yes, that's the system swap. That and home and root are all in the storage
pool and are, of course, all in use and I can't run the machine without
them being in use. Perhaps if I rm'd the storage pool definition file? Do
you think that  would work or is it too dangerous?

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users