Tried virt-manager with the provided XML as well, still the same:
- qemu-img create -f qcow2 test.img 512M - virsh create test.xml - virt-viewer VM - Type "exit" to enter config screen -> "Device Manager" → "OVMF Platform Configuration" → "Change preferred resolution" -> Set to 1680x1050 -> F10 -> Y -> ESC -> ESC -> Reset - Frame buffer resized to 1680x1050
I had to make the following changes to the provided XML file, but I think they're irrelevant to our context:
- changed ovmf-vars path - removed CPU model - removed network - updated disk image path
toor@test:~$ git --no-pager diff test_original.xml test.xml diff --git a/test_original.xml b/test.xml index c1de8b6..79557eb 100644 --- a/test_original.xml +++ b/test.xml @@ -18,7 +18,7 @@ or other application using the libvirt API. <os> <type arch="x86_64" machine="pc-i440fx-focal">hvm</type> <loader readonly="yes" secure="no" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader> -<nvram template="/usr/share/OVMF/OVMF_VARS.fd">/var/lib/libvirt/nvram/vm_VARS.fd</nvram> +<nvram template="/usr/share/OVMF/OVMF_VARS.fd">/tmp/vars.fd</nvram> <boot dev="hd"/> <bootmenu enable="no"/> </os> @@ -27,9 +27,6 @@ or other application using the libvirt API. <apic/> <vmport state="off"/> </features> -<cpu mode="custom" match="exact" check="partial"> -<model fallback="allow">IvyBridge</model> -</cpu> <clock offset="utc"> <timer name="rtc" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> @@ -46,7 +43,7 @@ or other application using the libvirt API. <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type="file" device="disk"> <driver name="qemu" type="qcow2"/> -<source file="/home/vms/vm.qcow2"/> +<source file="/home/toor/test.img"/> <target dev="vda" bus="virtio"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/> </disk> @@ -69,12 +66,6 @@ or other application using the libvirt API. <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:00:cc:78:2e"/> -<source network="default"/> -<model type="virtio"/> -<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"/>
Tried virt-manager with the provided XML as well, still the same:
- qemu-img create -f qcow2 test.img 512M
- virsh create test.xml
- virt-viewer VM
- Type "exit" to enter config screen -> "Device Manager" → "OVMF Platform Configuration" → "Change preferred resolution" -> Set to 1680x1050 -> F10 -> Y -> ESC -> ESC -> Reset
- Frame buffer resized to 1680x1050
I had to make the following changes to the provided XML file, but I think they're irrelevant to our context:
- changed ovmf-vars path
- removed CPU model
- removed network
- updated disk image path
toor@test:~$ git --no-pager diff test_original.xml test.xml "pc-i440fx- focal"> hvm</type> >/usr/share/ OVMF/OVMF_ CODE.fd< /loader> "/usr/share/ OVMF/OVMF_ VARS.fd" >/var/lib/ libvirt/ nvram/vm_ VARS.fd< /nvram> "/usr/share/ OVMF/OVMF_ VARS.fd" >/tmp/vars. fd</nvram> "allow" >IvyBridge< /model> "catchup" /> "delay" /> /usr/bin/ qemu-system- x86_64< /emulator> home/vms/ vm.qcow2" /> home/toor/ test.img" /> serial" index="0"> "52:54: 00:cc:78: 2e"/>
diff --git a/test_original.xml b/test.xml
index c1de8b6..79557eb 100644
--- a/test_original.xml
+++ b/test.xml
@@ -18,7 +18,7 @@ or other application using the libvirt API.
<os>
<type arch="x86_64" machine=
<loader readonly="yes" secure="no" type="pflash"
-<nvram template=
+<nvram template=
<boot dev="hd"/>
<bootmenu enable="no"/>
</os>
@@ -27,9 +27,6 @@ or other application using the libvirt API.
<apic/>
<vmport state="off"/>
</features>
-<cpu mode="custom" match="exact" check="partial">
-<model fallback=
-</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy=
<timer name="pit" tickpolicy=
@@ -46,7 +43,7 @@ or other application using the libvirt API.
<emulator>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
-<source file="/
+<source file="/
<target dev="vda" bus="virtio"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
</disk>
@@ -69,12 +66,6 @@ or other application using the libvirt API.
<controller type="virtio-
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
</controller>
-<interface type="network">
-<mac address=
-<source network="default"/>
-<model type="virtio"/>
-<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"/>