[ovirt-users] Re: vGPU VM not starting

2018-05-18 Thread Martin Polednik

On 18/05/18 13:42 +0200, Francesco Romani wrote:

Hi,


On 05/17/2018 10:56 AM, Callum Smith wrote:

In an attempt not to mislead you guys as well, there appears to be a
separate, vGPU specific, issue.

https://www.dropbox.com/s/hlymmf9d6rn12tq/vdsm.vgpu.log?dl=0

I've uploaded the full vdsm.log to dropbox. Most recently I tried
unmounting alll network devices from the VM and booting it and i get a
different issue around the vGPU:

2018-05-17 09:48:24,806+0100 INFO  (vm/1bc9dae8) [root]
/usr/libexec/vdsm/hooks/before_vm_start/50_hos
tedengine: rc=0 err= (hooks:110)
2018-05-17 09:48:24,953+0100 INFO  (vm/1bc9dae8) [root]
/usr/libexec/vdsm/hooks/before_vm_start/50_vfi
o_mdev: rc=1 err=vgpu: No device with type nvidia-61 is available.
 (hooks:110)
2018-05-17 09:48:25,069+0100 INFO  (vm/1bc9dae8) [root]
/usr/libexec/vdsm/hooks/before_vm_start/50_vho
stmd: rc=0 err= (hooks:110)
2018-05-17 09:48:25,070+0100 ERROR (vm/1bc9dae8) [virt.vm]
(vmId='1bc9dae8-a0ea-44b3-9103-5805100648d0
') The vm start process failed (vm:943)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 872,
in _startUnderlyingVm
    self._run()
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 2862,
in _run
    self._custom)
  File "/usr/lib/python2.7/site-packages/vdsm/common/hooks.py", line
153, in before_vm_start
    return _runHooksDir(domxml, 'before_vm_start', vmconf=vmconf)
  File "/usr/lib/python2.7/site-packages/vdsm/common/hooks.py", line
120, in _runHooksDir
    raise exception.HookError(err)
HookError: Hook Error: ('',)

Despite the nvidia-61 being an option on the
GPU: https://pastebin.com/bucw21DG


Let's tackle one issue at time :)
From the shared logs, the VM start failed because of

2018-05-17 10:11:12,681+0100 INFO  (vm/1bc9dae8) [root] 
/usr/libexec/vdsm/hooks/before_vm_start/50_hostedengine: rc=0 err= (hooks:110)
2018-05-17 10:11:12,837+0100 INFO  (vm/1bc9dae8) [root] 
/usr/libexec/vdsm/hooks/before_vm_start/50_vfio_mdev: rc=1 err=vgpu: No device 
with type nvidia-53 is available.

maybe Martin can shed some light here?


Given that the actual slice is available in sysfs (as indicated by one
of the other branches of this thread), I fear we may be facing some
weird issue with the driver itself. 


Can you create the mdev manually?

$ uuidgen >
/sys/class/mdev_bus/${DEVICE_ADDR}/mdev_supported_types/nvidia-61

should be enough for a test.


Callum, please share Vdsm logs showing the network failure


Bests,

--
Francesco Romani
Senior SW Eng., Virtualization R
Red Hat
IRC: fromani github: @fromanirh


___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


Re: [ovirt-users] Nvidia vGPU in KVM Ovirt

2018-04-16 Thread Martin Polednik
On Mon, Apr 16, 2018 at 8:19 PM, codignotto  wrote:
> Hi everyone, has anyone successfully used an NVIDIA Tesla M10, M60 or other
> board to make vGPU? I'm trying a few months ago because I can not run mdev,
> the system does not recognize it, I think I'm doing something wrong because
> on the ovirt website it says it's compatible with NVIDIA grid and vGPU.
> Would anyone have any papers on this subject to give me a light? I want to
> replace xendesktop with spice + vgpu in ovirt
>
> Thank you

The unfortunate but necessary question is:

are you using NVIDIA drivers that specifically support vGPU? If so,
are the GPUs (Mxx) in `graphics` mode?

mpolednik

> Deny
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt 4.2: hostdev passthrough not working any more

2018-02-22 Thread Martin Polednik

On 22/02/18 10:40 +0200, Alexandr Krivulya wrote:

Hello, the same problem after upgrade to 4.2.1 :(


18.01.2018 11:53, Daniel Helgenberger пишет:

Hello,

yesterday I upgraded to 4.2.0 from 4.1.8.

Now I notice I cannot assign host dev pass though any more; in the GUI
the 'Pinnded to host' list is empty; I cannot select any host for pass
through host pinning.


Does the host that previously worked report device passthrough
capability? In the UI it's the "Device Passthrough: Enabled" field.
(and similarly named field in vdsm-client getCapabilities call)


When I was creating the particular VM in 4.1 it was working as expected.

The hostdev from before the upgrades are still present. I tried to
remove them and got an NPE (see below).

As a workaround, is the old hostusb[1] method I know back from 3.x still 
working in the 4.x
line?

AFAICT IOMMU is working


dmesg | grep -e DMAR -e IOMMU
[0.00] ACPI: DMAR 7b7e7000 002C6 (v01 HP ProLiant 0001 
HP   0001)
[0.168032] DMAR: Host address width 46
[0.168034] DMAR: DRHD base: 0x00fbffc000 flags: 0x0
[0.168047] DMAR: dmar0: reg_base_addr fbffc000 ver 1:0 cap 8d2078c106f0466 
ecap f020de
[0.168050] DMAR: DRHD base: 0x00c7ffc000 flags: 0x1
[0.168061] DMAR: dmar1: reg_base_addr c7ffc000 ver 1:0 cap 8d2078c106f0466 
ecap f020de
[0.168063] DMAR: RMRR base: 0x0079174000 end: 0x0079176fff
[0.168065] DMAR: RMRR base: 0x00791f4000 end: 0x00791f7fff
[0.168067] DMAR: RMRR base: 0x00791de000 end: 0x00791f3fff
[0.168070] DMAR: RMRR base: 0x00791cb000 end: 0x00791dbfff
[0.168071] DMAR: RMRR base: 0x00791dc000 end: 0x00791ddfff
[0.168073] DMAR: ATSR flags: 0x0
[0.168075] DMAR: ATSR flags: 0x0
[0.168079] DMAR-IR: IOAPIC id 10 under DRHD base  0xfbffc000 IOMMU 0
[0.168082] DMAR-IR: IOAPIC id 8 under DRHD base  0xc7ffc000 IOMMU 1
[0.168084] DMAR-IR: IOAPIC id 9 under DRHD base  0xc7ffc000 IOMMU 1
[0.168086] DMAR-IR: HPET id 0 under DRHD base 0xc7ffc000
[0.168088] DMAR-IR: Queued invalidation will be enabled to support x2apic 
and Intr-remapping.
[0.169073] DMAR-IR: Enabled IRQ remapping in x2apic mode

Thanks,

[1] https://www.ovirt.org/develop/release-management/features/virt/hostusb/


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Documentation about vGPU in oVirt 4.2

2018-02-06 Thread Martin Polednik

On 05/02/18 14:38 +0100, Gianluca Cecchi wrote:

On Fri, Feb 2, 2018 at 12:13 PM, Jordan, Marcel 
wrote:


Hi,

i have some NVIDIA Tesla P100 and V100 gpu in our oVirt 4.2 cluster and
searching for a documentation how to use the new vGPU feature. Is there
any documentation out there how i configure it correctly?

--
Marcel Jordan




Possibly check what would become the official documentation for RHEV 4.2,
even if it could not map one-to-one with oVirt

Admin guide here:
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2-beta/html/administration_guide/sect-host_tasks#Preparing_GPU_Passthrough

Planning and prerequisites guide here:
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2-Beta/html/planning_and_prerequisites_guide/requirements#pci_device_requirements

In oVirt 4.2 release notes I see these bugzilla entries that can help too...
https://bugzilla.redhat.com/show_bug.cgi?id=1481007
https://bugzilla.redhat.com/show_bug.cgi?id=1482033


There are also blogposts about vGPU in 4.1.4/4.2 that you might find useful:

https://mpolednik.github.io/2017/09/13/vgpu-in-ovirt/
https://mpolednik.github.io/2017/05/21/vfio-mdev/

mpolednik


HIH,
Gianluca



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Nvidia Tesla M60 Direct GPU-Passthrough giving issues + VNC

2018-01-30 Thread Martin Polednik

On 30/01/18 11:15 +0800, Ravyu Sivakumaran wrote:

Hi,

I am running an Ovirt host on a SuperMicro SuperServer 2028GR-TRH equipped
with 2x2 Tesla M60s (they are dual GPU Cards). I've followed this guide-
https://www.ovirt.org/develop/release-management/features/virt/hostdev-passthrough/
and managed to get a Windows 10 Enterprise guest running with one GPU
attached to it. The windows guest successfully detects the single M60 GPU
and I can install the latest Tesla drivers (390.65) on it with no problem.
However, the GPU refuses to do any work whatsoever. The control panel says
the GPU is being used for compute and not as a VGA adapter (shows up as
inactive on the activity monitor). Nvidia's GPUModeSwitcher tool tells me
that the GPU is in Graphics mode, so there is a driver issue here. I have
access to the GRID Drivers. However I'm not sure why I'd need them as I'm
only doing a direct-passthrough, not GPU Virtualization. Any ideas?


This might be an interesting question for NVIDIA - when using GPU
assignment for graphics, you'd expect the GPU to show grapics output
to a screen directly connected to the machine. Since M60 doesn't even
have any physical output, the drivers for it may not support
`graphical` mode outside of GRID setup.

What is your goal for the Tesla assignment?


Also, after activating Device-Passthrough, I'm unable to access my VM's via
the Hosts' VNC anymore. I get an "unable to connect" error. Im currently
accessing the Guests with a direct VNC connection. Problem is, I can't
clone/create new VMs anymore because of this. I must've done something
wrong, not sure what.


Does the same happen in case of SPICE?


Thanks in advance!
--
Yours Faithfully
Ravyu



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] About vGPU in oVirt

2018-01-04 Thread Martin Polednik

On 04/01/18 10:04 +0800, lofyer wrote:
It seems to be that no M10/M60 vGPU host driver for RHEL7 available on 
NVIDIA site.


Where should I get the driver or just wait for NVIDIA to release?


Wait for (or try asking) NVIDIA. oVirt can't provide the host/guest
vGPU driver.


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] VM resource allocation and IO Threads

2017-10-30 Thread Martin Polednik
As stated previously, 1 IO thread is somewhat sane choice. Multiple IO
threads make sense if you have multiple storage devices across
different NUMA nodes.

mpolednik

On Mon, Oct 30, 2017 at 4:29 PM, Darrell Budic  wrote:
> Best explanation I’ve found is
> https://wiki.mikejung.biz/KVM_/_Xen#virtio-blk_iothreads_.28x-data-plane.29
> If you google a bit, you’ll find some more under QEMU topics, I saw some
> discussion of threads and queues in virtio-scsi, but that seems to be a
> slightly different thing than this setting.
>
> In short, having at least 1 offers advantages for all your VM’s disks, and
> if you want to be optimal (at the possible expense of extra CPU for IO), one
> per drive attached. There is (currently) no benefit to having more than 1
> thread per drive. From what I can tell, if you have more drives than threads
> they share the threads evenly and are statically assigned to a thread. Seems
> to be effective at QEMU start, so you have to change it with the VM down or
> stop and start it again.
>
> I currently enable it on all VMs and assign 1 thread per drive on my
> systems.
>
> 
> From: Gianluca Cecchi 
> Subject: [ovirt-users] VM resource allocation and IO Threads
> Date: October 27, 2017 at 9:26:59 AM CDT
> To: users
>
> Hello,
> can anyone give any pointer to deeper information about what in subject and
> the value for "Num Of IO Threads" configuration, best practices and
> to-be-expected improvements?
>
> I read also here:
> https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html-single/virtual_machine_management_guide/#Editing_IO_Threads
>
> but in some points it seems not so clear to me:
>
> eg:
>
> If a virtual machine has more than one disk, you can enable or change the
> number of IO threads to improve performance.
>
> but also
>
> Red Hat recommends using the default number of IO threads, which is 1.
>
> There is also a note about deactivation and activation of disks: does it
> mean that even if I poweroff the VM and change its config I have to make
> this step after?
>
> Anyone has run benchmarks?
> Does it make sense if my VM has 3 disks to configure 6 IO threads for
> example?
> Do IO threads map to SCSI controllers inside the guest or what?
>
> Thanks in advance,
> Gianluca
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Huge pages in guest with newer oVirt versions

2017-09-18 Thread Martin Polednik
The hugepages are no longer a hook, but part of the code base. They
can be configured via engine property `hugepages`, where the value of
property is size of the pages in KiB (1048576 = 1G, 2048 = 2M).
Specifying any other size not supported by the architecture (or just
"1") will use platform's default hugepage size.

On Mon, Sep 18, 2017 at 11:39 AM, Gianluca Cecchi
 wrote:
> Hello,
> I would like to go again in deep with what preliminary tested and already
> discussed here:
>
> http://lists.ovirt.org/pipermail/users/2017-April/081320.html
>
> I'm testing an oVirt node in 4.1.6-pre
>
> I don't find the vdsm hook for huge pages; doing a search I get these:
>
> vdsm-hook-ethtool-options.noarch : Allow setting custom ethtool options for
> vdsm controlled nics
> vdsm-hook-fcoe.noarch : Hook to enable FCoE support
> vdsm-hook-openstacknet.noarch : OpenStack Network vNICs support for VDSM
> vdsm-hook-vfio-mdev.noarch : Hook to enable mdev-capable devices.
> vdsm-hook-vhostmd.noarch : VDSM hook set for interaction with vhostmd
> vdsm-hook-vmfex-dev.noarch : VM-FEX vNIC support for VDSM
>
> Did anything change between 4.1.1 and 4.1.5/4.1.6?
>
> I'm making preliminary tests with an Oracle RDBMS and HammerDB in both a
> physical server and a "big" VM inside another same hw server configured with
> oVirt.
>
> Results are not bad, but I would like to see having huge pages inside the
> guest how could change results.
>
> Just for reference:
>
> The 2 Physical server are blades with each one:
> 2 sockets, each one with 14 cores and ht enabled, so in total 56
> computational threads
> 256Gb ram
> huge pages enabled
>
> VM configured with this virtual hw on one of them:
> 2 sockets, each one with 6 cores and ht so in total 24 computational threads
> 64Gb ram
> no huge pages at the moment
>
> Oracle SGA is 32Gb on both physical rdbms and virtual one.
>
> Thanks for any insight to test huge pages in guest
>
> Gianluca
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt v4.1.2 error: Failed to start service 'vdsmd'

2017-05-30 Thread Martin Polednik

On 30/05/17 15:56 +0300, Nadav Goldin wrote:

Are you trying to setup the nodes in VMs? if so, which hypervisor are you using?
You need to have 'vmx' flag on the VMs - not only on the physical host.

On Tue, May 30, 2017 at 3:51 PM,   wrote:

After rebooting the oVirt node VMs, I see this at the host console (see
attached image)


On 2017-05-30 08:46, ov...@fateknollogee.com wrote:


I also rebooted the host VMs and typed "cat /proc/cpuinfo |grep vmx"
This also returns no errors.
-- Not sure why oVirt "Cannot detect if hardware supports virtualization"


Is your bios updated? It seems that rdmsr instruction is failing.


On 2017-05-30 08:39, ov...@fateknollogee.com wrote:


Even after rebooting the host many times, I check "# cat
/sys/module/kvm_intel/parameters/nested"
It always returns a "Y"


On 2017-05-30 02:47, Sandro Bonazzola wrote:


On Tue, May 30, 2017 at 8:33 AM, Yaniv Kaul  wrote:


Can you ensure virtualization is enabled on your host?
"Cannot detect if hardware supports virtualization " seems to hint
of an issue.



Indeed. Since you said you're running your tests in nested
virtualization, please ensure nested virtualization is enabled on your
hosts.
This is probably a bit outdated, but should still work:

http://resources.ovirt.org/old-site-files/wiki/OVirt-nested-virt-markwu.pdf


Y.

On Tue, May 30, 2017 at 7:15 AM,  wrote:


Failed to execute stage 'Environment setup': Failed to start
service 'vdsmd'
Hosted Engine deployment failed.

This is my 4th try installing oVirt...each time a different error

logs attached

THanks

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users [1]



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users [1]



--

SANDRO BONAZZOLA

ASSOCIATE MANAGER, SOFTWARE ENGINEERING, EMEA ENG VIRTUALIZATION R

Red Hat EMEA [2]

 [3]

TRIED. TESTED. TRUSTED. [4]



Links:
--
[1] http://lists.ovirt.org/mailman/listinfo/users
[2] https://www.redhat.com/
[3] https://red.ht/sig
[4] https://redhat.com/trusted



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Question about Huge Pages

2017-04-19 Thread Martin Polednik

On 19/04/17 14:01 +0200, Gianluca Cecchi wrote:

On Wed, Apr 19, 2017 at 8:03 AM, Michal Skrivanek 
wrote:



Why not reserving regular hugepages for VMs on boot?



Do you mean at hypervisor level? In this case it is what I'm doing normally
for physical servers where I install Oracle RDBMS



then you can use
it with vdsm hook for that Oracle VM.



Which hook are you referring?
This one:
http://www.ovirt.org/develop/developer-guide/vdsm/hook/hugepages/
?
In case is it still current? In the sense that I need to mount the
hugetblfs virtual file system at hst level?
The hook description seems low detailed...
Normally if I want oracle user able to use huge pages on physical server, I
have to specify

#
# Huge pages
#
vm.hugetlb_shm_group = 2000
# 18GB allocatable
vm.nr_hugepages = 9216
#

where 2000 is the group id for dba group, the main group of oracle user

How to map this with vrtualization?
Eg:
1) vm.hugetlb_shm_group at hypervisor side should be set to the group of
the qemu user as the qemu-kvm process runs with it?
2) Then I have to set VM for VM the hugepages=xxx value in the hook and
that will bypass the sysctl.conf configuration in the guest?
3) I presume I have to set the vm.hugetlb_shm_group parameter at guest
level


If you are using recent CentOS (or I guess Fedora), there isn't any
extra setup required. Just create the custom property:

On the host where engine is running:

$ engine-config -s "UserDefinedVMProperties=hugepages=^.*$"
$ service ovirt-engine restart

and you should see 'hugepages' when editing a VM under custom properties.
Set the number to (desired memory / 2048) and you're good to go. The
VM will run with it's memory backed by hugepages. If you need
hugepages even inside the VM, do whatever you would do on a physical
host.

mpolednik


Thanks,
Gianluca




It improves VM performance in
general, the only drawback is less flexibility since that memory can't
be used by others unless they specifically ask for  hugepages.



This seems to confirm that I have to set a statich sysctl.conf entry at
hypervisor level such as
vm.nr_hugepages = 



Also, I suppose you disable KSM, and I'm not sure about ballooning,
unless you need it I'd disable it too.



I kept the defaults at the moment that I suppose should be

a) KSM disabled

ksm has been configured to start by default as normally, but ksmtuned has
been disabled:

[g.cecchi@ov300 ~]$ sudo systemctl status ksm
● ksm.service - Kernel Samepage Merging
  Loaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor
preset: enabled)
  Active: active (exited) since Tue 2017-04-11 11:07:28 CEST; 1 weeks 1
days ago
 Process: 976 ExecStart=/usr/libexec/ksmctl start (code=exited,
status=0/SUCCESS)
Main PID: 976 (code=exited, status=0/SUCCESS)
  CGroup: /system.slice/ksm.service

Apr 11 11:07:28 ov300.datacenter.polimi.it systemd[1]: Starting Kernel
Samepage Merging...
Apr 11 11:07:28 ov300.datacenter.polimi.it systemd[1]: Started Kernel
Samepage Merging.

[g.cecchi@ov300 ~]$ sudo systemctl status ksmtuned
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
  Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; disabled;
vendor preset: disabled)
  Active: inactive (dead)
[g.cecchi@ov300 ~]$


b) ballooning enabled for a newly created VM unless I explicitly disable it
(at least I see this happens in 4.1.1)

What to do for a) and b) to not interfere with huge pages?



The hook is being improved right now in master, but it should be
usable in stable too.



I will be happy to test and verify and contribute to its description, as
soon as I understand its usage

Gianluca



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] How to passthrough GPU to windows guest

2017-03-28 Thread Martin Polednik

On 28/03/17 16:22 +0800, yimao wrote:

Thanks for your suggestions, I have tried that but problems still
exist. Yes, I used Nvidia GTX 750Ti.

I found the qemu's arguments have changed.

   7210 ?SLl0:31 /usr/libexec/qemu-kvm -name
guest=win7_1,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-16-win7_1/master-key.aes
-machine pc-i440fx-rhel7.3.0,accel=kvm,usb=off -cpu
Broadwell,+rtm,+hle,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=whatever,kvm=off
-m size=1048576k,slots=16,maxmem=4194304k -realtime mlock=off -smp
1,maxcpus=16,sockets=16,cores=1,threads=1 -numa
node,nodeid=0,cpus=0,mem=1024 -uuid
1fba3bd6-0659-4463-92ea-8efa43411082 -smbios
type=1,manufacturer=oVirt,product=oVirt
Node,version=7-3.1611.el7.centos,serial=031B021C-040D-050E-D806-900700080009,uuid=1fba3bd6-0659-4463-92ea-8efa43411082
-no-user-config -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-16-win7_1/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc
base=2017-03-28T08:54:41,driftfix=slew -global
kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8 -device
virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4
-drive if=none,id=drive-ide0-1-0,readonly=on -device
ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
file=/rhev/data-center/0001-0001-0001-0001-0311/c053a0c0-45ad-4f7a-b9ce-c1ac90c900d4/images/082d4d4c-3aae-4369-9cbb-e6a7b31c3204/63da97f3-7b1f-406b-905f-b12eeb96d55f,format=raw,if=none,id=drive-scsi0-0-0-0,serial=082d4d4c-3aae-4369-9cbb-e6a7b31c3204,cache=none,werror=stop,rerror=stop,aio=threads
-device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
-netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=35 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:16:01:51,bus=pci.0,addr=0x3
-chardev 
socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/1fba3bd6-0659-4463-92ea-8efa43411082.com.redhat.rhevm.vdsm,server,nowait
-device 
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm
-chardev 
socket,id=charchannel1,path=/var/lib/libvirt/qemu/channels/1fba3bd6-0659-4463-92ea-8efa43411082.org.qemu.guest_agent.0,server,nowait
-device 
virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0
-device usb-tablet,id=input0,bus=usb.0,port=1 -vnc
192.168.120.235:0,password -k en-us -device
qxl-vga,id=video0,ram_size=67108864,vram_size=8388608,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x2
-device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x6 -device
vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x7 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -object
rng-random,id=objrng0,filename=/dev/urandom -device
virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x9 -msg
timestamp=on

Does ovirt use vga passthrough or gpu passthrough? Should I install EDK2 OVMF?


It uses secondary GPU passthrough; the VGA is still occupied by the
spice QXL. No OVMF necessary at all.

That being said, if you still have the problem, I'd try to maybe work
with the hook to also disable hyperv and whatever you find around the
internet. It looks like everyone's card needs something different. To
be on the safe side, quadro k2200 seem to work fine.


Thanks in advance.

2017-03-28 15:17 GMT+08:00 Martin Polednik <mpoled...@redhat.com>:

On 28/03/17 02:12 +0800, yimao wrote:


Hi,

I'm trying to passthrough gpu card to windows 7 guest, but I got the
error code 43.
I use ovirt node: ovirt-node-ng-installer-ovirt-4.1-2017032304.iso and
ovirt-engine-appliance-4.1-20170322.1.el7.centos.noarch.rpm
I have added  options "intel_iommu=on rdblacklist=nouveau
pci-stub.ids=10de:1380,10de:0fbc" to the grub.conf and attached these
devices to the guest. After I have installed the gpu's driver, I got
the error code 43.
Did I miss something? Any pointers or suggestions would be greatly
appreciated.



You are most likely using consumer grade GPU that errors out in
Windows if it's running under virtualized environment. You could try
using the following hook (make sure it's in
/usr/libexec/vdsm/hooks/before_vm_start and it's executable bit is set
(chmod +x ...)).

Just copy paste the following block to a bash and try to start the VM
again.

cd /usr/libexec/vdsm/hooks/before_vm_start
cat << EOF >> 99_mask_kvm
#!/usr/bin/python2

import hooking
domxml = hooking.read_domxml()

hyperv = domxml.getElementsByTagName('hyperv')[0]
smm = domxml.createElement('vendor_id')
smm.setAttribute('state', 'on')
smm.setAttribute('value', 'whatever')
hyperv.appendChild(smm)

features = domxml.getElementsByTagName('features')[0]
kvm = domxml.createElement('kvm')
hidden = domxml.createElement('hidden')
hidden.setAttribute('s

Re: [ovirt-users] How to passthrough GPU to windows guest

2017-03-28 Thread Martin Polednik

On 28/03/17 02:12 +0800, yimao wrote:

Hi,

I'm trying to passthrough gpu card to windows 7 guest, but I got the
error code 43.
I use ovirt node: ovirt-node-ng-installer-ovirt-4.1-2017032304.iso and
ovirt-engine-appliance-4.1-20170322.1.el7.centos.noarch.rpm
I have added  options "intel_iommu=on rdblacklist=nouveau
pci-stub.ids=10de:1380,10de:0fbc" to the grub.conf and attached these
devices to the guest. After I have installed the gpu's driver, I got
the error code 43.
Did I miss something? Any pointers or suggestions would be greatly appreciated.


You are most likely using consumer grade GPU that errors out in
Windows if it's running under virtualized environment. You could try
using the following hook (make sure it's in
/usr/libexec/vdsm/hooks/before_vm_start and it's executable bit is set
(chmod +x ...)).

Just copy paste the following block to a bash and try to start the VM
again.

cd /usr/libexec/vdsm/hooks/before_vm_start
cat << EOF >> 99_mask_kvm
#!/usr/bin/python2

import hooking
domxml = hooking.read_domxml()

hyperv = domxml.getElementsByTagName('hyperv')[0]
smm = domxml.createElement('vendor_id')
smm.setAttribute('state', 'on')
smm.setAttribute('value', 'whatever')
hyperv.appendChild(smm)

features = domxml.getElementsByTagName('features')[0]
kvm = domxml.createElement('kvm')
hidden = domxml.createElement('hidden')
hidden.setAttribute('state', 'on')
kvm.appendChild(hidden)
features.appendChild(kvm)

hooking.write_domxml(domxml)
EOF
chmod +x 99_mask_kvm



Thanks in advance.
Yiimao Yang.

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] yet another blogpost - hostdev passthrough

2017-03-20 Thread Martin Polednik

Heya,

I've put together another blog post, now on a slightly more advanced
topic of hostdev passthrough. Currently only looking into generic PCI
devices, but I hope to summarize other passthrough related
technologies soon!

https://mpolednik.github.io/2017/03/19/hostdev-passthrough-pci/
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] virtio-scsi drive order?

2017-03-16 Thread Martin Polednik

On 16/03/17 08:23 +0100, gflwqs gflwqs wrote:

Hi list!
When we upgraded our ovirt environment to 4.1 we get the virtio-scsi
interface as default for virtual disks.
We have seen a difference in drive order from when we used the virtio
interface.

Before when we added disks the order of the drives were set by which order
the disks was created.
So if i had 1 disk as os disk it became vda and added a 50 GB disk that
disk became vdb and then added another 8GB disk that became vdc.

But now when i add two additional disks with the virtio-scsi interface like
the above when i reboot the vm the 50GB disk become sdc and the 8GB disk
become sdb even that i created the 50GB disk first?
How is the order decided in the virtio-scsi interface?
What can i do to ensure that the disks come in the order that i create them?

Regards
Christian


Could you post the XML (virsh -r list, note the domain
number and virsh -r dumpxml $domainnumber) before and after adding the
disks? Need to see whether there are also any iothreads or anything
else.

Thanks,
mpolednik


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] gpu passthrough

2017-02-21 Thread Martin Polednik

On 21/02/17 17:26 +0800, qinglong.d...@horebdata.cn wrote:

Hi, all:
   I want to assign the gpu card of one host to the vm which is running in 
the host.
   After I click "OK", I got nothing. Anyone can help? Thanks!


Hi,

Please define nothing. Did the VM not start? Or has it started but
there was no GPU output?

In the second case, it's still possible to use SPICE and list devices
in the VM (depends on the OS) to see whether the GPU is there -- it
could be that it's present but doesn't output anything.


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] blog post: virtio-blk vs virtio-scsi

2017-01-23 Thread Martin Polednik

Hi!

It's time for another blog post -- virtio-blk VS virtio-scsi. The
topic isn't chosen at random, master branch of oVirt now uses
virito-scsi as the default interface for drives instead of virtio-blk.
The decision to do so wasn't just about flipping a code-switch -- get
reading to see why. :)

https://mpolednik.github.io/2017/01/23/virtio-blk-vs-virtio-scsi/

mpolednik
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Host Device Mapping

2017-01-22 Thread Martin Polednik

On 20/01/17 14:38 -0600, Bryan Sockel wrote:


Hi,

I am trying to map a host device to a VM, I am able to get the host device
mapped to the VM, but i am unable to start the vm.  I receive the following
Error:

Error while executing action:

VM:
Cannot run VM. There is no host that satisfies current scheduling
constraints. See below for details:
The host vm-host-1 did not satisfy internal filter HostDevice because it
does not support host device passthrough..
The host vm-host-2 did not satisfy internal filter HostDevice because it
does not support host device passthrough..


Is the host device you're trying to pass through on the PCI bus? Is
IOMMU enabled in your bios and kernel? Host requirements section in
[1] could help.

[1] 
http://www.ovirt.org/develop/release-management/features/engine/hostdev-passthrough/


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Lowering the bar for wiki contribution?

2017-01-04 Thread Martin Polednik

On 04/01/17 09:57 +0200, Roy Golan wrote:

I'm getting the feeling I'm not alone in this, authoring and publishing a
wiki page isn't as used to be for long time.

I want to suggest a bit lighter workflow:

1.  Everyone can merge their page - (it's a wiki)
 Same as with (public and open) code, no one has the motivation to publish
a badly written
 wiki page under their name. True, it can have an impact, but not as with
broken code

2. Use Page-Status marker
The author first merges the draft. Its now out there and should be updated
as time goes and its
status is DRAFT. Maintainers will come later and after review would change
the status to
PUBLISH. That could be a header in on the page:
---
page status: DRAFT/PUBLISH
---

Simple I think, and should work.


+1, github's contribution workflow is terrible and doesn't make any
sense for wiki pages.


___
Devel mailing list
de...@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Fwd: [Call for feedback] anybody gave 4.1 beta a try?

2017-01-02 Thread Martin Polednik

On 23/12/16 10:42 +0100, Nathanaël Blanchet wrote:



Le 22/12/2016 à 17:17, Yaniv Kaul a écrit :



On Thu, Dec 22, 2016 at 12:50 PM, Nathanaël Blanchet 
> wrote:


   Hi,

   sebool unconfigured module prevents vdsm from starting:


We always run with selinux. What's the reason for disabling it?
I never disabled selinux, why do you think I did this? it is active, 
this is the problem!

Y.


   [root@gaua2 network-scripts]# vdsm-tool configure --force

   Checking configuration status...

   Current revision of multipath.conf detected, preserving
   libvirt is already configured for vdsm
   SUCCESS: ssl configured to true. No conflicts

   Running configure...
   libsepol.context_from_record: type ovirt_vmconsole_host_port_t is
   not defined (No such file or directory).
   libsepol.context_from_record: could not create context structure
   (Invalid argument).
   libsepol.port_from_record: could not create port structure for
   range 2223:2223 (tcp) (Invalid argument).
   libsepol.sepol_port_modify: could not load port range 2223 - 2223
   (tcp) (Invalid argument).
   libsemanage.dbase_policydb_modify: could not modify record value
   (Invalid argument).
   libsemanage.semanage_base_merge_components: could not merge local
   modifications into policy (Invalid argument).
   Traceback (most recent call last):
 File "/usr/bin/vdsm-tool", line 219, in main
   return tool_command[cmd]["command"](*args)
 File "/usr/lib/python2.7/site-packages/vdsm/tool/__init__.py",
   line 38, in wrapper
   func(*args, **kwargs)
 File
   "/usr/lib/python2.7/site-packages/vdsm/tool/configurator.py", line
   141, in configure
   _configure(c)
 File
   "/usr/lib/python2.7/site-packages/vdsm/tool/configurator.py", line
   88, in _configure
   getattr(module, 'configure', lambda: None)()
 File
   "/usr/lib/python2.7/site-packages/vdsm/tool/configurators/sebool.py",
   line 84, in configure
   _setup_booleans(True)
 File
   "/usr/lib/python2.7/site-packages/vdsm/tool/configurators/sebool.py",
   line 57, in _setup_booleans
   sebool_obj.finish()
 File "/usr/lib/python2.7/site-packages/seobject/__init__.py",
   line 320, in finish
   self.commit()
 File "/usr/lib/python2.7/site-packages/seobject/__init__.py",
   line 310, in commit
   rc = semanage_commit(self.sh)
   OSError: [Errno 22] Invalid argument


Had same issue, managed to solve it by reinstalling ovirt_vmconsole
rules:

# semodule -i /usr/share/selinux/packages/ovirt-vmconsole/ovirt_vmconsole.pp

mpolednik



   Le 19/12/2016 à 11:55, Maton, Brett a écrit :

   I'll give that ago this evening, although that might be related
   to trying to deploy to the host multiple times

   On 19 December 2016 at 09:54, Simone Tiraboschi
   > wrote:



   On Mon, Dec 19, 2016 at 10:11 AM, Maton, Brett
   >
   wrote:

   Log from the last deploy attempt attached.


   2016-12-18 12:52:05 DEBUG
   otopi.plugins.ovirt_host_mgmt.packages.update
   update.verbose:94 Yum: There are unfinished transactions
   remaining. You might consider running
   yum-complete-transaction, or "yum-complete-transaction
   --cleanup-only" and "yum history redo last", first to finish
   them. If those don't work you'll have to try
   removing/installing packages by hand (maybe package-cleanup
   can help).

   It seams that you have unfinished yum transactions on your
   host; can you please check for that and then try redeploying
   the host?


   On 19 December 2016 at 08:30, Simone Tiraboschi
   > wrote:



   On Sat, Dec 17, 2016 at 7:17 PM, Maton, Brett
   > wrote:

   I had a mac address conflict so reinstalled (
   from scratch ) 4.1 this morning, CPU load issue
   in UI was still there.


   We already have an open bug about this:
   https://bugzilla.redhat.com/show_bug.cgi?id=1390675
   Thanks for the report.


   I can't deploy additional hosts now though due to
   SSH errors.


   Could you please attach host-deploy logs?


   Experimenting, I updated the hosted engine this
   afternoon and the CPU load issue seems be have
   either been fixed or resolved itself.

   However, SSH errors deploying additional hosts
   persists ( I had no problem with the previous
   install on Friday ).

   enging.log snippet:
   2016-12-17 17:09:54,764Z ERROR
   [org.ovirt.engine.core.uutils.ssh.SSHDialog]
   

Re: [ovirt-users] feedback and questions about SR-IOV feature

2016-12-06 Thread Martin Polednik

On 06/12/16 16:58 +0200, Michael Burman wrote:

Hello Nathanael

VFs are regular NICs and can be used as regular NICs.
We are allowing to create bond from them and allowing to attach logical
networks to them, because as long as they are not used by any VM, they can
be used just as any other interfaces on the host.

When creating bond from 2 VFs you should see the pencil icon, because you
want to able to edit the bond.
Vf is an interface and you can use it just as you use regular interface on
the host.

* When you create bond from 2 VFs, this VFs are no longer free and you
can't use them to run VM
* The same for attaching a network to VF, this VF is no longer considered
as free VF.

There is no problem about it, this is exactly how it was designed ) , you
have to remember that as long as the VFs are not used by VM, they can be
used as regular NICs and you can do with them everything you want.


That doesn't mean we have the right design: there is no problem in
bonding 2 VFs belonging to 2 different PFs; but every sane software
warns you if you try to bond 2 VFs from the same PF together (what do
you get by such bond?) -- this applies to both host and guest.



http://www.ovirt.org/develop/release-management/features/engine/sr-iov/

Regards,


On Tue, Dec 6, 2016 at 4:23 PM, Nathanaël Blanchet <blanc...@abes.fr> wrote:




Le 06/12/2016 à 13:19, Martin Polednik a écrit :


On 06/12/16 12:14 +0100, Nathanaël Blanchet wrote:


Hello,

My new 10G NICS support now SR-IOV, and I've played with this new
feature as passthrough device, so as to reduce my host CPU consumption.

At the origin, I set up a bond on both 10G PF nics.

After many configurations, the only way I manage to use a VF into a VM,
is to get out of the bond one nic.

So does it mean that it is impossible to run a VM with VF with PF
attached to a bond?



As far as I know, it's not possible to do that. The reason is that the
bond normally creates new (logical) interface, what you are doing is
assigning "part" of the bond directly to a VM and the driver within VM
isn't aware of the bond.


This is what I supposed, UI should prevent us to create VFfrom when nic is
attached to a bond. Pencil icon should'nt appear in this case.



Moreover, something strange happens : during the boot of the VM, the

passthrough device gets an dhcp IP on the native vlan of the bond, and once
finally up, the real vlan used by this device is on the different
predifined vlan. It implies to me to reconfigure the network to ping
something on the wanted vlan. Really crazy.



This could be explained by previous statement: bonding PFs at
hypervisor level and then assigning VFs to a VM can most likely cause
undefined behavior.


The issue is the same when the PF is not attached to a bond, so in an
expected working situation.



Other question is : In which case can it be useful to be able to bond 2

VF? UI let us to do so, but it is impossible to add any bridge on that
virtual bond.



At hypervisor level? I believe it doesn't make sense.


I wonder this because UI allows to do it. The same as above, user
shouldn't be allowed to bond two VFs, and not allowed to add virtual
network to a VF



If you require bond between 2 PFs, you can assign 2 VFs each from
different PF to a VM and bond them within the guest.

Comparing to a large number of restrictions (migration and others), my

opinion is that this feature seems to be very difficult to use in
production...



The use case for SR-IOV is maximum performance at the cost of
convenience while still (somewhat) allowing you to scale.

--

Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr



___

Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users





--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users





--
Michael Burman
RedHat Israel, RHV-M Network QE

Mobile: 054-5355725
IRC: mburman

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] feedback and questions about SR-IOV feature

2016-12-06 Thread Martin Polednik

On 06/12/16 15:23 +0100, Nathanaël Blanchet wrote:



Le 06/12/2016 à 13:19, Martin Polednik a écrit :

On 06/12/16 12:14 +0100, Nathanaël Blanchet wrote:

Hello,

My new 10G NICS support now SR-IOV, and I've played with this new 
feature as passthrough device, so as to reduce my host CPU 
consumption.


At the origin, I set up a bond on both 10G PF nics.

After many configurations, the only way I manage to use a VF into 
a VM, is to get out of the bond one nic.


So does it mean that it is impossible to run a VM with VF with PF 
attached to a bond?


As far as I know, it's not possible to do that. The reason is that the
bond normally creates new (logical) interface, what you are doing is
assigning "part" of the bond directly to a VM and the driver within VM
isn't aware of the bond.
This is what I supposed, UI should prevent us to create VFfrom when 
nic is attached to a bond. Pencil icon should'nt appear in this case.


Agreed.



Moreover, something strange happens : during the boot of the VM, 
the passthrough device gets an dhcp IP on the native vlan of the 
bond, and once finally up, the real vlan used by this device is on 
the different predifined vlan. It implies to me to reconfigure the 
network to ping something on the wanted vlan. Really crazy.


This could be explained by previous statement: bonding PFs at
hypervisor level and then assigning VFs to a VM can most likely cause
undefined behavior.
The issue is the same when the PF is not attached to a bond, so in an 
expected working situation.


Interesting, could be something regarding mac anti-spoofing. I've
found something for Mellanox cards (you didn't specify which NIC do
you use) - https://community.mellanox.com/docs/DOC-2461 -- could that
be the source of your issues?



Other question is : In which case can it be useful to be able to 
bond 2 VF? UI let us to do so, but it is impossible to add any 
bridge on that virtual bond.


At hypervisor level? I believe it doesn't make sense.
I wonder this because UI allows to do it. The same as above, user 
shouldn't be allowed to bond two VFs, and not allowed to add virtual 
network to a VF


Agreed.
(also adding networking people)



If you require bond between 2 PFs, you can assign 2 VFs each from
different PF to a VM and bond them within the guest.

Comparing to a large number of restrictions (migration and 
others), my opinion is that this feature seems to be very 
difficult to use in production...


The use case for SR-IOV is maximum performance at the cost of
convenience while still (somewhat) allowing you to scale.


--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users




--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] feedback and questions about SR-IOV feature

2016-12-06 Thread Martin Polednik

On 06/12/16 12:14 +0100, Nathanaël Blanchet wrote:

Hello,

My new 10G NICS support now SR-IOV, and I've played with this new 
feature as passthrough device, so as to reduce my host CPU 
consumption.


At the origin, I set up a bond on both 10G PF nics.

After many configurations, the only way I manage to use a VF into a 
VM, is to get out of the bond one nic.


So does it mean that it is impossible to run a VM with VF with PF 
attached to a bond?


As far as I know, it's not possible to do that. The reason is that the
bond normally creates new (logical) interface, what you are doing is
assigning "part" of the bond directly to a VM and the driver within VM
isn't aware of the bond.

Moreover, something strange happens : during the boot of the VM, the 
passthrough device gets an dhcp IP on the native vlan of the bond, and 
once finally up, the real vlan used by this device is on the different 
predifined vlan. It implies to me to reconfigure the network to ping 
something on the wanted vlan. Really crazy.


This could be explained by previous statement: bonding PFs at
hypervisor level and then assigning VFs to a VM can most likely cause
undefined behavior.

Other question is : In which case can it be useful to be able to bond 
2 VF? UI let us to do so, but it is impossible to add any bridge on 
that virtual bond.


At hypervisor level? I believe it doesn't make sense.

If you require bond between 2 PFs, you can assign 2 VFs each from
different PF to a VM and bond them within the guest.

Comparing to a large number of restrictions (migration and others), my 
opinion is that this feature seems to be very difficult to use in 
production...


The use case for SR-IOV is maximum performance at the cost of
convenience while still (somewhat) allowing you to scale.


--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] hostdev passthrough

2016-12-06 Thread Martin Polednik

On 05/12/16 21:12 -0500, Charles Kozler wrote:

If you're not using SRIOV then what do you need passthrough for? If it's
for something like connecting a port that is connected to a mirror port on
a switch then you can bridge it then add the nic to the VM. I've done this
for security onion and other systems that need a mirror port to get data


The benefits of passthrough are

a) performance,
b) avoiding host stack (e.g. nic could only have guest OS drivers).

If your host is capable of passthrough[1], you can navigate to the VM
tab -> host devices subtab and assign the nic there.

[1] meaning VT-d (or AMD-vi) properly works
https://www.ovirt.org/develop/release-management/features/engine/hostdev-passthrough/


On Dec 5, 2016 8:48 PM, "qinglong.d...@horebdata.cn" <
qinglong.d...@horebdata.cn> wrote:


I have not understood SR-IOV clearly. I just want to pass through the nic
of the host to the vm. Is it possible?


*From:* Yaniv Dary 
*Date:* 2016-12-01 19:16
*To:* qinglong.d...@horebdata.cn
*CC:* users 
*Subject:* Re: [ovirt-users] hostdev passthrough
Are you trying to use SR-IOV or NIC pass-through?

Yaniv Dary
Technical Product Manager
Red Hat Israel Ltd.
34 Jerusalem Road
Building A, 4th floor
Ra'anana, Israel 4350109
Tel : +972 (9) 7692306 <+972%209-769-2306>
8272306
Email: yd...@redhat.com
IRC : ydary


On Thu, Dec 1, 2016 at 3:54 AM, qinglong.d...@horebdata.cn <
qinglong.d...@horebdata.cn> wrote:


Hi, all:
I want to assign a nic of one host to the vm which is running in
the host.

When I assign the nic to vm, I got nothing.

And I got the event:
Anyone can help? Thanks!

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users











___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ovirt homeserver

2016-10-31 Thread Martin Polednik

On 28/10/16 17:46 +0100, david caughey wrote:

Hi,

I'm building a homeserver to run ovirt and wanted to get opinions on the
best approach.
The server will be used as a test/studybed for
ovirt/kvm/vcloud/openstack/ceph.
The server will be based around a Xeon E5 10 core with 128GB ram.
Option 1:
Build server with CentOS 7.2 and deploy ovirt directly on top.


Perfect if you have/expect multiple machines. How do you expect to
handle storage?


Option 2:
Build server with CentOS 7.2 and deploy multiple ovirt instances on top of
KVM.


Perfect for single machine setup.


Which will be the most stable versatile method?
If a GPU is used as a passthrough device can it be used on several vm's or
is it restricted to 1 vm?


Single card for single VM meaning 1:1 mapping only for now.


If 2 GPU's are used can 1 be used as a dedicated passthrough to 1 vm and
the other shared between the remaining vm's?


As stated above, no. Most typical home lab setup uses 2 GPUs, one for
hypervisor and other one to be assigned to a VM.


Is CentOS/RH the best platform for ovirt?


For playing around and general usage, yes (in my opinion :) ).


Is it okay/advisable to load the latest kernel, (4.8 ish), on to CentOS
before installing ovirt?


I wouldn't really do that, you'd have to bump up version of KVM,
possibly QEMU and libvirt -- in the end you'd end up running fedora.

mpolednik


Any and all comments/advice welcome,

David



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] status update: running containers alongside VMs

2016-10-13 Thread Martin Polednik

On 13/10/16 06:40 -0400, Francesco Romani wrote:

Hi everyone,

I'm happy to share some progress about the former "convirt"[1] project,
which aims to let Vdsm containers alongside VMs, on bare metal.

In the last couple of months I kept updating the patch series, which
is approaching the readiness to be merged in Vdsm.

Please read through this mail to see what the patchset can do now,
how you could try it *now*, even before it is merged.

Everyone is invited to share thoughts and ideas about how this effort
could evolve.
This will be a long mail; I will amend, enhance and polish the content
and make a blog post (on https://mojaves.github.io) to make it easier
to consume and to have some easy-to-find documentation. Later on the
same content will appear also on the oVirt blog.


Thank you for the e-mail!


Happy hacking!

+++

# How to try how the experimental container support for Vdsm.

Vdsm is gaining *experimental* support to run containers alongside VMs.
Vdsm had since long time the ability to manage VMs which run containers,
and recently gained support for
[atomic 
guests](http://www.projectatomic.io/blog/2015/01/running-ovirt-guest-agent-as-privileged-container/).

With the new support we are describing, you will be able to manage containers
with the same, proven infrastructure that let you manage VMs.

This feature is currently being developed and it is still not merged in the
Vdsm codebase, so some extra work is needed if you want to try it out.
We aiming to merge it in the oVirt 4.1.z cycle.

## What works, aka what to expect

The basic features are expected to work:
1. Run any docker image on the public docker registry
2. Make the container accessible from the outside (aka not just from localhost)
3. Use file-based storage for persistent volumes

## What does not yet work, aka what NOT to expect

Few things are planned and currently under active development:
1. Monitoring. Engine will not get any update from the container besides "VM" 
status (Up, Down...)


The question is what to actually monitor. Do we want some performance
metrics or simple "service is running" probe?


  One important drawback is that you will not be told the IP of the container 
from Engine,
  you will need to connect to the Vdsm host to discover it using standard 
docker tools.
2. Proper network integration. Some steps still need manual intervention
3. Stability and recovery - it's pre-alpha software after all! :)


This is something we should really discuss and care about - to which
degree we want to pet our containers.



## 1. Introduction and prerequisites

Trying out container support affects only the host and the Vdsm.
Besides add few custom properties (totally safe and supported since early
3.z), there are zero changes required to the DB and to Engine.
Nevertheless, we recommend to dedicate one oVirt 4.y environment,
or at least one 4.y host, to try out the container feature.

To get started, first thing you need is to setup a vanilla oVirt 4.y
installation. We will need to make changes to the Vdsm and to the
Vdsm host, so hosted engine and/or oVirt node may add extra complexity,
better to avoid them at the moment.

The reminder of this tutorial assumes you are using two hosts,
one for Vdsm (will be changed) and one for Engine (will require zero changes);
furthermore, we assume the Vdsm host is running on CentOS 7.y.

We require:
- one test host for Vdsm. This host need to have one NIC dedicated to 
containers.
 We will use the [docker macvlan 
driver](https://raesene.github.io/blog/2016/07/23/Docker-MacVLAN/),
 so this NIC *must not be* part of one bridge.
- docker >= 1.12
- oVirt >= 4.0.5 (Vdsm >= 4.18.15)
- CentOS >= 7.2

Docker >= 1.12 is avaialable for download 
[here](https://docs.docker.com/engine/installation/linux/centos/)

Caveats:
1. docker from official rpms conflicts con docker from CentOS, and has a 
different package name: docker-engine vs docker.
  Please note that the kubernetes package from CentOS, for example, require 
'docker', not 'docker-engine'.
2. you may want to replace the default service file
  [with this 
one](https://github.com/mojaves/convirt/blob/master/patches/centos72/systemd/docker/docker.service)
  and to use this
  [sysconfig 
file](https://github.com/mojaves/convirt/blob/master/patches/centos72/systemd/docker/docker-engine).
  Here I'm just adding the storage options docker requires, much like the 
CentOS docker is configured.
  Configuring docker like this can save you some troubleshooting, especially if 
you had docker from CentOS installed
  on the testing box.

## 2. Patch Vdsm to support containers

You need to patch and rebuild Vdsm.
Fetch [this 
patch](https://github.com/mojaves/convirt/blob/master/patches/vdsm/4.18.15.1/0001-container-support-for-Vdsm.patch.gz)
and apply it against Vdsm 4.18.15.1. Vdsm 4.18.15.{1,2,...} are supported as 
well.

Rebuild Vdsm and reinstall on your box.
[centos 7.2 packages are 

Re: [ovirt-users] Failed to read hardware information

2016-10-13 Thread Martin Polednik

On 13/10/16 09:01 +0300, Dan Kenigsberg wrote:

On Thu, Oct 13, 2016 at 11:52:17AM +1100, David Pinkerton wrote:

Nir,

Looks like its crashing on the dmidecode system call.

I've attached the output from gbd as well as a dmidecode text dump,
dmidecode binary dump and each keywords run individually.

>From the keywords it look like my dmi info is corrupted.  I have download a
AMI dmi editor but this only allows access to limited fields.  Do you know
another tools to rewrite the dmi info?


I don't. But whatever is inside your dmi, dmidecode must not crash.
Which version of python-dmidecode do you have installed?
Would you open a bug against it?


This is really unfortunate - I've reproduced the issue with the
attached dump and it's python-dmidecode that crashes. The issue is
actually fixed upstream, but the version at least in RHEL does not
contain the fix.

RHEL version:
python-dmidecode-3.10.13-11.el7.x86_64

works with (actual upstream):
python-dmidecode-3.12.2-1.el7.x86_64
(actually it's ~6 line change in dmioem.c)

VDSM output:
# vdsClient 0 getVdsHardwareInfo
   systemFamily = 'To Be Filled By O.E.M.'
   systemManufacturer = 'Supermicro'
   systemProductName = 'H8DM8-2'
   systemSerialNumber = '1234567890'
   systemUUID = '00020003-0004-0005-0006-000700080009'
   systemVersion = '1234567890'

Although the upstream version of python-dmidecode is able to deal with
improper DMI tables, I can't say what else will/will not behave correctly.

mpolednik



I believe that its maintainers would appriace a simple reproducer, that
does not involve ovirt or Vdsm. See if you can simplify the code in

def __leafDict(d):
   ret = {}
   for k, v in d.iteritems():
   if isinstance(v, dict):
   ret.update(__leafDict(v))
   else:
   ret[k] = v
   return ret


def getAllDmidecodeInfo():
   import dmidecode

   myLeafDict = {}
   for k in ('system', 'bios', 'cache', 'processor', 'chassis', 'memory'):
   myLeafDict[k] = __leafDict(getattr(dmidecode, k)())
   return myLeafDict
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] blog - real time oVirt host

2016-09-27 Thread Martin Polednik

Hello oVirt users!

For the past week-or-so, I've been playing with real time hosts in
oVirt. I'm thrilled to say that it works*!

* Now the important bits. There is a lot of configuration that has to
be done manually and some caveats such as no graphics console or
virtio if you want to respect real time boundaries. Additionally, the
steps to enable RT are not uniform and depend on hardware and
application.

That being said, I've still tried to summarize the process of
configuring a real time host in a blog post:

https://mpolednik.github.io/2016/09/19/real-time-host-in-ovirt/

Criticism or your results are welcome!

mpolednik
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Edit default vdsm.conf

2016-09-05 Thread Martin Polednik

On 05/09/16 23:06 +1000, mailingli...@mooash.com wrote:

For my own peace of mind (and just in case these defaults don't work
with our network setup), is there any info on the proper way to
achieve this?


On Mon, 5 Sep 2016, at 10:59 PM, Yaniv Kaul wrote:



On Thu, Sep 1, 2016 at 11:58 AM,  wrote:

Hey,

 I'm wondering how I change what gets put into the default
 vdsm.conf on
 oVirt systems?

 I've looked at the docs here
 (https://github.com/oVirt/ovirt-host-deploy/blob/master/README.environment)
 and they suggest I should be able to put something like this:

 [environment:init]
 VDSM_CONFIG/vars/migration_max_bandwidth=str:0
 VDSM_CONFIG/vars/max_outgoing_migrations=str:1

 In /etc/ovirt-host-deploy.conf.d/50-custom.conf on the engine
 (does it
 need to go on the hosts instead?)


The file needs to be present on the host(s). It's (hopefully) more
clear at [1] if you look at faqemu or fakevmstats section.

[1] https://github.com/oVirt/ovirt-host-deploy


 How ever I can't get that to work. The var above never gets
 deployed to
 the system and if I add it and reinstall oVirt (Right Click on
 Host ->
 Reinstall) the config gets wiped. Is this the proper way?
 Should I be
 putting this config somewhere else to get it to find it?

 The system its running on is on oVirt 3.6.x but will be
 upgraded to 4
 soon if that helps. Its also not a hosted Engine, a standalone one.
 Hosts are running C7 but Engine is still on C6 (about to be moved to
 C7).


If it'll be upgraded to 4.0 soon - don't bother. 4.0 has a great
performing migration schemes set up already.
Y.



Cheers,
 James
 ___
 Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Attaching a physical DVD drive

2016-08-25 Thread Martin Polednik

On 23/08/16 16:57 +0300, Yaniv Kaul wrote:

On Tue, Aug 23, 2016 at 4:50 PM, Maor Lipchuk  wrote:


-
On Tue, Aug 23, 2016 at 4:32 PM, Niksa Baldun 
wrote:


Hi Maor,

thanks for the reply. So, to be clear, it is not possible to install from
physical DVD drive?



Indeed



I suspect you could do a host pass-through to the host DVD drive, but I
don't think it makes sense.
Y.


It is possible, but we don't have the logic to set boot order of host
devices. It is therefore possible with a hook or by being lucky enough
to have guest firmware probe the correct device.





I have to copy it to hard drive and include it in storage domain?



Using the ISO Storage Domain is one way to solve this.
You might also use glance or image uploader, but you still won't get away
from the copy operation




Regards,

Nikša

On 23 August 2016 at 15:24, Maor Lipchuk  wrote:


Hi Niksa,

If you can make the DVD to be used as an ISO file and use it as part of
an ISO Storage Domain and boot your VM from it

Edit the Virtual Machine -> go to "boot options" -> mark "Attach CD" and
pick the ISO you want to use when booting the VM.

See http://www.ovirt.org/documentation/quickstart/quickstart
-guide/#Attach_an_ISO_domain for more details

Regards,
Maor

On Tue, Aug 23, 2016 at 4:09 PM, Niksa Baldun 
wrote:


Hello,

sorry if this is a stupid question, but how do I install OS in a VM
from a physical DVD inserted in drive on host? Google tells me nothing.

Thanks.


Nikša

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users








___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users





___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Is it possible to disable qxl video?

2016-07-12 Thread Martin Polednik

On 11/07/16 18:03 +0200, Arman Khalatyan wrote:

Thanks for clarification. the kvm=off solved the problem.
NICE!!! I got now inside the VM:
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 630/PCIe/SSE2
OpenGL core profile version string: 4.4.0 NVIDIA 367.27
OpenGL core profile shading language version string: 4.40 NVIDIA via Cg
compiler
OpenGL core profile context flags: (none)

the steps to reproduce:
1) virsh edit render
2) change schema of xml: 
3) add following in the end before :

   
   
 
4)  start vm, install nvidia driver, check gpu: nvidia smi
5) install virtualgl, init 3
6) nvidia-xconfig --enable-all-gpus --separate-x-screens
--use-display-device=None --virtual=1280x1024
init 5
7) vglconnet render01.vm and finally: vglrun glxinfo or whatever!!!

Now back to origin: how to add this tweak in to ovirt?? :)



We have hooks just for that! You'll want before_vm_start hook point.
Some idea how the hook could look like:

$ pwd
/usr/libexec/vdsm/hooks/before_vm_start

$ cat 99_maskkvm
#!/usr/bin/python

import hooking


if __name__ == '__main__':
   domxml = hooking.read_domxml()
   domain = domxml.getElementsByTagName('domain')[0]
   cmdline = domxml.createElement('qemu:commandline')
   for arg in ('-cpu', 'host,kvm=off'):
   cmdline_arg = domxml.createElement('qemu:arg')
   cmdline_arg.setAttribute('value', arg)
   cmdline.appendChild(cmdline_arg)

   domain.appendChild(cmdline)
   hooking.write_domxml(domxml)


The hook must be installed on every host that you expect to run
passthrough VMs.

mpolednik



***

Dr. Arman Khalatyan  eScience -SuperComputing
Leibniz-Institut für Astrophysik Potsdam (AIP)
An der Sternwarte 16, 14482 Potsdam, Germany

***

On Mon, Jul 11, 2016 at 5:30 PM, Martin Polednik <mpoled...@redhat.com>
wrote:


On 11/07/16 17:16 +0200, Arman Khalatyan wrote:


Yes I have a BusID inside the xorg.conf.
I just tested with virt-manager and indeed it is not a ovirt failure.
It is something to do with qemu-kvm + nvidia.
I found here:https://wiki.debian.org/VGAPassthrough  that nvidia disables
device when it is running on qemu-kvm is it still the case? to overcome
that one need to set:

-cpu host,kvm=off

in the command line of qemu.



This applies to GPUs that NVIDIA does not support in virtualized
environments (actually your GTX630). Quadro K2200 and higher
(incl. grid, tesla) should not require masking the hypervisor. It
could be worth to supply dmesg from the host and from the guest so we
could see if there is any apparent failure.

That being said, I have had failures even with supported card that
just stopped at one point. It's worth trying the kvm=off trick.

I was trying to convert virsh commands to qemu native, but it fails on

Centos 7 :(
virsh dumpxml > render.xml
virsh  domxml-to-native qemu-argv render.xml
error: internal error: invalid PCI passthrough type 'default'



I usually take the qemu command line from
/var/log/libvirt/qemu/${VM_NAME}, tweak it in vim and launch. Works
even for oVirt VMs (if you can hack around the storage).


***


Dr. Arman Khalatyan  eScience -SuperComputing
Leibniz-Institut für Astrophysik Potsdam (AIP)
An der Sternwarte 16, 14482 Potsdam, Germany

***

On Mon, Jul 11, 2016 at 11:55 AM, Martin Polednik <mpoled...@redhat.com>
wrote:

On 11/07/16 09:46 +, Karli Sjöberg wrote:




Den 11 jul 2016 11:37 fm skrev Arman Khalatyan <arm2...@gmail.com>:



I just testing several GPUs with pci-passthrough: GTX630, Tesla 2050
and
FX5800.
None of them I got running with opengl/direct rendering inside the
virtual machine.
I was thinking something to do with qxl driver, but after blacklisting
it in the VMs kernel nothing was changed.
The VMs Xorg claiming always no display found even if I configure it
with headless option: nvidia-xconfig -a --use-display-device=None
--virtual=1280x1024
But with nvidia-smi I can see the GPU status, and I can run all cuda
tests where opengl/X11 is not involved.
My test system is CentOS 7 with ovirt 4.
BTW If I clone VM which was not running, to real host on bare metal,
everything is running as expecting.



Don't remember If this was mentioned but have you tried doing the same
thing but with virt-manager on a standalone host, just to rule out oVirt
from the equation?



Also, the xorg must be setup to use the VFIO GPU. There is BusID
option in device section that must point to the guest address of the
GPU. I'm not sure if you've done that (and I'm quite sure it's missing
on the wiki, noted).

[in the guest]
$ lspci | grep VGA
03:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro
K2200] (rev a2)

and  using the address, add device section to /etc/X11/xorg.conf

Section "Device"
   Identifier &quo

Re: [ovirt-users] Is it possible to disable qxl video?

2016-07-11 Thread Martin Polednik

On 11/07/16 17:16 +0200, Arman Khalatyan wrote:

Yes I have a BusID inside the xorg.conf.
I just tested with virt-manager and indeed it is not a ovirt failure.
It is something to do with qemu-kvm + nvidia.
I found here:https://wiki.debian.org/VGAPassthrough  that nvidia disables
device when it is running on qemu-kvm is it still the case? to overcome
that one need to set:

-cpu host,kvm=off

in the command line of qemu.


This applies to GPUs that NVIDIA does not support in virtualized
environments (actually your GTX630). Quadro K2200 and higher
(incl. grid, tesla) should not require masking the hypervisor. It
could be worth to supply dmesg from the host and from the guest so we
could see if there is any apparent failure.

That being said, I have had failures even with supported card that
just stopped at one point. It's worth trying the kvm=off trick.


I was trying to convert virsh commands to qemu native, but it fails on
Centos 7 :(
virsh dumpxml > render.xml
virsh  domxml-to-native qemu-argv render.xml
error: internal error: invalid PCI passthrough type 'default'


I usually take the qemu command line from
/var/log/libvirt/qemu/${VM_NAME}, tweak it in vim and launch. Works
even for oVirt VMs (if you can hack around the storage).


***

Dr. Arman Khalatyan  eScience -SuperComputing
Leibniz-Institut für Astrophysik Potsdam (AIP)
An der Sternwarte 16, 14482 Potsdam, Germany

***

On Mon, Jul 11, 2016 at 11:55 AM, Martin Polednik <mpoled...@redhat.com>
wrote:


On 11/07/16 09:46 +, Karli Sjöberg wrote:



Den 11 jul 2016 11:37 fm skrev Arman Khalatyan <arm2...@gmail.com>:



I just testing several GPUs with pci-passthrough: GTX630, Tesla 2050 and
FX5800.
None of them I got running with opengl/direct rendering inside the
virtual machine.
I was thinking something to do with qxl driver, but after blacklisting
it in the VMs kernel nothing was changed.
The VMs Xorg claiming always no display found even if I configure it
with headless option: nvidia-xconfig -a --use-display-device=None
--virtual=1280x1024
But with nvidia-smi I can see the GPU status, and I can run all cuda
tests where opengl/X11 is not involved.
My test system is CentOS 7 with ovirt 4.
BTW If I clone VM which was not running, to real host on bare metal,
everything is running as expecting.



Don't remember If this was mentioned but have you tried doing the same
thing but with virt-manager on a standalone host, just to rule out oVirt
from the equation?



Also, the xorg must be setup to use the VFIO GPU. There is BusID
option in device section that must point to the guest address of the
GPU. I'm not sure if you've done that (and I'm quite sure it's missing
on the wiki, noted).

[in the guest]
$ lspci | grep VGA
03:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro
K2200] (rev a2)

and  using the address, add device section to /etc/X11/xorg.conf

Section "Device"
   Identifier "Device0"
   Driver "nvidia"
   VendorName "NVIDIA Corporation"
   BusID  "PCI:3:0:0"
EndSection

That should allow xorg to use the assigned GPU.

mpolednik


/K










***

 Dr. Arman Khalatyan  eScience -SuperComputing
 Leibniz-Institut für Astrophysik Potsdam (AIP)
 An der Sternwarte 16, 14482 Potsdam, Germany

*******

On Mon, Jul 11, 2016 at 9:06 AM, Martin Polednik <mpoled...@redhat.com>
wrote:



On 08/07/16 11:29 +0200, Michal Skrivanek wrote:




On 06 Jul 2016, at 14:06, Francesco Romani <from...@redhat.com> wrote:



From: "Arman Khalatyan" <arm2...@gmail.com>
To: "users" <users@ovirt.org>
Sent: Monday, July 4, 2016 11:52:24 AM
Subject: [ovirt-users] Is it possible to disable qxl video?


Hi,
I am doing PCI Passthrough for GPUs.
Is it possible somehow to disable/remove default video qxl?
thanks,
Arman,.
Hi,

The 4.0 Vdsm allows you to run a headless VM, meaning a VM without
graphic device/frontend.
Not sure Engine allows you that however.




no it doesn’t




Even if engine allowed that, it may not be the correct solution.

Running headless with PCI passthrough is considered primary VGA
passthrough[1]. Using primary VGA passthrough without OVMF could cause
(will cause) quite a bit of headaches.

If you really want to try that, I assume using before_vm_start hook to
remove the video device should be enough.

[1] http://wiki.xenproject.org/wiki/Xen_VGA_Passthrough - it's
possible to read about primary and secondary passthrough between the
lines

However, if QXL is the problem (why is that so?) then you can switch to

VGA(or CIRRUS if this is still 3.6)

I'm afraid you will need to write a Vdsm hook.


There could be simpler solutions depending o

Re: [ovirt-users] Is it possible to disable qxl video?

2016-07-11 Thread Martin Polednik

On 11/07/16 09:46 +, Karli Sjöberg wrote:


Den 11 jul 2016 11:37 fm skrev Arman Khalatyan <arm2...@gmail.com>:


I just testing several GPUs with pci-passthrough: GTX630, Tesla 2050 and FX5800.
None of them I got running with opengl/direct rendering inside the virtual 
machine.
I was thinking something to do with qxl driver, but after blacklisting it in 
the VMs kernel nothing was changed.
The VMs Xorg claiming always no display found even if I configure it with 
headless option: nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
But with nvidia-smi I can see the GPU status, and I can run all cuda tests 
where opengl/X11 is not involved.
My test system is CentOS 7 with ovirt 4.
BTW If I clone VM which was not running, to real host on bare metal, everything 
is running as expecting.


Don't remember If this was mentioned but have you tried doing the same thing 
but with virt-manager on a standalone host, just to rule out oVirt from the 
equation?


Also, the xorg must be setup to use the VFIO GPU. There is BusID
option in device section that must point to the guest address of the
GPU. I'm not sure if you've done that (and I'm quite sure it's missing
on the wiki, noted).

[in the guest]
$ lspci | grep VGA
03:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro
K2200] (rev a2)

and  using the address, add device section to /etc/X11/xorg.conf

Section "Device"
   Identifier "Device0"
   Driver "nvidia"
   VendorName "NVIDIA Corporation"
   BusID  "PCI:3:0:0"
EndSection

That should allow xorg to use the assigned GPU.

mpolednik


/K








***

 Dr. Arman Khalatyan  eScience -SuperComputing
 Leibniz-Institut für Astrophysik Potsdam (AIP)
 An der Sternwarte 16, 14482 Potsdam, Germany

*******

On Mon, Jul 11, 2016 at 9:06 AM, Martin Polednik <mpoled...@redhat.com> wrote:


On 08/07/16 11:29 +0200, Michal Skrivanek wrote:




On 06 Jul 2016, at 14:06, Francesco Romani <from...@redhat.com> wrote:


From: "Arman Khalatyan" <arm2...@gmail.com>
To: "users" <users@ovirt.org>
Sent: Monday, July 4, 2016 11:52:24 AM
Subject: [ovirt-users] Is it possible to disable qxl video?


Hi,
I am doing PCI Passthrough for GPUs.
Is it possible somehow to disable/remove default video qxl?
thanks,
Arman,.
Hi,

The 4.0 Vdsm allows you to run a headless VM, meaning a VM without graphic 
device/frontend.
Not sure Engine allows you that however.



no it doesn’t



Even if engine allowed that, it may not be the correct solution.

Running headless with PCI passthrough is considered primary VGA
passthrough[1]. Using primary VGA passthrough without OVMF could cause
(will cause) quite a bit of headaches.

If you really want to try that, I assume using before_vm_start hook to
remove the video device should be enough.

[1] http://wiki.xenproject.org/wiki/Xen_VGA_Passthrough - it's
possible to read about primary and secondary passthrough between the
lines


However, if QXL is the problem (why is that so?) then you can switch to VGA(or 
CIRRUS if this is still 3.6)


I'm afraid you will need to write a Vdsm hook.

There could be simpler solutions depending on the Engine

Bests,

--
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani
___
Users mailing list
Users@ovirt.org <mailto:Users@ovirt.org>
http://lists.ovirt.org/mailman/listinfo/users 
<http://lists.ovirt.org/mailman/listinfo/users>




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users






___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Is it possible to disable qxl video?

2016-07-11 Thread Martin Polednik

On 08/07/16 11:29 +0200, Michal Skrivanek wrote:



On 06 Jul 2016, at 14:06, Francesco Romani  wrote:


From: "Arman Khalatyan" 
To: "users" 
Sent: Monday, July 4, 2016 11:52:24 AM
Subject: [ovirt-users] Is it possible to disable qxl video?


Hi,
I am doing PCI Passthrough for GPUs.
Is it possible somehow to disable/remove default video qxl?
thanks,
Arman,.
Hi,

The 4.0 Vdsm allows you to run a headless VM, meaning a VM without graphic 
device/frontend.
Not sure Engine allows you that however.


no it doesn’t


Even if engine allowed that, it may not be the correct solution.

Running headless with PCI passthrough is considered primary VGA
passthrough[1]. Using primary VGA passthrough without OVMF could cause
(will cause) quite a bit of headaches.

If you really want to try that, I assume using before_vm_start hook to
remove the video device should be enough.

[1] http://wiki.xenproject.org/wiki/Xen_VGA_Passthrough - it's
possible to read about primary and secondary passthrough between the
lines


However, if QXL is the problem (why is that so?) then you can switch to VGA(or 
CIRRUS if this is still 3.6)


I'm afraid you will need to write a Vdsm hook.

There could be simpler solutions depending on the Engine

Bests,

--
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani
___
Users mailing list
Users@ovirt.org 
http://lists.ovirt.org/mailman/listinfo/users 




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] host usb

2016-06-16 Thread Martin Polednik

On 15/06/16 23:39 -0500, Fernando Fuentes wrote:

I am now getting this when I try to start it:


VM methub is down with error. Exit message: Hook Error.

To get the hostusb setup I did:

engine-config -s
"UserDefinedVMProperties=hostusb=^0x[0-9a-fA-F]{4}:0x[0-9a-fA-F]{4}$"
ovirt-engine restart

and the host has the usb hooked installed.
But when I go an add the custom property "hostusb" the vm wont start.

Again this is on oVirt 3.6 Centos 6.5 x86_64
and a host of Centos 7 x86_64

Any ideas?


I'm not sure how hostusb hook and proper hostdev solutions work
together, could assigning the device through the more robust
'hostdev passthrough'[1] feature work for you?

[1] 
http://www.ovirt.org/develop/release-management/features/engine/hostdev-passthrough/

TIA!

Regards,

--
Fernando Fuentes
ffuen...@txweather.org
http://www.txweather.org

On Wed, Jun 15, 2016, at 11:30 PM, Fernando Fuentes wrote:

I got the vm to start but the vm wont see the usb device.

Any idaes?

--
Fernando Fuentes
ffuen...@txweather.org
http://www.txweather.org

On Wed, Jun 15, 2016, at 09:21 PM, Fernando Fuentes wrote:
> After upgrading my ovirt to 3.6 and configuring my host usb passthrough
> again. My vm is unable to start with the following error message:
>
> VM methub is down with error. Exit message: Node device not found: no
> node device with matching name 'usb'
>
> The host is running Centos 7 x86_64
> Any ideas?
>
> Regards,
>
>
> --
> Fernando Fuentes
> ffuen...@txweather.org
> http://www.txweather.org
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Solution for the multiple incompatible GPUs

2016-06-15 Thread Martin Polednik

On 15/06/16 09:53 +0200, Arman Khalatyan wrote:

Hi,
I am looking for some solution with multiple GPUs(FX5600quadro and
TESLA2050)
The drivers are not compatible in the bare metal, Therefore I was trying to
use passthrough as described here:
http://www.ovirt.org/develop/release-management/features/engine/hostdev-passthrough/

After installing the nvidia driver on the guest everything looks nice.
After running 2 or 3 times nvidia-smi to see the GPU status, the device
disappear.
I just tested with both gpus, with different drivers from nvidia, same
situation.

My environment is host and guest-Centos7.2, ovirt 3.6.6 engine(but host has
3.6.7RC due to the fix in passthrough gui)

Are there successful stories with  GPU+Ovirt?


Actually the cards you are using should work pretty well. If I
understand correctly, the device disappears from the guest? That would
most likely be problem in NVIDIA's smi tool or drivers. Still,
supplying VDSM logs (from start to VM's destruction) from the host
could help us debug the issue.


Thanks,
Arman.



***

Dr. Arman Khalatyan  eScience -SuperComputing
Leibniz-Institut für Astrophysik Potsdam (AIP)
An der Sternwarte 16, 14482 Potsdam, Germany

***



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Problem accessing to hosted-engine after wrong network config

2016-06-08 Thread Martin Polednik

On 08/06/16 17:00 +0200, Alexis HAUSER wrote:

Wouldn't there be another way to access console from the hypervisor to the 
hosted-engine (without X) ?


Not really if you don't have network afaik. Have you done the virsh
command with root permissions? 


sudo virsh list
sudo virsh console vm

If list even under root permissions doesn't show anything, make sure
that the qemu process is running.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Problem accessing to hosted-engine after wrong network config

2016-06-08 Thread Martin Polednik

On 08/06/16 11:54 +0200, Alexis HAUSER wrote:

hi,


I made a terrible and stupid mistake : I changed the VLAN of the wrong ovirt 
network interface : ovirtmgmt...

I now don't have anymore access to my hosted engine. I can still access to the 
host hypervisor anyway.

Any idea how I can change the ovirtmgmt VLAN (disabling the option enable VLAN 
tagging at all) without accessing the hosted-engine ?

If there is no way, how can I access the hosted engine console ? I tried with 
remote-viewer and ssh forwarding with no success...
Is there other ways using hosted-engine --console and ssh X forwarding ?


I'm not sure about first part, but it should be accessible from
engine's hypervisor using QEMU console. You can list VMs running on
the host with

$ virsh -r list

and connect to the console 


$ virsh console vm_id


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] video memory in virtual machine

2016-06-08 Thread Martin Polednik

On 08/06/16 09:55 +0800, qinglong.d...@horebdata.cn wrote:

I have found that playing video is not fluent in the virtual machine. So I 
thought maybe too small video memory in virtual machines led to this. Some 
parameters have been found when I was trying to check some information. So I 
wonder where to modify them and if it works to do this.

-device qxl-vga,id=video0,ram_size=67108864,vram_size=8388608,vgamem_mb=16

Anyone can help?


You cannot directly set ram and vgamem, but you can modify vram size 
through vram multiplier.


The defaults are as follows:
vram_size = 8192 * vram multiplier (2)
ram_size = 16384 * 4
vgamem = 16384 * 1

(hopefully got them right)

Modifying osinfo[1] property vramMultiplier allows you to change vram
size.

[1] http://www.ovirt.org/develop/release-management/features/virt/os-info/


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] PCI Passthrough problem

2016-06-07 Thread Martin Polednik

On 07/06/16 16:50 +0200, Jérôme Chapelle wrote:

We are no more able to give a pci device to one VM.
Here is the process we used to assign one device to one VM:
- Click on the VM, and then on the tab "Host devices"
- In the tab, click on "pin to host" and select the host that will give the pci 
device
- Click on "add device", in the window appear all the pci devices: choose the 
pci card you wish (ex. pci__83_00_0 pci__83_00_1) and then click on the gray 
arrow to assign this device to the VM
- Click on ok
- boot the VM.
The problem is that in the window that appears, there is not a single pci 
device listed (there should be many listed).
I checked first: the IOMMU setting is set in the kernel.

Our environment:
We have two HV running CentOs7.
Each of them have three fiber channel cards. First card is connected to a disk 
array, second one to the first tape library and third one to another tape 
library.
We used to give the second card to a VM1, and the third card to another VM2. 
Both VMs ran on one HV or on the other in the past: everything was fine.
What happened:
Today we add to upgrade one of the HV (HV1). Both VMs ran on this HV1. We 
upgraded then restarted the HV1.
Then I edited the second VM2 in order to remove card from HV1. Then I tried to add the 
card from HV2 to this VM2: the list of "host devices" is empty.
I started the VM1: it works fine (I didn't change anything on it).


Hello!

I'm afraid you have hit the bug [1]. For hosts where you need host
devices, the best solution is most likely not upgrading them to 3.6.6
for now.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1341299



--





Jérôme Chapelle
C entre I nformatique N ational de l' E nseignement S upérieur
950 rue de Saint Priest
34 097 M ONTPELLIER Cedex 5

Tél.04 67 14 14 14
eMail   chape...@cines.fr




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] qemu cgroup_controllers

2016-06-06 Thread Martin Polednik

On 06/06/16 16:15 +0300, Дмитрий Глушенок wrote:

So, libvirt behaves differently with custom partition? My assumption was that 
it will perform the same changes. I will have in mind in case oVirt 4 will be 
released too late.
May be I wrote incorrectly - in oVirt 4.0 RC1 scsi pass-through already working.


It should be working.


--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su <http://www.jet.msk.su/>+7-495-411-7601 (ext. 1237)


6 июня 2016 г., в 13:35, Martin Polednik <mpoled...@redhat.com> написал(а):

On 06/06/16 13:26 +0300, Дмитрий Глушенок wrote:

Hello Martin,

Thank you for your time. It is clear how to create partition and assign it to a 
VM. But libvirt manipulates with contents of devices.list and I didn't find a 
way to put my devices into devices.list and stop libvirt from removing them.


That is, by the way, pretty interesting. I have tried it right now and
when using custom partition, libvirt doesn't touch my devices.list.

It might make sense to file a libvirt bug.


Anyway, it looks like that the best solution will be using oVirt 4.0 where scsi 
pass-through have been fixed.


Hoping so!


--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su <http://www.jet.msk.su/>+7-495-411-7601 (ext. 1237)


6 июня 2016 г., в 12:33, Martin Polednik <mpoled...@redhat.com> написал(а):

On 03/06/16 14:05 +0300, Дмитрий Глушенок wrote:

Thank you Martin!

Actually I tried the workaround hook, provided in [2], but then VDSM (oVirt 
3.6.6) tries to interpret hostdev in XML as PCI device, which leads to:

::The vm start process failed
Traceback (most recent call last):
File "/usr/share/vdsm/virt/vm.py", line 703, in _startUnderlyingVm
 self._run()
File "/usr/share/vdsm/virt/vm.py", line 1949, in _run
 self._domDependentInit()
File "/usr/share/vdsm/virt/vm.py", line 1797, in _domDependentInit
 self._getUnderlyingVmDevicesInfo()
File "/usr/share/vdsm/virt/vm.py", line 1738, in _getUnderlyingVmDevicesInfo
 self._getUnderlyingHostDeviceInfo()
File "/usr/share/vdsm/virt/vm.py", line 4277, in _getUnderlyingHostDeviceInfo
 **self._getUnderlyingDeviceAddress(source))
TypeError: pci_address_to_name() got an unexpected keyword argument 'target'

XML part was:














As of creating custom partition - by default machine.slice has "a *:* rwm" in 
devices.list. But for every new VM libvirt removes *:* mask and fills the list with 
actually needed devices (as I understand the process). For example:

c 136:* rw
c 1:3 rw
c 1:7 rw
c 1:5 rw
c 1:8 rw
c 1:9 rw
c 5:2 rw
c 10:232 rw
c 253:0 rw
c 10:228 rw
c 10:196 rw

What I'm looking for is a way to tell libvirt about my additional devices 
without breaking oVirt.


The solution would be creating your own partition and somehow (e.g.
VDSM hook) appending


 /machine/custom


to the libvirt's  element. I'm not sure how feasible creating
your own partition is though. I've tried the process as follows:

$ cat ~/create-partition.sh
# sh ~/create-partition.sh
for i in blkio cpu,cpuacct cpuset devices freezer memory net_cls perf_event
do
 mkdir /sys/fs/cgroup/$i/machine.slice/custom.partition
done

for i in cpuset.cpus cpuset.mems
do
 cat /sys/fs/cgroup/cpuset/machine.slice/$i > 
/sys/fs/cgroup/cpuset/machine.slice/custom.partition/$i
done

(creates /machine/custom partition).
Now, we can create vdsm before_vm_start hook that will set given partition
for the VM:

$ pwd /usr/libexec/vdsm/hooks/before_vm_start
$ cat 10_cgroups

#!/usr/bin/python

import hooking


def custom_partition(domxml):
 resource = domxml.createElement('resource')
 partition = domxml.createElement('partition')
 partition_text = domxml.createTextNode('/machine/custom')
 partition.appendChild(partition_text)
 resource.appendChild(partition)

 return resource

domxml = hooking.read_domxml()
domain = domxml.getElementsByTagName('domain')[0]
domain.appendChild(custom_partition(domxml))
hooking.write_domxml(domxml)


--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su
+7-495-411-7601 (ext. 1237)


3 июня 2016 г., в 12:24, Martin Polednik <mpoled...@redhat.com> написал(а):

On 03/06/16 11:48 +0300, Дмитрий Глушенок wrote:

Hello!

Is it possible to tell libvirt to add specific devices to qemu cgroup? By 
somehow enumerating the devices in XML using a hook for example.
I'm passing scsi-generic disks (/dev/sgX) to VM using qemucmdline hook and it doesn't 
work until I remove "devices" from cgroup_controllers in qemu.conf.


One way to achieve this is creating a hook to generate the scsi device
XML instead of modifying qemu cmdline directly. Libvirt assumes
ownership of all devices created in the XML and therefore adds them to
the machine cgroup.

Example of the XML taken from [1]:











There is slight issue with this approach outlined in [2].

If

Re: [ovirt-users] qemu cgroup_controllers

2016-06-06 Thread Martin Polednik

On 06/06/16 13:26 +0300, Дмитрий Глушенок wrote:

Hello Martin,

Thank you for your time. It is clear how to create partition and assign it to a 
VM. But libvirt manipulates with contents of devices.list and I didn't find a 
way to put my devices into devices.list and stop libvirt from removing them.


That is, by the way, pretty interesting. I have tried it right now and
when using custom partition, libvirt doesn't touch my devices.list.

It might make sense to file a libvirt bug.


Anyway, it looks like that the best solution will be using oVirt 4.0 where scsi 
pass-through have been fixed.


Hoping so!


--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su <http://www.jet.msk.su/>+7-495-411-7601 (ext. 1237)


6 июня 2016 г., в 12:33, Martin Polednik <mpoled...@redhat.com> написал(а):

On 03/06/16 14:05 +0300, Дмитрий Глушенок wrote:

Thank you Martin!

Actually I tried the workaround hook, provided in [2], but then VDSM (oVirt 
3.6.6) tries to interpret hostdev in XML as PCI device, which leads to:

::The vm start process failed
Traceback (most recent call last):
File "/usr/share/vdsm/virt/vm.py", line 703, in _startUnderlyingVm
  self._run()
File "/usr/share/vdsm/virt/vm.py", line 1949, in _run
  self._domDependentInit()
File "/usr/share/vdsm/virt/vm.py", line 1797, in _domDependentInit
  self._getUnderlyingVmDevicesInfo()
File "/usr/share/vdsm/virt/vm.py", line 1738, in _getUnderlyingVmDevicesInfo
  self._getUnderlyingHostDeviceInfo()
File "/usr/share/vdsm/virt/vm.py", line 4277, in _getUnderlyingHostDeviceInfo
  **self._getUnderlyingDeviceAddress(source))
TypeError: pci_address_to_name() got an unexpected keyword argument 'target'

XML part was:














As of creating custom partition - by default machine.slice has "a *:* rwm" in 
devices.list. But for every new VM libvirt removes *:* mask and fills the list with 
actually needed devices (as I understand the process). For example:

c 136:* rw
c 1:3 rw
c 1:7 rw
c 1:5 rw
c 1:8 rw
c 1:9 rw
c 5:2 rw
c 10:232 rw
c 253:0 rw
c 10:228 rw
c 10:196 rw

What I'm looking for is a way to tell libvirt about my additional devices 
without breaking oVirt.


The solution would be creating your own partition and somehow (e.g.
VDSM hook) appending


  /machine/custom


to the libvirt's  element. I'm not sure how feasible creating
your own partition is though. I've tried the process as follows:

$ cat ~/create-partition.sh
# sh ~/create-partition.sh
for i in blkio cpu,cpuacct cpuset devices freezer memory net_cls perf_event
do
  mkdir /sys/fs/cgroup/$i/machine.slice/custom.partition
done

for i in cpuset.cpus cpuset.mems
do
  cat /sys/fs/cgroup/cpuset/machine.slice/$i > 
/sys/fs/cgroup/cpuset/machine.slice/custom.partition/$i
done

(creates /machine/custom partition).
Now, we can create vdsm before_vm_start hook that will set given partition
for the VM:

$ pwd /usr/libexec/vdsm/hooks/before_vm_start
$ cat 10_cgroups

#!/usr/bin/python

import hooking


def custom_partition(domxml):
  resource = domxml.createElement('resource')
  partition = domxml.createElement('partition')
  partition_text = domxml.createTextNode('/machine/custom')
  partition.appendChild(partition_text)
  resource.appendChild(partition)

  return resource

domxml = hooking.read_domxml()
domain = domxml.getElementsByTagName('domain')[0]
domain.appendChild(custom_partition(domxml))
hooking.write_domxml(domxml)


--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su
+7-495-411-7601 (ext. 1237)


3 июня 2016 г., в 12:24, Martin Polednik <mpoled...@redhat.com> написал(а):

On 03/06/16 11:48 +0300, Дмитрий Глушенок wrote:

Hello!

Is it possible to tell libvirt to add specific devices to qemu cgroup? By 
somehow enumerating the devices in XML using a hook for example.
I'm passing scsi-generic disks (/dev/sgX) to VM using qemucmdline hook and it doesn't 
work until I remove "devices" from cgroup_controllers in qemu.conf.


One way to achieve this is creating a hook to generate the scsi device
XML instead of modifying qemu cmdline directly. Libvirt assumes
ownership of all devices created in the XML and therefore adds them to
the machine cgroup.

Example of the XML taken from [1]:

 
 
 
 
 
 
 
 


There is slight issue with this approach outlined in [2].

If you want to keep the qemu approach, I think creating a custom
partition and moving devices there would be the cleanest approach. In
this case, [3] could help but I'm not entirely sure if that would
solve the issue.

[1] https://libvirt.org/formatdomain.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1325485
[3] https://libvirt.org/cgroups.html

--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su
+7-495-411-7601 (ext. 1237)

_

Re: [ovirt-users] qemu cgroup_controllers

2016-06-06 Thread Martin Polednik

On 03/06/16 14:05 +0300, Дмитрий Глушенок wrote:

Thank you Martin!

Actually I tried the workaround hook, provided in [2], but then VDSM (oVirt 
3.6.6) tries to interpret hostdev in XML as PCI device, which leads to:

::The vm start process failed
Traceback (most recent call last):
 File "/usr/share/vdsm/virt/vm.py", line 703, in _startUnderlyingVm
   self._run()
 File "/usr/share/vdsm/virt/vm.py", line 1949, in _run
   self._domDependentInit()
 File "/usr/share/vdsm/virt/vm.py", line 1797, in _domDependentInit
   self._getUnderlyingVmDevicesInfo()
 File "/usr/share/vdsm/virt/vm.py", line 1738, in _getUnderlyingVmDevicesInfo
   self._getUnderlyingHostDeviceInfo()
 File "/usr/share/vdsm/virt/vm.py", line 4277, in _getUnderlyingHostDeviceInfo
   **self._getUnderlyingDeviceAddress(source))
TypeError: pci_address_to_name() got an unexpected keyword argument 'target'

XML part was:














As of creating custom partition - by default machine.slice has "a *:* rwm" in 
devices.list. But for every new VM libvirt removes *:* mask and fills the list with 
actually needed devices (as I understand the process). For example:

c 136:* rw
c 1:3 rw
c 1:7 rw
c 1:5 rw
c 1:8 rw
c 1:9 rw
c 5:2 rw
c 10:232 rw
c 253:0 rw
c 10:228 rw
c 10:196 rw

What I'm looking for is a way to tell libvirt about my additional devices 
without breaking oVirt.


The solution would be creating your own partition and somehow (e.g.
VDSM hook) appending

 
   /machine/custom
 

to the libvirt's  element. I'm not sure how feasible creating
your own partition is though. I've tried the process as follows:

$ cat ~/create-partition.sh
# sh ~/create-partition.sh
for i in blkio cpu,cpuacct cpuset devices freezer memory net_cls perf_event
do
   mkdir /sys/fs/cgroup/$i/machine.slice/custom.partition
done

for i in cpuset.cpus cpuset.mems
do
   cat /sys/fs/cgroup/cpuset/machine.slice/$i > 
/sys/fs/cgroup/cpuset/machine.slice/custom.partition/$i
done

(creates /machine/custom partition).
Now, we can create vdsm before_vm_start hook that will set given partition
for the VM:

$ pwd /usr/libexec/vdsm/hooks/before_vm_start
$ cat 10_cgroups

#!/usr/bin/python

import hooking


def custom_partition(domxml):
   resource = domxml.createElement('resource')
   partition = domxml.createElement('partition')
   partition_text = domxml.createTextNode('/machine/custom')
   partition.appendChild(partition_text)
   resource.appendChild(partition)

   return resource

domxml = hooking.read_domxml()
domain = domxml.getElementsByTagName('domain')[0]
domain.appendChild(custom_partition(domxml))
hooking.write_domxml(domxml)


--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su
+7-495-411-7601 (ext. 1237)


3 июня 2016 г., в 12:24, Martin Polednik <mpoled...@redhat.com> написал(а):

On 03/06/16 11:48 +0300, Дмитрий Глушенок wrote:

Hello!

Is it possible to tell libvirt to add specific devices to qemu cgroup? By 
somehow enumerating the devices in XML using a hook for example.
I'm passing scsi-generic disks (/dev/sgX) to VM using qemucmdline hook and it doesn't 
work until I remove "devices" from cgroup_controllers in qemu.conf.


One way to achieve this is creating a hook to generate the scsi device
XML instead of modifying qemu cmdline directly. Libvirt assumes
ownership of all devices created in the XML and therefore adds them to
the machine cgroup.

Example of the XML taken from [1]:

  
  
  
  
  
  
  
  


There is slight issue with this approach outlined in [2].

If you want to keep the qemu approach, I think creating a custom
partition and moving devices there would be the cleanest approach. In
this case, [3] could help but I'm not entirely sure if that would
solve the issue.

[1] https://libvirt.org/formatdomain.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1325485
[3] https://libvirt.org/cgroups.html

--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su
+7-495-411-7601 (ext. 1237)

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] qemu cgroup_controllers

2016-06-03 Thread Martin Polednik

On 03/06/16 11:48 +0300, Дмитрий Глушенок wrote:

Hello!

Is it possible to tell libvirt to add specific devices to qemu cgroup? By 
somehow enumerating the devices in XML using a hook for example.
I'm passing scsi-generic disks (/dev/sgX) to VM using qemucmdline hook and it doesn't 
work until I remove "devices" from cgroup_controllers in qemu.conf.


One way to achieve this is creating a hook to generate the scsi device
XML instead of modifying qemu cmdline directly. Libvirt assumes
ownership of all devices created in the XML and therefore adds them to
the machine cgroup.

Example of the XML taken from [1]:

   
   
   
   
   
   
   
   


There is slight issue with this approach outlined in [2].

If you want to keep the qemu approach, I think creating a custom
partition and moving devices there would be the cleanest approach. In
this case, [3] could help but I'm not entirely sure if that would
solve the issue.

[1] https://libvirt.org/formatdomain.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1325485
[3] https://libvirt.org/cgroups.html

--
Dmitry Glushenok
Jet Infosystems
http://www.jet.msk.su
+7-495-411-7601 (ext. 1237)

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Changing Cluster CPU Type in a single Host with Hosted Engine environment

2016-05-26 Thread Martin Polednik

On 26/05/16 13:01 +, Ralf Braendli wrote:

Hi

Thanks a lot for you help.
Just to be sure.
The Database would be the Datebase on the HostedEngine right ?


Right.


After this operation should it work directly or is a restart required ?


You should most likely restart the machine (to avoid hitting cached
values).


And for the Bug report this should be done here 
https://bugzilla.redhat.com/enter_bug.cgi?classification=oVirt ?


Yes (ovirt-engine, virt team).


Best Regards

Ralf Brändli


Am 26.05.2016 um 14:42 schrieb Martin Polednik <mpoled...@redhat.com>:

On 26/05/16 07:12 +, Ralf Braendli wrote:

Hi

I have the Problem that I selected the wrong CPU Type throw the setup process.
Is it posible to change it without an new installation ?


Hi!

I'm afraid this may not be possible using "regular" approach. You
could do this by directly changing the cpu type in database, but this
is not supported operation.

Just an example what would I do in this case (but proceed carefully
before changing anything in the DB):

$ su - postgres -c "psql -t engine -c \"SELECT
split_part(trim(regexp_split_to_table(option_value, ';')), ':', 2)
FROM vdc_options WHERE option_name = 'ServerCPUList' AND version =
'3.5';\""

gives you a nice list of supported cpu names (the database name must
be exact, so it's better to paste from that list.

Intel Conroe Family
Intel Penryn Family
Intel Nehalem Family
Intel Westmere Family
Intel SandyBridge Family
Intel Haswell-noTSX Family
Intel Haswell Family
Intel Broadwell-noTSX Family
Intel Broadwell Family
AMD Opteron G1
AMD Opteron G2
AMD Opteron G3
AMD Opteron G4
AMD Opteron G5
IBM POWER8

Then you can update the cluster directly:

$ su - postgres -c "psql -t engine -c \"UPDATE cluster SET cpu_name =
'YOUR CPU NAME' WHERE name = 'YOUR CLUSTER NAME';\""

('YOUR CPU NAME' and 'YOUR CLUSTER NAME' must of course correspond to
the cpu name from the list above and the name of the cluster
respectively)

Also, could you open a bug on this? I think we should be able to do
change the CPU type without all this.

Thanks,
mpolednik


We have a single Host with a Hosted Engine installed.
With this installation I can’t put the Host into Maintenance Mode because the 
Hosted Engine will run on this Host.

The Version we us is 3.5.5-1

Best Regards

Ralf Brändli
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Changing Cluster CPU Type in a single Host with Hosted Engine environment

2016-05-26 Thread Martin Polednik

On 26/05/16 07:12 +, Ralf Braendli wrote:

Hi

I have the Problem that I selected the wrong CPU Type throw the setup process.
Is it posible to change it without an new installation ?


Hi!

I'm afraid this may not be possible using "regular" approach. You
could do this by directly changing the cpu type in database, but this
is not supported operation.

Just an example what would I do in this case (but proceed carefully
before changing anything in the DB):

$ su - postgres -c "psql -t engine -c \"SELECT
split_part(trim(regexp_split_to_table(option_value, ';')), ':', 2)
FROM vdc_options WHERE option_name = 'ServerCPUList' AND version =
'3.5';\""

gives you a nice list of supported cpu names (the database name must
be exact, so it's better to paste from that list.

Intel Conroe Family
Intel Penryn Family
Intel Nehalem Family
Intel Westmere Family
Intel SandyBridge Family
Intel Haswell-noTSX Family
Intel Haswell Family
Intel Broadwell-noTSX Family
Intel Broadwell Family
AMD Opteron G1
AMD Opteron G2
AMD Opteron G3
AMD Opteron G4
AMD Opteron G5
IBM POWER8

Then you can update the cluster directly:

$ su - postgres -c "psql -t engine -c \"UPDATE cluster SET cpu_name =
'YOUR CPU NAME' WHERE name = 'YOUR CLUSTER NAME';\""

('YOUR CPU NAME' and 'YOUR CLUSTER NAME' must of course correspond to
the cpu name from the list above and the name of the cluster
respectively)

Also, could you open a bug on this? I think we should be able to do
change the CPU type without all this.

Thanks,
mpolednik


We have a single Host with a Hosted Engine installed.
With this installation I can’t put the Host into Maintenance Mode because the 
Hosted Engine will run on this Host.

The Version we us is 3.5.5-1

Best Regards

Ralf Brändli
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] USB

2016-05-15 Thread Martin Polednik


- Original Message -
> From: "Nisim Simsolo" 
> To: biholc...@l1049h.com
> Cc: users@ovirt.org
> Sent: Sunday, May 15, 2016 1:40:07 PM
> Subject: Re: [ovirt-users] USB
> 
> Hi
> 
> You can attach host device directly from virtual machines tab -> select VM
> -> host devices sub tab -> "add device" button.
> 
> But first you need to verify your BIOS is supporting intel VT-d or AMD vi.
> And you also need to activate it in the kernel. The next link describes how
> to do it:
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/chap-Guest_virtual_machine_device_configuration.html#sect-Guest_virtual_machine_device_configuration-PCI_devices
> 
> note: Instead of adding "intel_iommu=pt" in the grub cmdline, add
> "intel_iommu=on" or "amd_iommu=on".
> 
> Another thing worth mentioning, USB hotplug is not supported yet, so if
> your programmable device is resetting the USB connection each time you
> program it, the USB will be detached from the VM and you will have to
> attach it again in order to see it.

USB passthrough does not require IOMMU, only PCI devices do. The docs need
improvement in that regard.
 
> On Sun, May 15, 2016 at 8:34 AM, Brett I. Holcomb 
> wrote:
> 
> > How do I get a VM to see USB devices?  If I understand it correctly I
> > have to go to Edit VM -> Console and enable USB native.  I have the
> > console options set to use usb.  However, I'm finding conflicting
> > information.  Supposedly libvirt will allow sharing of a USB device
> > over a network but to start with I'd be happy just being able to
> > connect a usb device to the host and having it detected.  I have some
> > programmable devices I'd like to program in Linux using my VM.
> >
> > Has anyone uses usbip and if so how well does  it work?
> >
> >
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> >
> 
> 
> 
> --
> Nisim Simsolo
> QE -Testing Engineer
> IRC: nsimsolo
> int phone - 8272305
> mobile - 054-4779934
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] restore-nets failing (was: Fresh install failing (Hosted Engine))

2016-03-07 Thread Martin Polednik

On 07/03/16 11:09 -0500, Jonathan Sherman wrote:

Thanks for your time on this Dan!

The output from the hostdev looks like it may be unparseable, so I'm hoping
this is the issue (and that it can be easily remedied).

I've also create a log of the other items you asked for, available at:
https://www.dropbox.com/s/qh0yw1ptpivpatm/typescript?dl=0

[root@ovirt01 vdsm]# vdsm-tool restore-nets

 computer
 
   �
   
 �
 �
 �
 d6a3e3c1-c5cb-42e9-a54c-ff8d0df91722
   
   
 Intel Corp.
 FYBYT10H.86A.0052.2015.0923.1845
 09/23/2015
   
 



That seems to be the issue. Even bigger issue is that we can
not skip this device easily, as it is the root of device tree and must
be present in database.

I can think of logging the exception but letting the call go through
and create a hook to fake a (minimal) device tree. Dan, what do you think?

mpolednik


Traceback (most recent call last):
 File "/usr/share/vdsm/vdsm-restore-net-config", line 429, in 
   restore(args)
 File "/usr/share/vdsm/vdsm-restore-net-config", line 387, in restore
   _restore_sriov_numvfs()
 File "/usr/share/vdsm/vdsm-restore-net-config", line 82, in
_restore_sriov_numvfs
   sriov_devices = _get_sriov_devices()
 File "/usr/share/vdsm/vdsm-restore-net-config", line 54, in
_get_sriov_devices
   devices = hostdev.list_by_caps()
 File "/usr/share/vdsm/hostdev.py", line 177, in list_by_caps
   libvirt_devices = _get_devices_from_libvirt()
 File "/usr/share/vdsm/hostdev.py", line 162, in _get_devices_from_libvirt
   for device in libvirtconnection.get().listAllDevices(0))
 File "/usr/share/vdsm/hostdev.py", line 162, in 
   for device in libvirtconnection.get().listAllDevices(0))
 File "/usr/share/vdsm/hostdev.py", line 109, in _parse_device_params
   devXML = etree.fromstring(device_xml)
 File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1300, in XML
   parser.feed(text)
 File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
   self._raiseerror(v)
 File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in
_raiseerror
   raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 4,
column 13
Traceback (most recent call last):
 File "/bin/vdsm-tool", line 219, in main
   return tool_command[cmd]["command"](*args)
 File "/usr/lib/python2.7/site-packages/vdsm/tool/restore_nets.py", line
41, in restore_command
   exec_restore(cmd)
 File "/usr/lib/python2.7/site-packages/vdsm/tool/restore_nets.py", line
54, in exec_restore
   raise EnvironmentError('Failed to restore the persisted networks')
EnvironmentError: Failed to restore the persisted networks

On Mon, Mar 7, 2016 at 10:37 AM, Dan Kenigsberg  wrote:


On Mon, Mar 07, 2016 at 03:16:06PM +0200, Yedidyah Bar David wrote:
> On Mon, Mar 7, 2016 at 3:01 PM, Jonathan Sherman 
wrote:
> > Didi -
> >
> > The vdsmd service error is what led me to the vdsm-tool restore-nets
> > concern.  See the chain of errors below (along with the other details
you
> > requested.)
>
> Thanks.
>
> Changing subject and adding Dan.

> >
> > [root@ovirt01 log]# vdsm-tool restore-nets
> > Traceback (most recent call last):
> >   File "/usr/share/vdsm/vdsm-restore-net-config", line 429, in 
> > restore(args)
> >   File "/usr/share/vdsm/vdsm-restore-net-config", line 387, in restore
> > _restore_sriov_numvfs()
> >   File "/usr/share/vdsm/vdsm-restore-net-config", line 82, in
> > _restore_sriov_numvfs
> > sriov_devices = _get_sriov_devices()
> >   File "/usr/share/vdsm/vdsm-restore-net-config", line 54, in
> > _get_sriov_devices
> > devices = hostdev.list_by_caps()
> >   File "/usr/share/vdsm/hostdev.py", line 175, in list_by_caps
> > libvirt_devices = _get_devices_from_libvirt()
> >   File "/usr/share/vdsm/hostdev.py", line 160, in
_get_devices_from_libvirt
> > for device in libvirtconnection.get().listAllDevices(0))
> >   File "/usr/share/vdsm/hostdev.py", line 160, in 
> > for device in libvirtconnection.get().listAllDevices(0))
> >   File "/usr/share/vdsm/hostdev.py", line 107, in _parse_device_params
> > devXML = etree.fromstring(device_xml)
> >   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1300, in
XML
> > parser.feed(text)
> >   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in
feed
> > self._raiseerror(v)
> >   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in
> > _raiseerror
> > raise err
> > xml.etree.ElementTree.ParseError: not well-formed (invalid token):
line 4,
> > column 13
> > Traceback (most recent call last):
> >   File "/bin/vdsm-tool", line 219, in main
> > return tool_command[cmd]["command"](*args)
> >   File "/usr/lib/python2.7/site-packages/vdsm/tool/restore_nets.py",
line
> > 41, in restore_command
> > exec_restore(cmd)
> >   File 

Re: [ovirt-users] Mixing CPU types

2016-02-03 Thread Martin Polednik


- Original Message -
> From: "Matthew Trent" 
> To: "Yaniv Kaul" 
> Cc: users@ovirt.org
> Sent: Wednesday, February 3, 2016 8:10:35 PM
> Subject: Re: [ovirt-users] Mixing CPU types
> 
> ?Actually it works great! It's been supported by KVM for a while now. I had
> one Proxmox cluster with a mix of AMD and Intel and migrated KVM VM's
> between them frequently. OpenStack (KVM) and VMWare support this as well.
> 
> 
> The trick is to expose a virtual CPU with a common set of features to the
> VMs. KVM handles the rest. From the KVM FAQ:
> 
> http://www.linux-kvm.org/page/FAQ#Does_KVM_support_live_migration_from_an_AMD_host_to_an_Intel_host_and_back.3F

That is pretty much what libvirt does. The sandy-bridge, haswell and other
cpu's that we expose are not really a CPUs, but sets of flags (called
baseline CPUs in libvirt's terminology).

Afaik there should be no issue running cluster with both CPU vendors,
the problem is lack of testing on devel side as we mostly run
single vendor clusters everywhere.
 
> "Does KVM support live migration from an AMD host to an Intel host and back?
> 
> 
> Yes. There may be issues on 32-bit Intel hosts which don't support NX (or
> XD), but for 64-bit hosts back and forth migration should work well.
> Migration of 32-bit guests should work between 32-bit hosts and 64-bit
> hosts. If one of your hosts does not support NX, you may consider disabling
> NX when starting the guest on a NX-capable system. You can do it by passing
> "-cpu qemu64,-nx" parameter to the guest."
> 
> --
> Matthew Trent
> Network Engineer
> Lewis County IT Services
> 360.740.1247 - Helpdesk
> 360.740.3343 - Direct line
> 
> From: Yaniv Kaul 
> Sent: Tuesday, February 2, 2016 2:17 PM
> To: Matthew Trent
> Cc: users@ovirt.org
> Subject: Re: [ovirt-users] Mixing CPU types
> 
> 
> 
> On Mon, Feb 1, 2016 at 9:13 PM, Matthew Trent
> >
> wrote:
> Though our new oVirt setup is better in most ways, cross-CPU-type migration
> is one of the features I miss from Proxmox. KVM supports mixed-CPU migration
> for a while now, even between AMD and Intel.
> 
> http://www.linux-kvm.org/page/Migration
> 
> I highly doubt the above works in real life scenarios.
> Y.
> 
> 
> 
> I'm using a bunch of re-purposed servers with a mix of AMD and Intel. I
> separate them into clusters, as noted, but it sure would be nice to be able
> to live migrate between them. :)
> 
> --
> Matthew Trent
> Network Engineer
> Lewis County IT Services
> 
> > Hi Rene,
> >
> > Thank you very much for coming back to me.
> >
> > That's perfect then and answers my questions exactly.
> >
> > Much appreciated.
> >
> > Regards.
> >
> >Neil Wilson.
> >
> >
> >On Wed, Jan 27, 2016 at 1:57 PM, René Koch  >rk-it.at> wrote:
> >>
> >> Hi Neil,
> >>
> >> You can mix cpu types (but not AMD and Intel) if you leave the cluster
> >> level at the lowest cpu level.
> >> I personally don't mix cpu levels if possible, but instead create own
> >> clusters for each cpu type in order to be able to use the newest cpu
> >> features...
> >>
> >>
> >> Regards,
> >> René
> >>
> >>
> >> On 01/27/2016 12:53 PM, Neil wrote:
> >>
> >> Hi guys,
> >>
> >> I currently have an oVirt 3.5 cluster with Sandy Bridge Xeon CPU's, and I
> >> need to add a new host for more RAM and vCPU's, however the new Xeon e5
> >> cpu's are Haswell based.
> >>
> >> Can I mix CPU types (Haswell and Sandy Bridge) in my cluster and will I be
> >> able to migrate between my hosts?
> >>
> >> I'm guessing that for this to work I'll need to leave my "CPU type" set to
> >> Sandy Bridge, will the Haswell based CPU be compatible with my cluster,
> >> but
> >> just run without any Haswell type features?
> >>
> >> Apologies if this is a dumb question or if it's been answered before.
> >>
> >> Thank you.
> >>
> >> Regards.
> >>
> >> Neil Wilson
> >>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Nested KVM - vdsm-hook-nestedvt

2016-01-04 Thread Martin Polednik

On 04/01/16 09:52 +0100, Simone Tiraboschi wrote:

On Fri, Jan 1, 2016 at 3:32 PM, Winfried de Heiden  wrote:


Hi all and happy new year!

I'm running oVirt 3.6 on EL7.

In order to test nested-kvm I installed vdsm-hook-nestedvt on the
hypervisor and put "fake_kvm_support = true" in /etc/vdsm/vdsm.conf.





fake_kvm_support is just for developing purposes and it's not needed as it
prevent guests to run.


Not really true - fake_kvm_support enables QEMU emulation instead of
hardware virtualization (e.g. VT-x) instructions. It is also quite
broken in it's current state and fix is pending in cpuinfo branch at
gerrit.

I don't really understand the reason why fake_kvm would be used in
this case as AMD-v is enabled according to svm flag present -
following instructions should be correct for getting the flag passed
to the VMs.


Please check to understand if nested support is enabled on your host:
/sys/module/kvm_intel/parameters/nested

if not
  echo "options kvm-intel nested=1" > /etc/modprobe.d/kvm-intel.conf
and reload the module



Than install vdsm-hook-nestedvt on your hosts.
If you want also to use the network on your L2 guest please install and
configure also macspoof vdsm hook on your physical hosts otherwise all the
traffic to/from your L2 guests will be dropped.
https://github.com/oVirt/vdsm/tree/master/vdsm_hooks/macspoof





However, afterwards the hypervisor host cannot connect to the ovirt
Manager, on ovirt Manager the engine.log will tell:

2016-01-01 15:21:42,105 WARN
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
(DefaultQuartzScheduler_Worker-76) [71d1638c] Correlation ID: 29daf92c,
Call Stack: null, Custom Event ID: -1, Message: Host bigvirt moved to
Non-Operational state as host does not meet the cluster's minimum CPU
level. Missing CPU features : model_Opteron_G3

After removing the option all works well again, but I'ḿ lacking the nested
kvm option :( Is nested kvm only supported on a limited cpu's??

Winny

Information from /proc/cpuinfo:

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model   : 10
model name  : AMD Phenom(tm) II X6 1055T Processor
stepping: 0
microcode   : 0x1bf
cpu MHz : 2800.000
cache size  : 512 KB
physical id : 0
siblings: 6
core id : 0
cpu cores   : 6
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 6
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt
pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc
extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm
extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt
cpb hw_pstate npt lbrv svm_lock nrip_save pausefilter
bogomips: 5625.54
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate cpb

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Nested KVM - vdsm-hook-nestedvt

2016-01-04 Thread Martin Polednik


- Original Message -
> From: "Martin Polednik" <mpoled...@redhat.com>
> To: w...@dds.nl
> Cc: "users" <users@ovirt.org>, "Martin Polednik" <mpoled...@redhat.com>
> Sent: Monday, January 4, 2016 2:52:03 PM
> Subject: Re: [ovirt-users] Nested KVM - vdsm-hook-nestedvt
> 
> On 04/01/16 14:38 +0100, w...@dds.nl wrote:
> >Hi all,
> >
> >OK, it seems I am confused. Nested KVM is NOT the same as fake KVM
> >
> >If so, I installed vdsm-hook-nestedvt on the hypervisor (only). Trying
> >to run ovirt-Node on a VM it complains there 's no virtualization,
> >despite the kvm_amd module is loaded with nested=1
> >
> >How to enable nested-kvm for oVirt 3.6?
> 
> First, make sure that you're enabling the nested feature for amd (just
> noticed that the example used intel). Please show us the output of
> 
> # cat /sys/module/kvm_intel/parameters/nested

and sorry, did the same mistake again - use

# cat /sys/module/kvm_amd/parameters/nested

> on the host (physical machine), lscpu inside the VM and VM XML - use
> 
> # virsh -r list
> # virsh -r dumpxml {machine_id found in the list}
> 
> Thanks,
> mpolednik
> 
> >Winny
> >
> >
> >Martin Polednik schreef op 04-01-2016 13:29:
> >>On 04/01/16 09:52 +0100, Simone Tiraboschi wrote:
> >>>On Fri, Jan 1, 2016 at 3:32 PM, Winfried de Heiden <w...@dds.nl> wrote:
> >>>
> >>>>Hi all and happy new year!
> >>>>
> >>>>I'm running oVirt 3.6 on EL7.
> >>>>
> >>>>In order to test nested-kvm I installed vdsm-hook-nestedvt on the
> >>>>hypervisor and put "fake_kvm_support = true" in /etc/vdsm/vdsm.conf.
> >>>
> >>>
> >>>
> >>>
> >>>fake_kvm_support is just for developing purposes and it's not
> >>>needed as it
> >>>prevent guests to run.
> >>
> >>Not really true - fake_kvm_support enables QEMU emulation instead of
> >>hardware virtualization (e.g. VT-x) instructions. It is also quite
> >>broken in it's current state and fix is pending in cpuinfo branch at
> >>gerrit.
> >>
> >>I don't really understand the reason why fake_kvm would be used in
> >>this case as AMD-v is enabled according to svm flag present -
> >>following instructions should be correct for getting the flag passed
> >>to the VMs.
> >>
> >>>Please check to understand if nested support is enabled on your host:
> >>>/sys/module/kvm_intel/parameters/nested
> >>>
> >>>if not
> >>>  echo "options kvm-intel nested=1" > /etc/modprobe.d/kvm-intel.conf
> >>>and reload the module
> >>
> >>>Than install vdsm-hook-nestedvt on your hosts.
> >>>If you want also to use the network on your L2 guest please
> >>>install and
> >>>configure also macspoof vdsm hook on your physical hosts otherwise
> >>>all the
> >>>traffic to/from your L2 guests will be dropped.
> >>>https://github.com/oVirt/vdsm/tree/master/vdsm_hooks/macspoof
> >>>
> >>>
> >>>
> >>>
> >>>>However, afterwards the hypervisor host cannot connect to the ovirt
> >>>>Manager, on ovirt Manager the engine.log will tell:
> >>>>
> >>>>2016-01-01 15:21:42,105 WARN
> >>>>[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
> >>>>(DefaultQuartzScheduler_Worker-76) [71d1638c] Correlation ID:
> >>>>29daf92c,
> >>>>Call Stack: null, Custom Event ID: -1, Message: Host bigvirt moved to
> >>>>Non-Operational state as host does not meet the cluster's minimum CPU
> >>>>level. Missing CPU features : model_Opteron_G3
> >>>>
> >>>>After removing the option all works well again, but I'ḿ lacking
> >>>>the nested
> >>>>kvm option :( Is nested kvm only supported on a limited cpu's??
> >>>>
> >>>>Winny
> >>>>
> >>>>Information from /proc/cpuinfo:
> >>>>
> >>>>processor   : 0
> >>>>vendor_id   : AuthenticAMD
> >>>>cpu family  : 16
> >>>>model   : 10
> >>>>model name  : AMD Phenom(tm) II X6 1055T Processor
> >>>>stepping: 0
> >>>>microcode   : 0x1bf
> >>>>cpu MHz : 2800.000
> >>>>cache size  : 

Re: [ovirt-users] upgrade from 3.5 to 3.6 causing problems with migration

2015-11-13 Thread Martin Polednik

On 09/11/15 14:00 -0500, Jason Keltz wrote:

Hi Shmuel,

Thanks very much for looking into my problem!

I installed 3.6 on the engine.  I rebooted the engine.
The 3 hosts were still running vdsm from 3.5.  I checked back in the 
yum log, and it was 4.16.26-0.el7.
On the first host upgrade (virt1), I made a mistake.  After bringing 
in the 3.6 repo, I upgraded the packages with just "yum update". 
However, I know that I should have put the host into maintenance mode 
first.  After the updates installed, I put the host into maintenance 
mode, and it migrated the VMs off, during which I saw more than one 
failed VM migration.
I'm willing to accept the failures there because I should have put the 
host into maintenance mode first.  Live and learn!
I had two other hosts to do this right.  For virt2, and virt3, I put 
the hosts into maintenance mode first.  However, the same problem 
occurred with failed migrations.  I proceeded anyway, brought the 
failed VMs back up elsewhere, applied the updates, and rebooted the 
hosts.
So now, 3.6 is installed on the engine and the 3 hosts, and they are 
all rebooted.
I tried another migration, and again, there were failures, so this 
isn't specifically related to just 3.6.
By the way, I'm using ovirtmgmt for migrations.  virt1, virt2, and 
virt3 have a dedicated 10G link via Intel X540 to a 10G switch. engine 
is on that network as well, but it's a 1G link.
I was able to run iperf tests between the nodes, and saw nearly 10G 
speed.  During the failed migrations, I also don't have any problem 
with ovirtmgmt, so I don't think the network is an issue...


I found this bug in bugzilla over the weekend:

https://bugzilla.redhat.com/show_bug.cgi?id=1142776

I was nearly positive that this had something to do with the failed 
migrations.  As a final test, I decided to migrate the VMs from one 
host to another, one at a time.  I was nearly done migrating all the 
VMs from virt3 to virt1.   I had migrated 5 VMs all successfully, one 
at a time, without any failures.  When I migrated the 6th, boom - it 
didn't migrate, and the VM was down.  It was a pretty basic VM as 
well, with very little traffic.


I included on the bug report above an additional link with the engine, 
virt1, virt2, and virt3 logs for Saturday where I was doing this 
experimentation because there's a couple more failures recorded.  I'll 
include that link here:


http://www.eecs.yorku.ca/~jas/ovirt-debug/11072015

The last VM that I attempted to transfer one at a time was "webapp".  
It was transferred from virt3 to virt1.


I'm really puzzled that more people haven't experienced this issue.   
I've disabled the load balancing feature because I'm really concerned 
that if it load balances my VMs, then they might not come back up!  I 
don't *think* this was happening when I was all purely 3.5, but I 
can't remember doing big migrations.  I most certainly was able to put 
a host into maintenance mode without having VMs go down!


In another email, Dan Kenisberg says that "It seems that 3.6's 
vdsm-4.17.10.1 cannot consume a Random Number Generator device that 
was created on 3.5.".  Thanks also to Dan for looking into that as 
well!   I'm still waiting for more details though before opening 
additional bug reports because this puzzles me... if this were the 
case, then ALL of the VMs were created on 3.5, and ALL with random 
number generator device, and all would fail migration, but they don't.   
I have a feeling that there are a few issues at play here.


Hello and sorry for dropping in so late.

The issue is that 3.5 engine created RNG device without sending the
device key (which should've been 'rng' but it wasn't properly
documented in the API as fixed in [1]). This caused the
getUnderlyingRngDevice method to fail matching the device (fixed in
[2]) and it would therefore be treated as unknown device (where the
notion of 'source' isn't known). 3.6 engine should handle it correctly
[3].

The implication is that when VM is created in 3.5 environment and
moved to 3.6 environment, the matching will work but there will be 2
RNG devices for the single one. Same goes for migration.

I'm not sure about the fix yet, to rescue the 3.6 VM we would have to
remove the duplicate device without specParams (meaning that address
would be lost) or remove the original device but adding it's
specParams to the new device. A temporary fix would be creating a hook
that does this.

[1] https://gerrit.ovirt.org/#/c/43166/
[2] https://gerrit.ovirt.org/#/c/40095/
[3] https://gerrit.ovirt.org/#/c/43165/

Regards,
mpolednik


Jason.

On 11/09/2015 11:13 AM, Shmuel Melamud wrote:

Hi!

I'm trying to reproduce your issue. Can you help me with the exact 
scenario?


1. You had 3.5 running. What version of VDSM was on the hosts?
2. You replaced the engine and restarted it. Now it is 3.6, right?
3. You put a host into maintenance. Failure occured when VMs were 
migrating from it? Or you put the host into maintenance, replaced 
VDSM on it and 

Re: [ovirt-users] Directly connect NIC or other cards to VM?

2015-02-16 Thread Martin Polednik


- Original Message -
 From: Lior Vernia lver...@redhat.com
 To: David Smith dsm...@mypchelp.com
 Cc: users users@ovirt.org, Martin Polednik mpole...@redhat.com
 Sent: Monday, February 16, 2015 9:15:41 AM
 Subject: Re: [ovirt-users] Directly connect NIC or other cards to VM?
 
 Hi David,
 
 On 13/02/15 01:28, David Smith wrote:
  Is there a way to directly connect a specific device (ie, NIC) to a
  particular VM?
  
  I've figured out how to map a specific network interface to a VM, thats
  one step, but in the end I may need direct access to the PCI device itself.
 
 I think this 3.6 feature might do exactly what you want:
 http://www.ovirt.org/Features/hostdev_passthrough
 
 It's gonna be a while before 3.6 is out, but once the feature is merged
 it'll be available if you install the nightly snapshot. CCing Martin
 Polednik, the feature owner.

Hello,

just on the status of the feature (as it's exactly what you require - direct
pci device attachment) - the host side is hopefully ~week away from being
ready, the UI side will take longer though - if you wanted, you could probably
run nightly and spawn the VM yourself and treat is as external VM. CCing Martin
Betak, who is the one to blame for the UI :)

You also need RHEL 7 (ideal support will be in 7.1) and I suggest reading
the chapter on IOMMU groups, as you might need to block (detach from host)
other devices than the nic in order to get it passed through.

  
  Second to that, for network interfaces mapped to a particular VM, is
  there a way for the VM to be able to properly detect physical link state
  of that interface? Right now that's a 'configurable option' inside
  network interface settings on the VM in the manager (ie, plugged, not
  plugged, and link state up /down)
 
 If I'm not mistaken, once you have direct access to the PCI device
 you'll be able to query for its actual state using e.g. ethtool.
 
  
  Thanks,
  David
  
  
  ___
  Users mailing list
  Users@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/users
  
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] When will ovirt add GPU/vGPU support in the admin portal ?

2015-01-19 Thread Martin Polednik


- Original Message -
 From: Daniel Helgenberger daniel.helgenber...@m-box.de
 To: Martin Polednik mpoled...@redhat.com, Jorick Astrego 
 j.astr...@netbulae.eu
 Cc: users@ovirt.org
 Sent: Monday, January 19, 2015 3:45:01 PM
 Subject: Re: [ovirt-users] When will ovirt add GPU/vGPU support in the admin 
 portal ?
 
 
 
 On 19.01.2015 12:24, Martin Polednik wrote:
 
 
  - Original Message -
  From: Jorick Astrego j.astr...@netbulae.eu
  To: users@ovirt.org
  Sent: Monday, January 19, 2015 10:14:35 AM
  Subject: Re: [ovirt-users] When will ovirt add GPU/vGPU support in the
  admin portal ?
 
 
  On 01/19/2015 02:33 AM, lof yer wrote:
 
  Since I recently saw cloudstack have add this(
  https://cwiki.apache.org/confluence/display/CLOUDSTACK/GPU+and+vGPU+support+for+CloudStack+Guest+VMs
  ).
  And iGVT(
  https://01.org/zh/xen/blogs/wangbo85/2014/intel-gvt-gxengt-pubic-release?langredirect=1)
  is released.
  If ovirt add this, it'll be very competitive for ovirt in VDI platforms.
 
  See below the response I got about 1 year ago, I don't know the current
  plans/status...
 
   Forwarded Message 
  Subject:  Re: [Spice-devel] [Users] desktop virtualization and GPU
  support
  Date: Wed, 16 Oct 2013 14:08:47 +0200
  From: David Jaša dj...@redhat.com
  Reply-To: spice-de...@lists.freedesktop.org, users 
  users@ovirt.org
  CC:   spice-de...@lists.freedesktop.org, users users@ovirt.org
 
 
 
  Hi,
 
  I'm afraid that none of these cards will work. IIRC it was explained for
  nVidia approach that it would be necessary to add their closed-source
  code to qemu which is not going to happen.
  You might have better luck with AMD card passthrough approach but I'm
  not sure if GPUs can be passed through qemu/kvm and if so, how the
  GPU-rendered image then gets displayed. So YMMV and don't expect much.
 
  There is a WIP effort for qemu though that is hardware vendor agnostic -
  it's based on creation of virtual GPU in qemu called Virgil that passes
  3D drawing commands to GPU on host. The project is in initial stage
  though so it won't be ready even for testing for quite some time. FWIW,
  there has been discussion about it on spice-devel in recent days and it
  will be presented on upcoming KVM forum so you can get pretty clear
  picture about its status from these sources.
 
  HTH,
 
  David
 
  Hello,
 
  There is quite active effort to implement device passthrough (including
  GPU,
  nics, usb etc.)[1].Physical GPU passthrough can be considered generic PCI
  passthrough
 IMHO not quite in case of GPUs. I tested that recently with a
 combination of EL7's new default VFIO support [1]. Two things could be
 concluded working with Windows 7 guests and ATI Fire Pro GPUs:
 - 'Old' PCI passthough unstable
 - VFIO working and performing better (tested with Cinebench OpenGL [2],
 about 98% of the bare metal performance)

I'm sorry, let me correct myself a bit: the legacy PCI-stub is not really
supported at all, it's VFIO only (so generic PCI was meant as generic
VFIO). What is not currently supported and will not be in a reasonable 
time frame is gVirt or overall intel GVT. 

 As for the stability, the results with VFIO where better in this case.
 The tricky part seems to be the driver installation in the guest, there
 the mandatory device probe in the installer. While PCI passthough
 resulted in Blue Screens, VFIO went though.
 
 [1]
 https://access.redhat.com/sites/default/files/pages/attachments/rhel_whatsnewrhel7beta_techoverview_.pdf
 [2] http://www.maxon.net/products/cinebench/overview.html
 
 
 which should be ready for oVirt 3.6. As for the vGPU, that will
  depend on technology used - SR-IOV would be supported along PCI
  passthrough,
  anything else might need additional work on our side.
 
  [1] http://www.ovirt.org/Features/hostdev_passthrough
 
  mpolednik
 
  Met vriendelijke groet, With kind regards,
 
  Jorick Astrego
 
  Netbulae Virtualization Experts
 
  
 
 Tel: 053 20 30 270  i...@netbulae.euStaalsteden 4-3A
  KvK 08198180
 Fax: 053 20 30 271  www.netbulae.eu 7547 TA Enschede
  BTW
 NL821234584B01
 
  
 
 
  ___
  Users mailing list
  Users@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/users
 
  ___
  Users mailing list
  Users@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/users
 
 
 --
 Daniel Helgenberger
 m box bewegtbild GmbH
 
 P: +49/30/2408781-22
 F: +49/30/2408781-10
 
 ACKERSTR. 19
 D-10115 BERLIN
 
 
 www.m-box.de  www.monkeymen.tv
 
 Geschäftsführer: Martin Retschitzegger / Michaela Göllner
 Handeslregister: Amtsgericht Charlottenburg / HRB 112767
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] When will ovirt add GPU/vGPU support in the admin portal ?

2015-01-19 Thread Martin Polednik


- Original Message -
 From: Jorick Astrego j.astr...@netbulae.eu
 To: users@ovirt.org
 Sent: Monday, January 19, 2015 10:14:35 AM
 Subject: Re: [ovirt-users] When will ovirt add GPU/vGPU support in the admin 
 portal ?
 
 
 On 01/19/2015 02:33 AM, lof yer wrote:
 
  Since I recently saw cloudstack have add this(
  https://cwiki.apache.org/confluence/display/CLOUDSTACK/GPU+and+vGPU+support+for+CloudStack+Guest+VMs
  ).
  And iGVT(
  https://01.org/zh/xen/blogs/wangbo85/2014/intel-gvt-gxengt-pubic-release?langredirect=1)
  is released.
  If ovirt add this, it'll be very competitive for ovirt in VDI platforms.
 
 See below the response I got about 1 year ago, I don't know the current
 plans/status...
 
   Forwarded Message 
  Subject:Re: [Spice-devel] [Users] desktop virtualization and GPU
  support
  Date:   Wed, 16 Oct 2013 14:08:47 +0200
  From:   David Jaša dj...@redhat.com
  Reply-To:   spice-de...@lists.freedesktop.org, users users@ovirt.org
  CC: spice-de...@lists.freedesktop.org, users users@ovirt.org
 
 
 
  Hi,
 
  I'm afraid that none of these cards will work. IIRC it was explained for
  nVidia approach that it would be necessary to add their closed-source
  code to qemu which is not going to happen.
  You might have better luck with AMD card passthrough approach but I'm
  not sure if GPUs can be passed through qemu/kvm and if so, how the
  GPU-rendered image then gets displayed. So YMMV and don't expect much.
 
  There is a WIP effort for qemu though that is hardware vendor agnostic -
  it's based on creation of virtual GPU in qemu called Virgil that passes
  3D drawing commands to GPU on host. The project is in initial stage
  though so it won't be ready even for testing for quite some time. FWIW,
  there has been discussion about it on spice-devel in recent days and it
  will be presented on upcoming KVM forum so you can get pretty clear
  picture about its status from these sources.
 
  HTH,
 
  David

Hello,

There is quite active effort to implement device passthrough (including GPU,
nics, usb etc.)[1]. Physical GPU passthrough can be considered generic PCI
passthrough which should be ready for oVirt 3.6. As for the vGPU, that will
depend on technology used - SR-IOV would be supported along PCI passthrough,
anything else might need additional work on our side.

[1] http://www.ovirt.org/Features/hostdev_passthrough

mpolednik
 
 Met vriendelijke groet, With kind regards,
 
 Jorick Astrego
 
 Netbulae Virtualization Experts
 
 
 
   Tel: 053 20 30 270  i...@netbulae.euStaalsteden 4-3A
 KvK 08198180
   Fax: 053 20 30 271  www.netbulae.eu 7547 TA Enschede
 BTW NL821234584B01
 
 
 
 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] USB Modem in a VM

2015-01-16 Thread Martin Polednik
- Original Message -
 From: VONDRA Alain avon...@unicef.fr
 To: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek 
 mskri...@redhat.com
 Cc: users@ovirt.org
 Sent: Thursday, January 15, 2015 10:33:19 PM
 Subject: Re: [ovirt-users] USB Modem in a VM
 
 Hi,
 I've tried also to inject the device with virsh attach-device, all seems to
 work but nothing happen in the VM :
 
 [root@unc-srv-hyp2  ~]$ virsh attach-device unc-srv-prnt3 usb-modem.xml
 Please enter your authentication name: root
 Please enter your password:
 Device attached successfully
 
 What did I do wrong, any ideas ?

Hello,
One possibility might be the fact that libvirt itself doesn't have managed mode
for USB devices and I'm not sure virt-manager has the appropriate routine 
handled.

Could you try running
$ virsh nodedev-list
to find the correct usb device and then
# virsh nodedev-detach the_usb_device 
or posibly nodedev-dettach if you run older libvirt?

After that, try starting VM with hostdev element added to XML.

 Regards
 
 
 
 
 
 
 Alain VONDRA
 Chargé d'exploitation des Systèmes d'Information
 Direction Administrative et Financière
 +33 1 44 39 77 76
 UNICEF France
 3 rue Duguay Trouin  75006 PARIS
 www.unicef.fr
 
 
 
 
 
 De : Alon Bar-Lev [alo...@redhat.com]
 Envoyé : jeudi 15 janvier 2015 21:23
 À : VONDRA Alain; Michal Skrivanek
 Cc : users@ovirt.org
 Objet : Re: [ovirt-users]  USB Modem in a VM
 
 Michal, any clue?
 
 - Original Message -
  From: VONDRA Alain avon...@unicef.fr
  To: Alon Bar-Lev alo...@redhat.com
  Cc: users@ovirt.org
  Sent: Thursday, January 15, 2015 5:56:47 PM
  Subject: RE: [ovirt-users]  USB Modem in a VM
 
  Hi,
  Thank you for your answer, I've tried to insert my USB modem, but it
  doesn't
  up in the Windows VM.
  I've tried to insert via virt-manager without success, I can't apply the
  modification, however I see the modem using lsusb :
 
  lsusb
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002
  Device
  001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID
  8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID
  8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 003: ID
  0624:0248 Avocent Corp. Virtual Hub Bus 001 Device 004: ID 0624:0249
  Avocent
  Corp. Virtual Keyboard/Mouse Bus 002 Device 010: ID 0572:1321 Conexant
  Systems (Rockwell), Inc.
 
  I've unload the cdc_acm kernel module via rmmod without success.
  I've also tried to edit the xml appending the ID and VENDDOR tags :
 
   hostdev mode='subsystem' type='usb'
source
  vendor id='0x0572'/
  product id='0x1321'/
/source
  /hostdev
 
  Ut at the first load the config disappears...
  Do I need to restart the host or restart libvirtd services ?
 
  Thanks for your help
  Alain
 
 
 
  Alain VONDRA
  Chargé d'exploitation des Systèmes d'Information
  Direction Administrative et Financière
  +33 1 44 39 77 76
  UNICEF France
  3 rue Duguay Trouin  75006 PARIS
  www.unicef.fr
 
 
 
 
  -Message d'origine-
  De : Alon Bar-Lev [mailto:alo...@redhat.com]
  Envoyé : mardi 13 janvier 2015 17:47
  À : VONDRA Alain
  Cc : users@ovirt.org
  Objet : Re: [ovirt-users] USB Modem in a VM
 
 
 
  - Original Message -
   From: VONDRA Alain avon...@unicef.fr
   To: users@ovirt.org
   Sent: Tuesday, January 13, 2015 5:55:01 PM
   Subject: [ovirt-users]  USB Modem in a VM
  
  
  
   Hi,
  
   Can you tell me if I can use an USB modem through one of the
   hypervisor hosts to a Windows VM ?
  
   I’d like to install a Windows Fax Server.
  
   Thank you for your answers.
 
 
  should be possible using qemu args: -usbdevice host:vendor_id:product_id
 
  in libvirt replace @VENDOR@ and @DEVICE@ to device specific properties:
 
  domain type='kvm'
name.../name
…
devices
  …
  hostdev mode='subsystem' type='usb'
source
  vendor id='0x@VENDOR@'/
  product id='0x@DEVICE@'/
/source
  /hostdev
/devices
  /domain
 
  if this option is not exposed in ui you can use vdsm-hooks[1] to modify the
  libvirt configuration and inject such device.
 
  Regards,
  Alon
 
  [1] http://www.ovirt.org/VDSM-Hooks
 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] USB Modem in a VM

2015-01-16 Thread Martin Polednik


- Original Message -
 From: VONDRA Alain avon...@unicef.fr
 To: Martin Polednik mpoled...@redhat.com
 Cc: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek 
 mskri...@redhat.com, users@ovirt.org
 Sent: Friday, January 16, 2015 12:10:35 PM
 Subject: RE: [ovirt-users] USB Modem in a VM
 
 Hi,
 I'm sure of the device, it's clearer with lsusb, you see all the infos about
 the device :
 
 Bus 001 Device 006: ID 0572:1321 Conexant Systems (Rockwell), Inc.
 Device Descriptor:
   bLength18
   bDescriptorType 1
   bcdUSB   1.10
   bDeviceClass2 Communications
   bDeviceSubClass 0
   bDeviceProtocol 0
   bMaxPacketSize064
   idVendor   0x0572 Conexant Systems (Rockwell), Inc.
   idProduct  0x1321
   bcdDevice1.00
   iManufacturer   1 Conexant
   iProduct2 USB Modem
   iSerial 3 24680246
   bNumConfigurations  2
   Configuration Descriptor:
 bLength 9
 bDescriptorType 2
 wTotalLength   73
 bNumInterfaces  2
 bConfigurationValue 1
 iConfiguration  0
 bmAttributes 0x80
   (Bus Powered)
 MaxPower  100mA
 Interface Descriptor:
   bLength 9
   bDescriptorType 4
 
 With nodedev we just see device nodes, pretty difficult to identify, even
 with --tree opt :
 
 usb_1_0_1_0
 usb_1_1
 usb_1_1_1_0
 usb_1_1_4
 usb_1_1_4_1_0
 usb_1_1_4_1_1
 usb_1_1_6
 usb_1_1_6_1
 usb_1_1_6_1_0
 usb_1_1_6_1_1_0
 usb_1_1_6_1_1_1
 usb_1_1_6_1_1_2
 usb_2_0_1_0
 usb_2_1
 usb_2_1_1_0
 usb_usb1
 usb_usb2

The issue is, you need to get libvirt name of the device and run the 
nodedev-detach
- have you done that with no success?

If not, use some simple script such as (python)

import libvirt

conn = libvirt.openReadOnly()
devices = conn.listAllDevices()
for dev in devices:
print dev.XMLDesc()

to easily find the device and use the name element for nodedev-detach call. 
That should
handle unbinding it from the driver and possibly binding it to some usb stub if 
that exists.
If that doesn't fix it, I admit that I'm not sure what could be the cause apart 
from OS/hw.
 
 The xml injected is, I think right :
 
 hostdev mode='subsystem' type='usb' managed='yes'
 source
 vendor id='0x0572'/
 product id='0x1321'/
 /source
 /hostdev
 
 Even with The device on the VM xml, the device does'nt appears in the Windows
 VM.
 Regards
 Alain
 
 
 
 
 
 
 
 Alain VONDRA
 Chargé d'exploitation des Systèmes d'Information
 Direction Administrative et Financière
 +33 1 44 39 77 76
 UNICEF France
 3 rue Duguay Trouin  75006 PARIS
 www.unicef.fr
 
 
 
 
 -Message d'origine-
 De : Martin Polednik [mailto:mpoled...@redhat.com]
 Envoyé : vendredi 16 janvier 2015 11:37
 À : VONDRA Alain
 Cc : Alon Bar-Lev; Michal Skrivanek; users@ovirt.org
 Objet : Re: [ovirt-users] USB Modem in a VM
 
 - Original Message -
  From: VONDRA Alain avon...@unicef.fr
  To: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek
  mskri...@redhat.com
  Cc: users@ovirt.org
  Sent: Thursday, January 15, 2015 10:33:19 PM
  Subject: Re: [ovirt-users] USB Modem in a VM
 
  Hi,
  I've tried also to inject the device with virsh attach-device, all
  seems to work but nothing happen in the VM :
 
  [root@unc-srv-hyp2  ~]$ virsh attach-device unc-srv-prnt3
  usb-modem.xml Please enter your authentication name: root Please enter
  your password:
  Device attached successfully
 
  What did I do wrong, any ideas ?
 
 Hello,
 One possibility might be the fact that libvirt itself doesn't have managed
 mode for USB devices and I'm not sure virt-manager has the appropriate
 routine handled.
 
 Could you try running
 $ virsh nodedev-list
 to find the correct usb device and then
 # virsh nodedev-detach the_usb_device
 or posibly nodedev-dettach if you run older libvirt?
 
 After that, try starting VM with hostdev element added to XML.
 
  Regards
 
 
 
 
 
 
  Alain VONDRA
  Chargé d'exploitation des Systèmes d'Information Direction
  Administrative et Financière
  +33 1 44 39 77 76
  UNICEF France
  3 rue Duguay Trouin  75006 PARIS
  www.unicef.fr
 
 
 
 
  
  De : Alon Bar-Lev [alo...@redhat.com]
  Envoyé : jeudi 15 janvier 2015 21:23
  À : VONDRA Alain; Michal Skrivanek
  Cc : users@ovirt.org
  Objet : Re: [ovirt-users]  USB Modem in a VM
 
  Michal, any clue?
 
  - Original Message -
   From: VONDRA Alain avon...@unicef.fr
   To: Alon Bar-Lev alo...@redhat.com
   Cc: users@ovirt.org
   Sent: Thursday, January 15, 2015 5:56:47 PM
   Subject: RE: [ovirt-users]  USB Modem in a VM
  
   Hi,
   Thank you for your answer, I've tried to insert my USB modem, but it
   doesn't up in the Windows VM.
   I've tried to insert via virt-manager without success, I can't apply
   the modification, however I see the modem using lsusb :
  
   lsusb

Re: [ovirt-users] USB Modem in a VM

2015-01-16 Thread Martin Polednik


- Original Message -
 From: VONDRA Alain avon...@unicef.fr
 To: Martin Polednik mpoled...@redhat.com
 Cc: users@ovirt.org, Michal Skrivanek mskri...@redhat.com
 Sent: Friday, January 16, 2015 12:30:10 PM
 Subject: Re: [ovirt-users] USB Modem in a VM
 
 Ok Martin,
 I'll try the python script, but I'm a newbie in python, which argumenet I
 need to put to execute it ?
 Thank you
 Alain
 
Simply save it into something like listdevices.py and run $ python 
listdevices.py.
It will list libvirt XML for all of the devices, you just need to find correct
vendor id/product id for your usb device and then use the name for detach
e.g. nodedev-detach usb_usb0.
  
 Alain VONDRA
 Chargé d'exploitation des Systèmes d'Information
 Direction Administrative et Financière
 +33 1 44 39 77 76
 UNICEF France
 3 rue Duguay Trouin  75006 PARIS
 www.unicef.fr
 
 
 
 
 -Message d'origine-
 De : Martin Polednik [mailto:mpoled...@redhat.com]
 Envoyé : vendredi 16 janvier 2015 12:18
 À : VONDRA Alain
 Cc : Alon Bar-Lev; Michal Skrivanek; users@ovirt.org
 Objet : Re: [ovirt-users] USB Modem in a VM
 
 
 
 - Original Message -
  From: VONDRA Alain avon...@unicef.fr
  To: Martin Polednik mpoled...@redhat.com
  Cc: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek
  mskri...@redhat.com, users@ovirt.org
  Sent: Friday, January 16, 2015 12:10:35 PM
  Subject: RE: [ovirt-users] USB Modem in a VM
 
  Hi,
  I'm sure of the device, it's clearer with lsusb, you see all the infos
  about the device :
 
  Bus 001 Device 006: ID 0572:1321 Conexant Systems (Rockwell), Inc.
  Device Descriptor:
bLength18
bDescriptorType 1
bcdUSB   1.10
bDeviceClass2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize064
idVendor   0x0572 Conexant Systems (Rockwell), Inc.
idProduct  0x1321
bcdDevice1.00
iManufacturer   1 Conexant
iProduct2 USB Modem
iSerial 3 24680246
bNumConfigurations  2
Configuration Descriptor:
  bLength 9
  bDescriptorType 2
  wTotalLength   73
  bNumInterfaces  2
  bConfigurationValue 1
  iConfiguration  0
  bmAttributes 0x80
(Bus Powered)
  MaxPower  100mA
  Interface Descriptor:
bLength 9
bDescriptorType 4
 
  With nodedev we just see device nodes, pretty difficult to identify,
  even with --tree opt :
 
  usb_1_0_1_0
  usb_1_1
  usb_1_1_1_0
  usb_1_1_4
  usb_1_1_4_1_0
  usb_1_1_4_1_1
  usb_1_1_6
  usb_1_1_6_1
  usb_1_1_6_1_0
  usb_1_1_6_1_1_0
  usb_1_1_6_1_1_1
  usb_1_1_6_1_1_2
  usb_2_0_1_0
  usb_2_1
  usb_2_1_1_0
  usb_usb1
  usb_usb2
 
 The issue is, you need to get libvirt name of the device and run the
 nodedev-detach
 - have you done that with no success?
 
 If not, use some simple script such as (python)
 
 import libvirt
 
 conn = libvirt.openReadOnly()
 devices = conn.listAllDevices()
 for dev in devices:
 print dev.XMLDesc()
 
 to easily find the device and use the name element for nodedev-detach call.
 That should handle unbinding it from the driver and possibly binding it to
 some usb stub if that exists.
 If that doesn't fix it, I admit that I'm not sure what could be the cause
 apart from OS/hw.
 
  The xml injected is, I think right :
 
  hostdev mode='subsystem' type='usb' managed='yes'
  source
  vendor id='0x0572'/
  product id='0x1321'/
  /source
  /hostdev
 
  Even with The device on the VM xml, the device does'nt appears in the
  Windows VM.
  Regards
  Alain
 
 
 
 
 
 
 
  Alain VONDRA
  Chargé d'exploitation des Systèmes d'Information Direction
  Administrative et Financière
  +33 1 44 39 77 76
  UNICEF France
  3 rue Duguay Trouin  75006 PARIS
  www.unicef.fr
 
 
 
 
  -Message d'origine-
  De : Martin Polednik [mailto:mpoled...@redhat.com] Envoyé : vendredi
  16 janvier 2015 11:37 À : VONDRA Alain Cc : Alon Bar-Lev; Michal
  Skrivanek; users@ovirt.org Objet : Re: [ovirt-users] USB Modem in a VM
 
  - Original Message -
   From: VONDRA Alain avon...@unicef.fr
   To: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek
   mskri...@redhat.com
   Cc: users@ovirt.org
   Sent: Thursday, January 15, 2015 10:33:19 PM
   Subject: Re: [ovirt-users] USB Modem in a VM
  
   Hi,
   I've tried also to inject the device with virsh attach-device, all
   seems to work but nothing happen in the VM :
  
   [root@unc-srv-hyp2  ~]$ virsh attach-device unc-srv-prnt3
   usb-modem.xml Please enter your authentication name: root Please
   enter your password:
   Device attached successfully
  
   What did I do wrong, any ideas ?
 
  Hello,
  One possibility might be the fact that libvirt itself doesn't have
  managed mode for USB devices and I'm not sure virt-manager has the
  appropriate routine

Re: [ovirt-users] USB Modem in a VM

2015-01-16 Thread Martin Polednik


- Original Message -
 From: VONDRA Alain avon...@unicef.fr
 To: Martin Polednik mpoled...@redhat.com
 Cc: users@ovirt.org, Michal Skrivanek mskri...@redhat.com
 Sent: Friday, January 16, 2015 2:45:09 PM
 Subject: Re: [ovirt-users] USB Modem in a VM
 
 Hi Martin,
 That's what I've done, but the result is a missing argument.
 
 [root@unc-srv-hyp2  ~]$ python2.6 usb_dev.py
 Traceback (most recent call last):
   File usb_dev.py, line 4, in module
 conn = libvirt.openReadOnly()
 TypeError: openReadOnly() takes exactly 1 argument (0 given

My mistake, you can use openReadOnly(0) (can be omitted for some libvirt 
versions).

 Alain
 
 
 
 
 Alain VONDRA
 Chargé d'exploitation des Systèmes d'Information
 Direction Administrative et Financière
 +33 1 44 39 77 76
 UNICEF France
 3 rue Duguay Trouin  75006 PARIS
 www.unicef.fr
 
 
 
 
 -Message d'origine-
 De : Martin Polednik [mailto:mpoled...@redhat.com]
 Envoyé : vendredi 16 janvier 2015 13:18
 À : VONDRA Alain
 Cc : users@ovirt.org; Michal Skrivanek
 Objet : Re: [ovirt-users] USB Modem in a VM
 
 
 
 - Original Message -
  From: VONDRA Alain avon...@unicef.fr
  To: Martin Polednik mpoled...@redhat.com
  Cc: users@ovirt.org, Michal Skrivanek mskri...@redhat.com
  Sent: Friday, January 16, 2015 12:30:10 PM
  Subject: Re: [ovirt-users] USB Modem in a VM
 
  Ok Martin,
  I'll try the python script, but I'm a newbie in python, which
  argumenet I need to put to execute it ?
  Thank you
  Alain
 
 Simply save it into something like listdevices.py and run $ python
 listdevices.py.
 It will list libvirt XML for all of the devices, you just need to find
 correct vendor id/product id for your usb device and then use the name for
 detach e.g. nodedev-detach usb_usb0.
 
  Alain VONDRA
  Chargé d'exploitation des Systèmes d'Information Direction
  Administrative et Financière
  +33 1 44 39 77 76
  UNICEF France
  3 rue Duguay Trouin  75006 PARIS
  www.unicef.fr
 
 
 
 
  -Message d'origine-
  De : Martin Polednik [mailto:mpoled...@redhat.com] Envoyé : vendredi
  16 janvier 2015 12:18 À : VONDRA Alain Cc : Alon Bar-Lev; Michal
  Skrivanek; users@ovirt.org Objet : Re: [ovirt-users] USB Modem in a VM
 
 
 
  - Original Message -
   From: VONDRA Alain avon...@unicef.fr
   To: Martin Polednik mpoled...@redhat.com
   Cc: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek
   mskri...@redhat.com, users@ovirt.org
   Sent: Friday, January 16, 2015 12:10:35 PM
   Subject: RE: [ovirt-users] USB Modem in a VM
  
   Hi,
   I'm sure of the device, it's clearer with lsusb, you see all the
   infos about the device :
  
   Bus 001 Device 006: ID 0572:1321 Conexant Systems (Rockwell), Inc.
   Device Descriptor:
 bLength18
 bDescriptorType 1
 bcdUSB   1.10
 bDeviceClass2 Communications
 bDeviceSubClass 0
 bDeviceProtocol 0
 bMaxPacketSize064
 idVendor   0x0572 Conexant Systems (Rockwell), Inc.
 idProduct  0x1321
 bcdDevice1.00
 iManufacturer   1 Conexant
 iProduct2 USB Modem
 iSerial 3 24680246
 bNumConfigurations  2
 Configuration Descriptor:
   bLength 9
   bDescriptorType 2
   wTotalLength   73
   bNumInterfaces  2
   bConfigurationValue 1
   iConfiguration  0
   bmAttributes 0x80
 (Bus Powered)
   MaxPower  100mA
   Interface Descriptor:
 bLength 9
 bDescriptorType 4
  
   With nodedev we just see device nodes, pretty difficult to identify,
   even with --tree opt :
  
   usb_1_0_1_0
   usb_1_1
   usb_1_1_1_0
   usb_1_1_4
   usb_1_1_4_1_0
   usb_1_1_4_1_1
   usb_1_1_6
   usb_1_1_6_1
   usb_1_1_6_1_0
   usb_1_1_6_1_1_0
   usb_1_1_6_1_1_1
   usb_1_1_6_1_1_2
   usb_2_0_1_0
   usb_2_1
   usb_2_1_1_0
   usb_usb1
   usb_usb2
 
  The issue is, you need to get libvirt name of the device and run the
  nodedev-detach
  - have you done that with no success?
 
  If not, use some simple script such as (python)
 
  import libvirt
 
  conn = libvirt.openReadOnly()
  devices = conn.listAllDevices()
  for dev in devices:
  print dev.XMLDesc()
 
  to easily find the device and use the name element for nodedev-detach
  call.
  That should handle unbinding it from the driver and possibly binding
  it to some usb stub if that exists.
  If that doesn't fix it, I admit that I'm not sure what could be the
  cause apart from OS/hw.
 
   The xml injected is, I think right :
  
   hostdev mode='subsystem' type='usb' managed='yes'
   source
   vendor id='0x0572'/
   product id='0x1321'/
   /source
   /hostdev
  
   Even with The device on the VM xml, the device does'nt appears in
   the Windows VM.
   Regards
   Alain
  
  
  
  
  
  
  
   Alain VONDRA
   Chargé d'exploitation

Re: [ovirt-users] USB Modem in a VM

2015-01-16 Thread Martin Polednik


- Original Message -
 From: VONDRA Alain avon...@unicef.fr
 To: Martin Polednik mpoled...@redhat.com
 Cc: users@ovirt.org, Michal Skrivanek mskri...@redhat.com
 Sent: Friday, January 16, 2015 4:00:28 PM
 Subject: RE: [ovirt-users] USB Modem in a VM
 
 I've replaced with openReadOnly(0), but had a argument 1 must be string or
 None, not int issue, so I changed to None, but I had :
 
 [root@unc-srv-hyp2  ~]$ python2.6 usb_dev.py
 Traceback (most recent call last):
   File usb_dev.py, line 5, in module
 devices = conn.listAllDevices()
 TypeError: listAllDevices() takes exactly 2 arguments (1 given)
 
 I put the VM name in openReadOnly(unc-srv-prnt3) and I had this issue :
 
 libvirt:  error : no connection driver available for unc-srv-prnt3
 Traceback (most recent call last):
   File usb_dev.py, line 4, in module
 conn = libvirt.openReadOnly(unc-srv-prnt3)
   File /usr/lib64/python2.6/site-packages/libvirt.py, line 247, in
   openReadOnly
 if ret is None:raise libvirtError('virConnectOpenReadOnly() failed')
 libvirt.libvirtError: no connection driver available for unc-srv-prnt3
 
 What's wrong ?
 
Missing flags parameter again, which version of libvirt are you running?
openReadOnly(0) and listAllDevices(0) should be correct for your version,
sorry for that again.   
 
 Alain VONDRA
 Chargé d'exploitation des Systèmes d'Information
 Direction Administrative et Financière
 +33 1 44 39 77 76
 UNICEF France
 3 rue Duguay Trouin  75006 PARIS
 www.unicef.fr
 
 
 
 
 -Message d'origine-
 De : Martin Polednik [mailto:mpoled...@redhat.com]
 Envoyé : vendredi 16 janvier 2015 15:47
 À : VONDRA Alain
 Cc : users@ovirt.org; Michal Skrivanek
 Objet : Re: [ovirt-users] USB Modem in a VM
 
 
 
 - Original Message -
  From: VONDRA Alain avon...@unicef.fr
  To: Martin Polednik mpoled...@redhat.com
  Cc: users@ovirt.org, Michal Skrivanek mskri...@redhat.com
  Sent: Friday, January 16, 2015 2:45:09 PM
  Subject: Re: [ovirt-users] USB Modem in a VM
 
  Hi Martin,
  That's what I've done, but the result is a missing argument.
 
  [root@unc-srv-hyp2  ~]$ python2.6 usb_dev.py Traceback (most recent
  call last):
File usb_dev.py, line 4, in module
  conn = libvirt.openReadOnly()
  TypeError: openReadOnly() takes exactly 1 argument (0 given
 
 My mistake, you can use openReadOnly(0) (can be omitted for some libvirt
 versions).
 
  Alain
 
 
 
 
  Alain VONDRA
  Chargé d'exploitation des Systèmes d'Information Direction
  Administrative et Financière
  +33 1 44 39 77 76
  UNICEF France
  3 rue Duguay Trouin  75006 PARIS
  www.unicef.fr
 
 
 
 
  -Message d'origine-
  De : Martin Polednik [mailto:mpoled...@redhat.com] Envoyé : vendredi
  16 janvier 2015 13:18 À : VONDRA Alain Cc : users@ovirt.org; Michal
  Skrivanek Objet : Re: [ovirt-users] USB Modem in a VM
 
 
 
  - Original Message -
   From: VONDRA Alain avon...@unicef.fr
   To: Martin Polednik mpoled...@redhat.com
   Cc: users@ovirt.org, Michal Skrivanek mskri...@redhat.com
   Sent: Friday, January 16, 2015 12:30:10 PM
   Subject: Re: [ovirt-users] USB Modem in a VM
  
   Ok Martin,
   I'll try the python script, but I'm a newbie in python, which
   argumenet I need to put to execute it ?
   Thank you
   Alain
 
  Simply save it into something like listdevices.py and run $ python
  listdevices.py.
  It will list libvirt XML for all of the devices, you just need to find
  correct vendor id/product id for your usb device and then use the name
  for detach e.g. nodedev-detach usb_usb0.
 
   Alain VONDRA
   Chargé d'exploitation des Systèmes d'Information Direction
   Administrative et Financière
   +33 1 44 39 77 76
   UNICEF France
   3 rue Duguay Trouin  75006 PARIS
   www.unicef.fr
  
  
  
  
   -Message d'origine-
   De : Martin Polednik [mailto:mpoled...@redhat.com] Envoyé : vendredi
   16 janvier 2015 12:18 À : VONDRA Alain Cc : Alon Bar-Lev; Michal
   Skrivanek; users@ovirt.org Objet : Re: [ovirt-users] USB Modem in a
   VM
  
  
  
   - Original Message -
From: VONDRA Alain avon...@unicef.fr
To: Martin Polednik mpoled...@redhat.com
Cc: Alon Bar-Lev alo...@redhat.com, Michal Skrivanek
mskri...@redhat.com, users@ovirt.org
Sent: Friday, January 16, 2015 12:10:35 PM
Subject: RE: [ovirt-users] USB Modem in a VM
   
Hi,
I'm sure of the device, it's clearer with lsusb, you see all the
infos about the device :
   
Bus 001 Device 006: ID 0572:1321 Conexant Systems (Rockwell), Inc.
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass2 Communications
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize064
  idVendor   0x0572 Conexant Systems (Rockwell), Inc.
  idProduct  0x1321
  bcdDevice1.00
  iManufacturer   1 Conexant
  iProduct2 USB Modem
  iSerial