Hi Everyone,
Xen version 4.9.4
I have problem with adding a usb device to vm xen. After adding usb, vm disconnects and not responding. I checked the leap 15 documentation.
Has anyone had such a problem?
Hello,
First, please verify that you installed Xen using the YaST Virtualization “Install Hypervisor and Tools” module" – Or if you didn’t do that describe your method of installation.
And,whether your Guest is HVM or PVM.
TSU
Thank you for your interest. My configuration is vm. After adding the device, the usb vm switches off. And he does not answer the call
My config file:
<domain type=‘xen’>
<name>w7</name>
<uuid>913c6e3d-f977-4e81-b97d-dc655fd111a6</uuid>
<memory unit=‘KiB’>4194304</memory>
<currentMemory unit=‘KiB’>4194304</currentMemory>
<vcpu placement=‘static’>2</vcpu>
<os>
<type arch=‘x86_64’ machine=‘xenfv’>hvm</type>
<loader type=‘rom’>/usr/lib/xen/boot/hvmloader</loader>
<boot dev=‘hd’/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
<viridian/>
</features>
<clock offset=‘localtime’/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
<disk type=‘file’ device=‘disk’>
<driver name=‘qemu’ type=‘qcow2’/>
<source file=’/home/XENIMGS/w7.qcow2’/>
<target dev=‘hda’ bus=‘ide’/>
<address type=‘drive’ controller=‘0’ bus=‘0’ target=‘0’ unit=‘0’/>
</disk>
<disk type=‘block’ device=‘cdrom’>
<driver name=‘qemu’ type=‘raw’/>
<source dev=’/dev/sr0’/>
<target dev=‘hdb’ bus=‘ide’/>
<readonly/>
<address type=‘drive’ controller=‘0’ bus=‘0’ target=‘0’ unit=‘1’/>
</disk>
<controller type=‘ide’ index=‘0’/>
<interface type=‘network’>
<mac address=‘00:16:3e:a0:e2:90’/>
<source network=‘default’/>
<model type=‘e1000’/>
</interface>
<serial type=‘pty’>
<target port=‘0’/>
</serial>
<console type=‘pty’>
<target type=‘serial’ port=‘0’/>
</console>
<input type=‘tablet’ bus=‘usb’/>
<input type=‘mouse’ bus=‘ps2’/>
<input type=‘keyboard’ bus=‘ps2’/>
<graphics type=‘vnc’ port=’-1’ autoport=‘yes’ keymap=‘pl’>
<listen type=‘address’/>
</graphics>
<video>
<model type=‘vga’ vram=‘16384’ heads=‘1’ primary=‘yes’/>
</video>
<hostdev mode=‘subsystem’ type=‘usb’ managed=‘yes’>
<source>
<vendor id=‘0x0951’/>
<product id=‘0x16a3’/>
</source>
</hostdev>
</devices>
</domain>
załączam dodatkowo mój xen-boot.log
(XEN) Xen version 4.10.3_02-lp150.2.16 (abuild@suse.de) (gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]) debug=n Fri Mar 15 13:09:29 UTC 2019
(XEN) Latest ChangeSet:
(XEN) Bootloader: GRUB2 2.02
(XEN) Command line: vga=gfx-1024x768x16
(XEN) Xen image load base address: 0
(XEN) Video information:
(XEN) VGA is graphics mode 1024x768, 16 bpp
(XEN) VBE/DDC methods: V2; EDID transfer time: 1 seconds
(XEN) Disc information:
(XEN) Found 2 MBR signatures
(XEN) Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN) 0000000000000000 - 000000000009d800 (usable)
(XEN) 000000000009d800 - 00000000000a0000 (reserved)
(XEN) 00000000000e0000 - 0000000000100000 (reserved)
(XEN) 0000000000100000 - 0000000020000000 (usable)
(XEN) 0000000020000000 - 0000000020200000 (reserved)
(XEN) 0000000020200000 - 0000000040004000 (usable)
(XEN) 0000000040004000 - 0000000040005000 (reserved)
(XEN) 0000000040005000 - 00000000d0780000 (usable)
(XEN) 00000000d0780000 - 00000000dae9f000 (reserved)
(XEN) 00000000dae9f000 - 00000000daf9f000 (ACPI NVS)
(XEN) 00000000daf9f000 - 00000000dafff000 (ACPI data)
(XEN) 00000000dafff000 - 00000000dfa00000 (reserved)
(XEN) 00000000f8000000 - 00000000fc000000 (reserved)
(XEN) 00000000fec00000 - 00000000fec01000 (reserved)
(XEN) 00000000fed08000 - 00000000fed09000 (reserved)
(XEN) 00000000fed10000 - 00000000fed1a000 (reserved)
(XEN) 00000000fed1c000 - 00000000fed20000 (reserved)
(XEN) 00000000fee00000 - 00000000fee01000 (reserved)
(XEN) 00000000ffc00000 - 0000000100000000 (reserved)
(XEN) 0000000100000000 - 000000021e600000 (usable)
(XEN) 000000021e600000 - 000000021e800000 (reserved)
(XEN) New Xen image base address: 0xd0000000
(XEN) ACPI: RSDP 000F0120, 0024 (r2 LENOVO)
(XEN) ACPI: XSDT DAFFE170, 00B4 (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: FACP DAFE6000, 00F4 (r4 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: DSDT DAFE9000, F311 (r1 LENOVO TP-G4 1110 INTL 20061109)
(XEN) ACPI: FACS DAF5A000, 0040
(XEN) ACPI: SLIC DAFFD000, 0176 (r1 LENOVO TP-G4 1110 PTL 1)
(XEN) ACPI: TCPA DAFFC000, 0032 (r2 PTL LENOVO 6040000 LNVO 1)
(XEN) ACPI: SSDT DAFFB000, 0249 (r1 LENOVO TP-SSDT2 200 INTL 20061109)
(XEN) ACPI: SSDT DAFFA000, 0033 (r1 LENOVO TP-SSDT1 100 INTL 20061109)
(XEN) ACPI: SSDT DAFF9000, 0797 (r1 LENOVO SataAhci 1000 INTL 20061109)
(XEN) ACPI: HPET DAFE5000, 0038 (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: APIC DAFE4000, 0098 (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: MCFG DAFE3000, 003C (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: ECDT DAFE2000, 0052 (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: FPDT DAFE1000, 0054 (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: ASF! DAFE8000, 00A5 (r32 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: UEFI DAFE0000, 003E (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: UEFI DAFDF000, 0042 (r1 PTL COMBUF 1 PTL 1)
(XEN) ACPI: POAT DAFDE000, 0055 (r3 LENOVO TP-G4 1110 PTL 2)
(XEN) ACPI: SSDT DAFDD000, 0C78 (r1 PmRef Cpu0Ist 3000 INTL 20061109)
(XEN) ACPI: SSDT DAFDC000, 0A7E (r1 PmRef CpuPm 3000 INTL 20061109)
(XEN) ACPI: UEFI DAFDB000, 02A6 (r1 LENOVO TP-G4 1110 PTL 2)
(XEN) System RAM: 7915MB (8105072kB)
(XEN) Domain heap initialised
(XEN) IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode: Flat. Using 1 I/O APICs
(XEN) Not enabling x2APIC: depends on iommu_supports_eim.
(XEN) xstate: size: 0x340 and states: 0x7
(XEN) Speculative mitigation facilities:
(XEN) Hardware features:
(XEN) Compiled-in support: INDIRECT_THUNK SHADOW_PAGING
(XEN) Xen settings: BTI-Thunk RETPOLINE, SPEC_CTRL: No, Other:
(XEN) L1TF: believed vulnerable, maxphysaddr L1D 46, CPUID 36, Safe address 1000000000
(XEN) Support for VMs: PV: RSB EAGER_FPU, HVM: RSB EAGER_FPU
(XEN) XPTI (64-bit PV only): Dom0 enabled, DomU enabled
(XEN) PV L1TF shadowing: Dom0 disabled, DomU enabled
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Platform timer is 14.318MHz HPET
(XEN) Detected 2594.120 MHz processor.
(XEN) Initing memory sharing.
(XEN) I/O virtualisation disabled
(XEN) Enabled directed EOI with ioapic_ack_old on!
(XEN) ENABLING IO-APIC IRQs
(XEN) Allocated console ring of 16 KiB.
(XEN) VMX: Supported advanced features:
(XEN) - APIC MMIO access virtualisation
(XEN) - APIC TPR shadow
(XEN) - Extended Page Tables (EPT)
(XEN) - Virtual-Processor Identifiers (VPID)
(XEN) - Virtual NMI
(XEN) - MSR direct-access bitmap
(XEN) - Unrestricted Guest
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging (HAP) detected
(XEN) HVM: HAP page sizes: 4kB, 2MB
(XEN) Brought up 4 CPUs
(XEN) Dom0 has maximum 600 PIRQs
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Xen kernel: 64-bit, lsb, compat32
(XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x3084
Because your virtual machine disk file isn’t in an expected location, I’m pretty sure you did not isntall Xen properly.
Open YaST (which should be almost a reflex for doing anything in openSUSE, using YaST as your first option to install, configure and manage everything on your machine will generally give you s working configuration with known default values).
Look for a module called “Install Hypervisor and Tools” and open that.
You should see some screens which allow you to select your virtualization choice (Xen will be an option, and should also select the User mode tools) and continue.
YaST will then install Xen, libvirt which is the graphical managemant tool (and has its own command line environment), and offer to set up a bridging virtual bridge device called br0. accept everything that’s offered.
Reboot, and then create a new virtual machine (My guess is that your old virtual machine will more trouble than it’s worth to try to import).
Also,l if you’re new to openSUSE you may find the slide deck to a presentation I give on openSUSE 15.0 helpful, it describes most everything a User should know and do from pre-installation to first steps after install.
https://slides.com/tonysu/opensuse/
HTH,
TSU
When there is no hostdev entry with usb the machine is working properly.
I checked it on 3 computers and the problem is the same. There may be a missing module in the kernel or system permissions.
I tested on opensuse Leap 42.3 and Leap 15
The installation was done by yast-vm with ‘xen hypervisor’ and ‘xen tools’ checked,
Below I am sending configuration from my other machine where the same problem occurs:
<domain type=‘xen’>
<name>w7</name>
<uuid>a5dd4bc9-0cca-4ca5-aa69-cc536d471f78</uuid>
<description>Win7</description>
<memory unit=‘KiB’>4194304</memory>
<currentMemory unit=‘KiB’>4194304</currentMemory>
<vcpu placement=‘static’>4</vcpu>
<os>
<type arch=‘x86_64’ machine=‘xenfv’>hvm</type>
<loader type=‘rom’>/usr/lib/xen/boot/hvmloader</loader>
<boot dev=‘hd’/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode=‘host-model’>
<model fallback=‘allow’/>
</cpu>
<clock offset=‘localtime’/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
<disk type=‘file’ device=‘disk’>
<driver name=‘qemu’ type=‘qcow2’/>
<source file=’/var/lib/xen/images/w7.qcow2’/>
<target dev=‘hda’ bus=‘ide’/>
<address type=‘drive’ controller=‘0’ bus=‘0’ target=‘0’ unit=‘0’/>
</disk>
<disk type=‘file’ device=‘cdrom’>
<driver name=‘qemu’ type=‘raw’/>
<source file=’/home/marcin/ISO/w7x64.iso’/>
<target dev=‘hdb’ bus=‘ide’/>
<readonly/>
<address type=‘drive’ controller=‘0’ bus=‘0’ target=‘0’ unit=‘1’/>
</disk>
<controller type=‘ide’ index=‘0’/>
<interface type=‘bridge’>
<mac address=‘00:16:3e:29:43:44’/>
<source bridge=‘br0’/>
<model type=‘e1000’/>
</interface>
<input type=‘mouse’ bus=‘ps2’/>
<input type=‘keyboard’ bus=‘ps2’/>
<graphics type=‘spice’ port=‘5913’ tlsPort=‘5914’ autoport=‘no’ keymap=‘pl’>
<listen type=‘address’/>
<image compression=‘off’/>
</graphics>
<video>
<model type=‘qxl’ ram=‘65536’ vram=‘131072’ heads=‘1’ primary=‘yes’/>
</video>
<hostdev mode=‘subsystem’ type=‘usb’ managed=‘yes’>
<source>
<vendor id=‘0x0403’/>
<product id=‘0x6001’/>
</source>
</hostdev>
</devices>
</domain>