retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.63k stars 362 forks source link

Error poweron VM on Ubuntu Server 22.04 #637

Closed DynamicLoader closed 4 months ago

DynamicLoader commented 4 months ago

As the title, I installed this onto a Ubuntu Server 22.04.

After setting debug=true to get rid of #615 , I can setup a new VM, but cannot poweron it.

Outputs:

libvirt Error - internal error: qemu unexpectedly closed the monitor: 2024-02-27T08:05:22.254392Z qemu-system-x86_64: -device default,netdev=hostnet0,id=net0,mac=52:54:10:c4:e7:a4,bus=pci.0,addr=0x3: 'default' is not a valid device model name

The hardware: CPU: Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHz RAM: 128GB

How can I solve it, please? Thanks.

catborise commented 4 months ago

it is related with nic model type. it is fixed with latest commits. you should checkout lastest ones.

DynamicLoader commented 4 months ago

But I just clone it today (2024/02/27, isn't it the latest one?

catborise commented 4 months ago

well then, can you please share instance XML with us to see which device is causing that problem.(probably network device)

DynamicLoader commented 4 months ago

Copied from web page XML panel:

<domain type='kvm'>
  <name>test</name>
  <uuid>60fccc7c-f998-4c90-abec-48a63bbfd543</uuid>
  <description>None</description>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-6.2'>hvm</type>
    <boot dev='hd'/>
    <boot dev='cdrom'/>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-model' check='partial'/>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync'/>
      <source file='/var/lib/libvirt/images/test.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='sda' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:10:c4:e7:a4'/>
      <source network='default'/>
      <model type='default'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <graphics type='spice' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='vga' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>
catborise commented 4 months ago
<interface type='network'>
      <mac address='52:54:10:c4:e7:a4'/>
      <source network='default'/>
      <model type='default'/> ---> this line is problem
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

I thought I had solved this problem with latest . i did check again. :) i forgot to push it to repository. #638 this will fix problem. (and also you can edit XML and remove specified line and save. it will work)

DynamicLoader commented 4 months ago

OK, it did start normally. I'd update soon. Thanks for it very much!!