Re: ERROR internal error: Unexpected enum value 0 for virDomainDeviceAddressType

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/8/21 8:05 PM, Mario Marietto wrote:
> Like this ?
> 
> virt-install \
>    --name pi \
>    --machine raspi3 \
>    --cpu arm1176 \
>    --memory 1024 \
>    --import \
>    --disk
> /root/Desktop/zi/Work/Android/Raspy/Debian/2019-09-26-raspbian-buster-lite.img,format=raw,bus=virtio
> \
>    --network user,model=virtio \
>    --video vga \
>    --graphics spice \
>    --rng device=/dev/urandom,model=virtio \
>    --boot
> 'dtb=bcm2710-rpi-3-b-plus.dtb,kernel=kernel8.img,kernel_args=root=/dev/vda2
> rootwait panic=1 dwc_otg.fiq_fsm_enable=0' \
>    --features acpi=off \
>    --events on_reboot=destroy
> 
> it says :
> 
> Starting install...
> ERROR    internal error: Unexpected enum value 0 for
> virDomainDeviceAddressType

This is genuine libvirt bug. The problem is with virtio-serial
controller (added automatically by libvirt) has no address assigned and
thus building cmd line throws that error.

Here's stacktrace I gathered when the error is reported:

#0  virReportErrorHelper (domcode=10, errorcode=1, filename=0x7fbf872bf370 "../src/qemu/qemu_command.c", funcname=0x7fbf872c39f0 <__FUNCTION__.62> "qemuBuildVirtioDevStr", linenr=545, fmt=0x7fbf872bf5a8 "Unexpected enum value %d for %s") at ../src/util/virerror.c:1310
#1  0x00007fbf8718b97c in qemuBuildVirtioDevStr (buf=0x7fbf8932a370, baseName=0x7fbf872c0611 "virtio-serial", qemuCaps=0x7fbf740486d0, devtype=VIR_DOMAIN_DEVICE_CONTROLLER, devdata=0x7fbf8000f300) at ../src/qemu/qemu_command.c:545
#2  0x00007fbf871911af in qemuBuildControllerDevStr (domainDef=0x7fbf800048d0, def=0x7fbf8000f300, qemuCaps=0x7fbf740486d0, devstr=0x7fbf8932a3e0) at ../src/qemu/qemu_command.c:2564


qemuBuildControllerDevStr 2 $ p *def
$3 = {type = 4, idx = 0, model = -1, queues = 0, cmd_per_lun = 0, max_sectors = 0, ioeventfd = VIR_TRISTATE_SWITCH_ABSENT, iothread = 0, opts = {vioserial = {ports = -1, vectors = -1}, pciopts = {pcihole64 = 255, pcihole64size = 0, modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE, chassisNr = 0, chassis = 0, port = 0, busNr = 0, targetIndex = 0, numaNode = 0, hotplug = VIR_TRISTATE_SWITCH_ABSENT}, usbopts = {ports = -1}, xenbusopts = {maxGrantFrames = -1, maxEventChannels = -1}}, info = {alias = 0x7fbf80011640 "virtio-serial0", type = 0, addr = {pci = {domain = 0, bus = 0, slot = 0, function = 0, multi = VIR_TRISTATE_SWITCH_ABSENT, extFlags = 0, zpci = {uid = {value = 0, isSet = false}, fid = {value = 0, isSet = false}}}, drive = {controller = 0, bus = 0, target = 0, unit = 0}, vioserial = {controller = 0, bus = 0, port = 0}, ccid = {controller = 0, slot = 0}, usb = {bus = 0, port = {0, 0, 0, 0}}, spaprvio = {reg = 0, has_reg = false}, ccw = {cssid = 0, ssid = 0, devno = 0, assi
 gned = false}, isa = {iobase = 0, irq = 0}, dimm = {slot = 0, base = 0}}, mastertype = 0, master = {usb = {startport = 0}}, romenabled = VIR_TRISTATE_BOOL_ABSENT, rombar = VIR_TRISTATE_SWITCH_ABSENT, romfile = 0x0, bootIndex = 0, acpiIndex = 0, pciConnectFlags = 9, pciAddrExtFlags = 0, loadparm = 0x0, isolationGroup = 0, isolationGroupLocked = false}, virtio = 0x0}


Here we can "clearly" see that def->info->type=0 (as the device has no
address set). Please open an issue on gitlab:

  https://gitlab.com/libvirt/libvirt/-/issues/new?issue%5Bmilestone_id%5D=

Michal




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux