Re: [libvirt-users] Xen PVH Support in libvirt

2018-03-13 Thread Jim Fehlig

On 03/13/2018 06:10 AM, Tizian Lamatsch wrote:

Hello @ all,

i wonder if there is any support for Xen PVH 
(https://wiki.xen.org/wiki/Xen_Project_Software_Overview) within libvirt.


No, PVH is currently not supported in the libvirt libxl driver.

If i parse a xen native domU config file with 'virsh domxml-from-native' in 
which i set type='pvh' it changes it in the libvirt xml output to normal pv.

Also the docs of libvirt do not state something like pvh.

I am currently running Xen 4.10.0 with LibVirt 4.0.0.

If it is not possible at the moment, can you please tell if this is a planned 
feature of libvirt?


Support for PVH is on a very long todo list. I'm not sure when I'll get to it, 
but patches are welcome.


FYI, Marek provided patches [0] to support the Xen community's first attempt at 
PVH (aka PVHv1, aka HVM lite), but thankfully those were never merged since 
PVHv1 is dead. In the meantime, no one has added support for the PVH mode 
ultimately embraced (aka PVHv2) by the Xen community.


Regards,
Jim

[0] https://www.redhat.com/archives/libvir-list/2016-August/msg00376.html

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


Re: [libvirt-users] Specify DNS and gateway for dnsmasq

2018-03-13 Thread Laine Stump
On 03/13/2018 11:08 AM, Gionatan Danti wrote:
> On 13/03/2018 15:30, Michal Privoznik wrote:> The default GW depends on
> the IP address you assigned to your network:
>>
>> 
>>
>> This says the default GW is 192.168.122.1/24. However, you can insert
>> other routes too:
>>
>> 

...however this wouldn't be of use to you - the routes listed in a
libvirt network are routes that are added on the *host*, not on the
guest. (these are used when there is a network behind a guest that the
host can only access via that guest).

>>
>> For handling DNS, you need to focus on  element. For instance, to
>> set a different forwarder than GW:
>>
>> 
>>    
>> 
> 
> For NATed/routed networks, sure. However, I have an isolated network
> like that (without the "forward" element):

We don't want DNS requests to be forwarded by dnsmasq from an isolated
network - forwarded DNS requests and responses can be used as a
clandestine medium for communicating outside the guest (we actually had
a bug report about this).

libvirt's virtual networks are intended to be a simple way to setup the
most common networking scenario. It sounds like you're beyond that, so
you probably should do your own network setup on the host outside of
libvirt. A libvirt virtual network is really just the combination of a
bridge device, a dnsmasq instance + config, some iptables rules, and
optionally some routes.

> 
> 
>   net1
>   dcf5c09b-dcb6-4fd3-86b8-6312a7b94bf6
>   
>   
>   
>   
>     
>   
>     
>   
> 
> 
> When the client asks for an IP via DHCP, it obtain a valid IP address
> but *no* gateway. Is it the expected behavior for an isolated network?
> From my understanding, network isolation is accomplished by firewall
> rules in the FORWARD table, rather than by not assigning the gateway IP
> address to clients.

It does both of those things (no gateway combined with iptables rules to
prevent traffic from being forwarded from the bridge). Why set a default
gateway when 1) it can't be used and 2) it may conflict with the default
gateway set on a 2nd interface in the guest that *can* be used to reach
outside the host? (a common use of an isolated network is to to contain
inter-guest communication between guests that have 2nd interfaces used
for communication with the outside).

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

Re: [libvirt-users] Resource control is not supported on this host

2018-03-13 Thread Daniel P . Berrangé
On Tue, Mar 13, 2018 at 05:13:52PM +0100, Peter Krempa wrote:
> On Tue, Mar 13, 2018 at 15:34:00 +0100, Michal Privoznik wrote:
> > On 03/13/2018 09:51 AM, Allence wrote:
> > > Libvirt release version V4.1.0
> > > It add a element is cachetune
> > > After we add this, We can use host-cpu-cache
> > > But when i add it, my host get a error message:
> > > "Resource control is not supported on this host"
> > > Why? 
> > 
> > For Cache Allocation Technology you need support at CPU hardware level.
> > Currently, only less than dozen CPUs support it (all server level Xeons):
> > 
> > https://www.intel.com/content/www/us/en/communications/cache-monitoring-cache-allocation-technologies.html#xeoncmtcat
> 
> Also besides that, the feature depends on a kernel feature which was
> broken upstream and deemed unusable and thus reverted. Until libvirt is
> rewritten to use the new resource control interface, the feature will
> not work with new kernels.

IIUC, that only applies to the perf stuff for reporting cache usage of
a VM.

The reporter here was trying to use the cache allocation stuff for
partitioning which AFAIK hasn't changed it userspace API

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 :|

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


Re: [libvirt-users] Resource control is not supported on this host

2018-03-13 Thread Peter Krempa
On Tue, Mar 13, 2018 at 15:34:00 +0100, Michal Privoznik wrote:
> On 03/13/2018 09:51 AM, Allence wrote:
> > Libvirt release version V4.1.0
> > It add a element is cachetune
> > After we add this, We can use host-cpu-cache
> > But when i add it, my host get a error message:
> > "Resource control is not supported on this host"
> > Why? 
> 
> For Cache Allocation Technology you need support at CPU hardware level.
> Currently, only less than dozen CPUs support it (all server level Xeons):
> 
> https://www.intel.com/content/www/us/en/communications/cache-monitoring-cache-allocation-technologies.html#xeoncmtcat

Also besides that, the feature depends on a kernel feature which was
broken upstream and deemed unusable and thus reverted. Until libvirt is
rewritten to use the new resource control interface, the feature will
not work with new kernels.


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

Re: [libvirt-users] Specify DNS and gateway for dnsmasq

2018-03-13 Thread Gionatan Danti
On 13/03/2018 15:30, Michal Privoznik wrote:> The default GW depends on 
the IP address you assigned to your network:




This says the default GW is 192.168.122.1/24. However, you can insert
other routes too:



For handling DNS, you need to focus on  element. For instance, to
set a different forwarder than GW:


   



For NATed/routed networks, sure. However, I have an isolated network 
like that (without the "forward" element):



  net1
  dcf5c09b-dcb6-4fd3-86b8-6312a7b94bf6
  
  
  
  

  

  


When the client asks for an IP via DHCP, it obtain a valid IP address 
but *no* gateway. Is it the expected behavior for an isolated network? 
From my understanding, network isolation is accomplished by firewall 
rules in the FORWARD table, rather than by not assigning the gateway IP 
address to clients.




No, that was just a proposal. RFC, a discussion how should we implement
some special features of DHCP. Those are not patches and in fact patches
implementing that were never merged.

Michal



Ok, thank you Michal.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.da...@assyoma.it - i...@assyoma.it
GPG public key ID: FF5F32A8

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


Re: [libvirt-users] Resource control is not supported on this host

2018-03-13 Thread Michal Privoznik
On 03/13/2018 09:51 AM, Allence wrote:
> Libvirt release version V4.1.0
> It add a element is cachetune
> After we add this, We can use host-cpu-cache
> But when i add it, my host get a error message:
> "Resource control is not supported on this host"
> Why? 

For Cache Allocation Technology you need support at CPU hardware level.
Currently, only less than dozen CPUs support it (all server level Xeons):

https://www.intel.com/content/www/us/en/communications/cache-monitoring-cache-allocation-technologies.html#xeoncmtcat

Michal

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


Re: [libvirt-users] Specify DNS and gateway for dnsmasq

2018-03-13 Thread Michal Privoznik
On 03/12/2018 06:45 PM, Gionatan Danti wrote:
> Hi all,
> how I can set dhcp options as DNS, gateway, etc in libvirt's network
> definitions?

The default GW depends on the IP address you assigned to your network:



This says the default GW is 192.168.122.1/24. However, you can insert
other routes too:



For handling DNS, you need to focus on  element. For instance, to
set a different forwarder than GW:


  


It's all documented here:

https://libvirt.org/formatnetwork.html#elementsStaticroute

and in the subsequent section.


> 
> From what I read here[1], I can use the  tag. However, I can not
> find nothing on libvirt official documentation.

No, that was just a proposal. RFC, a discussion how should we implement
some special features of DHCP. Those are not patches and in fact patches
implementing that were never merged.

Michal

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


[libvirt-users] auto propagate interface status change

2018-03-13 Thread John Lemon

Hello,

I'm trying to automatically pass interface status changes (e.g. LAN cable connection/disconnection, ) to a QEMU Debian virt, but the status in the virt is always 'up' (i.e. 'virsh domif-getlink 3 macvtap0' == up).

I'v tried setting 'virsh domif-setlink 3 macvtap1 up' or down, which works (i.e. domif-getlink==down). But I want that state to be automatically propagated to the virt.

The only thing I found after hours of searching was "Default behavior if [..] unspecified is to have the link state up" [2].

 

Do I miss something, or is this simply not integrated??

Best, John

 

 

 

On the host this is what I observed:

--

ip link show|grep enp1s0
3: enp1s0:  mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
19: macvtap1@enp1s0:  mtu 1500 qdisc pfifo_fast state LOWERLAYERDOWN mode DEFAULT group default qlen 500

--

virsh domiflist 3
setlocale: No such file or directory
Interface  Type   Source Model   MAC
-
macvtap0   direct enp3s0 virtio  00:30:d6:19:4c:8c
macvtap1   direct enp1s0 virtio  00:30:d6:19:2a:2d
vnet5  network    vmnet0 virtio  52:54:00:dc:14:e4

-- and

virsh domif-getlink 3 macvtap0
macvtap0 up

 

Following are stats concerning to the bug report how to [1]:


	The version number of the libvirt build, or SHA1 of the GIT commit
	
		virsh --version -> 3.0.0
		ii  gir1.2-libvirt-glib-1.0:amd64   1.0.0-1    amd64    GObject introspection files for the libvirt-glib library
		ii  libvirt-clients 3.0.0-4+deb9u1 amd64    Programs for the libvirt library
		ii  libvirt-daemon  3.0.0-4+deb9u1 amd64    Virtualization daemon
		ii  libvirt-daemon-system   3.0.0-4+deb9u1 amd64    Libvirt daemon configuration files
		ii  libvirt-glib-1.0-0:amd64    1.0.0-1    amd64    libvirt GLib and GObject mapping library
		ii  libvirt0    3.0.0-4+deb9u1 amd64    library for interfacing with different virtualization systems
		ii  python-libvirt  3.0.0-2    amd64    libvirt Python bindings
		ii  qemu-kvm    1:2.8+dfsg-6+deb9u3    amd64    QEMU Full virtualization on x86 hardware
		ii  virt-manager    1:1.4.0-5  all  desktop application for managing virtual machines
		ii  virtinst    1:1.4.0-5  all  Programs to create and clone virtual machines
		 
	
	
	The hardware architecture being used
	
		x86_64
	
	
	The name of the hypervisor (Xen, QEMU, KVM)
	
		QEMU
	
	
	The XML config of the guest domain if relevant
	
		    
		  
		  
		  
		  
		    
	
	
	For QEMU/KVM, the domain logfile from /var/log/libvirt/qemu


 

[1] https://libvirt.org/bugs.html#quality

[2] https://libvirt.org/formatdomain.html#elementLink


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

[libvirt-users] Xen PVH Support in libvirt

2018-03-13 Thread Tizian Lamatsch
Hello @ all,

i wonder if there is any support for Xen PVH 
(https://wiki.xen.org/wiki/Xen_Project_Software_Overview) within libvirt.
If i parse a xen native domU config file with 'virsh domxml-from-native' in 
which i set type='pvh' it changes it in the libvirt xml output to normal pv.
Also the docs of libvirt do not state something like pvh.

I am currently running Xen 4.10.0 with LibVirt 4.0.0.

If it is not possible at the moment, can you please tell if this is a planned 
feature of libvirt?

Thanks in advance for your help!

Best Regards,

Tizian



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

Re: [libvirt-users] libvirt connect vmware workstation fail

2018-03-13 Thread Daniel P . Berrangé
On Tue, Mar 13, 2018 at 03:56:30PM +0800, 吴金灿 wrote:
> bash: vmwarews+ssh://jc@127.0.0.1/session: No such file or directory 
> [jc@te ~]$ virsh -c vmwarews+ssh://jc@127.0.0.1/session 
> 错误:连接到管理程序失败 
> 错误:不支持的操作:ssh 连接驱动程序不支持在没有套接字路径的情况下连接到会话实例 
> [jc@te ~]$ virsh -c vmwarews+ssh://root@127.0.0.1/session 
> 错误:连接到管理程序失败 
> 错误:不支持的操作:ssh 连接驱动程序不支持在没有套接字路径的情况下连接到会话实例 
> [jc@te ~]$ virsh -c vmwarews:///session   
> Segmentation fault (核心已转储)

Please try running this last one under GDB to capture a stack trace.
You'll need to make sure you have debug symbols installed if you're
using a libvirt that's built by a distro.


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 :|

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

[libvirt-users] libvirt connect vmware workstation fail

2018-03-13 Thread ??????
bash: vmwarews+ssh://jc@127.0.0.1/session: No such file or directory 
[jc@te ~]$ virsh -c vmwarews+ssh://jc@127.0.0.1/session 
 
ssh 
 
[jc@te ~]$ virsh -c vmwarews+ssh://root@127.0.0.1/session 
 
ssh 
 
[jc@te ~]$ virsh -c vmwarews:///session   
Segmentation fault (??)___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Resource control is not supported on this host

2018-03-13 Thread Allence
Libvirt release version V4.1.0
It add a element is cachetune
After we add this, We can use host-cpu-cache
But when i add it, my host get a error message:
"Resource control is not supported on this host"
Why? 
Following is my environment:
kernel :4.1.5,
libvirt  :4.1.0 
qemu :2.9
host   :lfs-7.0


my add cachetune in xml:

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