I can't boot ubuntu-20.04.1-live-server-amd64.iso with VNC graphic
using libvirt, there is an error message:
graphics initialization failed
Error setting up gfxboot
boot:
after a moment, I see some other messages:
graphics initialization failed
Error setting up gfxboot
boot:
Could not allocate memory.
boot
Could not allocate memory.
boot
Could not allocate memory.
boot
To reproduce:
- download ubuntu-20.04.1-live-server-amd64.iso to
/var/lib/libvirt/images
- create a qcow2 image /var/lib/libvirt/images/disk0.qcow2
- create the following libvirt XML definition file
Hello.
I can't boot ubuntu- 20.04.1- live-server- amd64.iso with VNC graphic
using libvirt, there is an error message:
graphics initialization failed
Error setting up gfxboot
boot:
after a moment, I see some other messages:
graphics initialization failed
Error setting up gfxboot
boot:
Could not allocate memory.
boot
Could not allocate memory.
boot
Could not allocate memory.
boot
To reproduce:
- download ubuntu- 20.04.1- live-server- amd64.iso to lib/libvirt/ images
/var/
- create a qcow2 image /var/lib/ libvirt/ images/ disk0.qcow2
- create the following libvirt XML definition file
<domain type='kvm' xmlns:qemu='http:// libvirt. org/schemas/ domain/ qemu/1. 0'> ubuntu- server- 20.04.1< /name> ubuntu- server- 20.04.1< /title> <![CDATA[ 4]]></vcpu> 205</shares> 2097152< /memory> 64'>hvm< /type> <![CDATA[ /usr/bin/ qemu-system- x86_64] ]></emulator> var/lib/ libvirt/ images/ disk0.qcow2' /> var/lib/ libvirt/ images/ ubuntu- 20.04.1- live-server- amd64.iso' />
<name>
<title>
<vcpu>
<cputune>
<shares>
</cputune>
<memory>
<os>
<type arch='x86_
</os>
<devices>
<emulator>
<disk type='file' device='disk'>
<source file='/
<target dev='sda'/>
<boot order='1'/>
<driver name='qemu' type='qcow2' cache='none'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/
<target dev='hda' bus='ide'/>
<boot order='2'/>
<readonly/>
<driver name='qemu' type='raw' cache='none'/>
</disk>
<graphics type='vnc' listen='0.0.0.0' port='5901' keymap='fr'/>
<input type='tablet' bus='usb'/>
</devices>
<features>
<acpi/>
</features>
</domain>
- define the domaine with: virsh define ubuntu-server.xml
- start the domain with: virsh start ubuntu- server- 20.04.1
- connect to the VNC port 5901
It's working fine when I try the following:
qemu- system- x86_64 -m 2048 -smp 1 -vnc 0.0.0.0:1 -k fr -name test-boot -monitor pty -boot order=d -drive file=/var/ lib/libvirt/ images/ disk0.qcow2, media=disk -drive file=/var/ lib/libvirt/ images/ ubuntu- 20.04.1- live-server- amd64.iso, media=cdrom
The non working qemu command line used by libvirt is:
/usr/ bin/qemu- system- x86_64 -name guest=ubuntu- server- 20.04.1, debug-threads= on -S -object secret, id=masterKey0, format= raw,file= /var/lib/ libvirt/ qemu/domain- 7-ubuntu- server- 20.04./ master- key.aes -machine pc-i440fx- focal,accel= kvm,usb= off,dump- guest-core= off -cpu qemu64 -m 2048 -overcommit mem-lock=off -smp 4,sockets= 4,cores= 1,threads= 1 -uuid 503e911c- f7a5-48ef- 8241-36bdbc75b9 a3 -no-user-config -nodefaults -chardev socket, id=charmonitor, fd=31,server, nowait -mon chardev= charmonitor, id=monitor, mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb- uhci,id= usb,bus= pci.0,addr= 0x1.0x2 -device lsi,id= scsi0,bus= pci.0,addr= 0x3 -blockdev {"driver" :"file" ,"filename" :"/var/ lib/libvirt/ images/ disk0.qcow2" ,"node- name":" libvirt- 2-storage" ,"cache" :{"direct" :true," no-flush" :false} ,"auto- read-only" :true," discard" :"unmap" } -blockdev {"node- name":" libvirt- 2-format" ,"read- only":false, "cache" :{"direct" :true," no-flush" :false} ,"driver" :"qcow2" ,"file" :"libvirt- 2-storage" ,"backing" :null} -device scsi-hd, bus=scsi0. 0,scsi- id=0,device_ id=drive- scsi0-0- 0,drive= libvirt- 2-format, id=scsi0- 0-0,bootindex= 1,write- cache=on -blockdev {"driver" :"file" ,"filename" :"/var/ lib/libvirt/ images/ ubuntu- 20.04.1- live-server- amd64.iso" ,"node- name":" libvirt- 1-storage" ,"cache" :{"direct" :true," no-flush" :false} ,"auto- read-only" :true," discard" :"unmap" } -blockdev {"node- name":" libvirt- 1-format" ,"read- only":true, "cache" :{"direct" :true," no-flush" :false} ,"driver" :"raw", "file": "libvirt- 1-storage" } -device ide-cd, bus=ide. 0,unit= 0,drive= libvirt- 1-format, id=ide0- 0-0,bootindex= 2,write- cache=on -vnc 0.0.0.0:1 -k fr -device cirrus- vga,id= video0, bus=pci. 0,addr= 0x2 -device virtio- balloon- pci,id= balloon0, bus=pci. 0,addr= 0x4 -sandbox on,obsolete= deny,elevatepri vileges= deny,spawn= deny,resourceco ntrol=deny -msg timestamp=on