[libvirt-users] [virtual interface] detach interface during boot succeed with no changes
by Yalan Zhang
Hi guys,
when I detach an interface from vm during boot (vm boot not finished), it
always fail. I'm not sure if there is an existing bug. I have
confirmed with someone that for disk, there is similar behavior, if
this is also acceptable?
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 2; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:98:c4:a0'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
When I detach after the vm boot, expand the sleep time to 10, it will succeed.
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 10; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
Internal phone: 8389413
2 years, 2 months
[libvirt-users] Question about disabling UFO on guest
by Bao Nguyen
Hello everyone,
I would like to ask a question regarding to disable UFO of virtio vNIC in
my guest. I have read the document at https://libvirt.org/formatdomain.html
*host*
The csum, gso, tso4, tso6, ecn and ufo attributes with possible
values on and off can be used to turn off host offloading options. By
default, the supported offloads are enabled by QEMU. *Since 1.2.9 (QEMU
only)* The mrg_rxbuf attribute can be used to control mergeable rx buffers
on the host side. Possible values are on (default) and off. *Since 1.2.13
(QEMU only)*
*guest*
The csum, tso4, tso6, ecn and ufo attributes with possible
values on and off can be used to turn off guest offloading options. By
default, the supported offloads are enabl
ed by QEMU.
*Since 1.2.9 (QEMU only)*
Then I disabled UFO on my vNIC on guest as the following configuration
<devices>
<interface type='network'>
<source network='default'/>
<target dev='vnet1'/>
<model type='virtio'/>
<driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off'
queues='5' rx_queue_size='256' tx_queue_size='256'>
*<host gso='off' ufo='off' />*
*<guest ufo='off'/>*
</driver>
</interface>
</devices>
Then I reboot my node to get the change effect and it works. However, can I
disable the UFO without touching the host OS? or it always has to disable
on both host and guest like that?
Thanks,
Brs,
Natsu
4 years, 3 months
[libvirt-users] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
by Li Feng
Hi Guys,
And I want to add the vhost-user-scsi-pci/vhost-user-blk-pci support
for libvirt.
The usage in qemu like this:
Vhost-SCSI
-chardev socket,id=char0,path=/var/tmp/vhost.0
-device vhost-user-scsi-pci,id=scsi0,chardev=char0
Vhost-BLK
-chardev socket,id=char1,path=/var/tmp/vhost.1
-device vhost-user-blk-pci,id=blk0,chardev=char1
What type should I add for libvirt.
Type1:
<hostdev mode='subsystem' type='vhost-user'>
<source protocol='vhost-user-scsi' path='/tmp/vhost-scsi.sock'></source>
<alias name="vhost-user-scsi-disk1"/>
</hostdev>
Type2:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source protocol='vhost-user' path='/tmp/vhost-scsi.sock'>
</source>
<target dev='sdb' bus='vhost-user-scsi'/>
<boot order='3'/>
<alias name='scsi0-0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source protocol='vhost-user' path='/tmp/vhost-blk.sock'>
</source>
<target dev='vda' bus='vhost-user-blk'/>
<boot order='1'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/>
</disk>
Could anyone give some suggestions?
Thanks,
Feng Li
--
The SmartX email address is only for business purpose. Any sent message
that is not related to the business is not authorized or permitted by
SmartX.
本邮箱为北京志凌海纳科技有限公司(SmartX)工作邮箱. 如本邮箱发出的邮件与工作无关,该邮件未得到本公司任何的明示或默示的授权.
4 years, 11 months
[libvirt-users] nvme, spdk and host linux version
by Mauricio Tavares
I have been following the patches on nvme support on the list and was
wondering: If I wanted to build a vm host to be on the bleeding edge
for nvme and spdk fun in libvirt, which linux distro --
fedora/ubuntu/centos/etc -- should I pick?
4 years, 11 months
[libvirt-users] What's the best way to make use of VLAN interfaces with VMs?
by Richard Achmatowicz
Hello
I have a problem with attaching VMs to a VLAN interface.
Here is my setup: I have several physical hosts connected by a physical
switch. Each host has two NICs leading to the switch, which have been
combined into a team, team0. Each host a has a bridge br1, which has
team0 as a slave. So communication between hosts is based on the IP
address of bridge br1 on each host.
Up until recently, using libvirt and KVM, I was creating VMs which had
one interface attached the default virtual network and one interface
attached to the bridge:
virt-install ... --network network=default --network bridge=br1 ...
I would then statically assign an IP address to the bridge interface on
the guest when installing the OS.
A few days ago, a VLAN was introduced to split up the network. I created
a new VLAN interface br1.600 on each of the hosts. My initial attempt
was to do try this:
virt-install ... --network network=default --network bridge=br1.600 ...
which did not work. It then dawned on me that a VLAN interface and a
bridge aren't treated the same. So I started to look for ways to allow
my VMs to bind to this new interface.
This would seem to be a common situation. What is the best way to work
around this?
Both the host bridge and the host VLAN interface already have their
assigned IP addresses and appear like this in libvirt:
[root@clusterdev01 ]# ifconfig
br1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.110 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::1e98:ecff:fe1b:276d prefixlen 64 scopeid 0x20<link>
ether 1c:98:ec:1b:27:6d txqueuelen 1000 (Ethernet)
RX packets 833772 bytes 2976958254 (2.7 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 331237 bytes 23335124 (22.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
br1.600: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.110 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::1e98:ecff:fe1b:276d prefixlen 64 scopeid 0x20<link>
ether 1c:98:ec:1b:27:6d txqueuelen 1000 (Ethernet)
RX packets 189315 bytes 9465744 (9.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 302 bytes 30522 (29.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@clusterdev01]# virsh iface-list --all
Name State MAC Address
---------------------------------------------------
br1 active 1c:98:ec:1b:27:6d
br1.600 active 1c:98:ec:1b:27:6d
[root@clusterdev01 sysadmin]# virsh iface-dumpxml br1.600
<interface type='vlan' name='br1.600'>
<protocol family='ipv4'>
<ip address='192.168.1.110' prefix='24'/>
</protocol>
<protocol family='ipv6'>
<ip address='fe80::1e98:ecff:fe1b:276d' prefix='64'/>
</protocol>
<link state='up'/>
<vlan tag='600'>
<interface name='br1'/>
</vlan>
</interface>
I tried following some suggestions which wrapped the vlan interface in a
bridge interface, but in ended up trashing the br1.600 interface which
was originally defined on the host.
Is there a failsafe way to deal with such a situation? Am I doing
something completely wrong here? In would like br1.600 to behave like
br1 .....
Any suggestions or advice greatly appreciated.
Richard
4 years, 11 months
[libvirt-users] Converting LVM to qcow2
by ort_libvirt@bergersen.no
Hi!
I need to convert a KVM virtual machine from LVM to a qcow2 image, and wonder if this is the best way to do it (*1):
[$] qemu-img convert -O qcow2 /dev/vg_name/lv_name/ /var/lib/libvirt/images/image_name.qcow2
If this is the best way to do this, will this keep the information on: /dev/vg_name/lv_name/ untouched?
Thanks, and please point me towards another mailing list if this it not right place to ask questions related to qemu-img!
Best regards,
Richard Taubo
*1) Via: http://nocoast-tech.blogspot.com/2010/05/converting-kvm-guests-from-lvm-t...
4 years, 11 months
[libvirt-users] Domain XML Multicast Tunnel
by Richard M
Hello
I found under networking in the Domain XML 'Multcast tunnel'.
My question is does anyone know what is the intended use of multicast tunnel networking?What are the potential pitfalls of using such a configuration other than what's highlighted in the domain xml. eg: can it suffer from throughput issues? Can the tunnel be accessed from outside Libvirt?
I'm struggling to find any information about it. If anyone has any information about it, Or where I can obtain such information it would be appreciated.
Regards
Richard
4 years, 11 months
[libvirt-users] Fail to build upstream libvirt on rhel8
by 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: hhan(a)redhat.com
Phone: +861065339333
4 years, 12 months