Link to home
Start Free TrialLog in
Avatar of ridha121
ridha121Flag for United Kingdom of Great Britain and Northern Ireland

asked on

How to make QEMU/KVM full screen?

Hi Guys

How do I make the VM full screen? my monito is widescreen 16:9 but VM displays as 4:3

Regards
ASKER CERTIFIED SOLUTION
Avatar of nimda7
nimda7
Flag of Belarus image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ridha121

ASKER

nimda7

Im using the GUI console to manage the vm.

It does go into full screen however it displays as 4:3 my laptop is widescreen and would like it full screen?

How would i use the commands above plus would it make it widescreen?
What the GUI tool do You use?
Virtual Machine Manager
VMM is just interface, there is no virtual machine configs.
Which way do You create new virtual machine? virt-install ?
ah yes using virt install

I used the method below

https://help.ubuntu.com/community/KVM

But used VMM based on QEMU to create the machine
Then configs may be there in XML format - /etc/libvirt/qemu/
Edit corresponded and add parameters
Ive added the contents of the xml file pertaining to the vm in question dont seem to see any config regarding the video size?
domain type='kvm'>
  <name>windows</name>
  <uuid>c5ab8a7e-24b8-097a-ddc6-42d81fb6b6e4</uuid>
  <memory>2096128</memory>
  <currentMemory>2096128</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='i686' machine='pc-0.12'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/windows.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:9e:0a:93'/>
      <source network='default'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </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'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <sound model='ac97'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='vmvga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Open in new window

for full screen You must change line #50
from <graphics type='vnc' port='-1' autoport='yes'/>
to <graphics type='vnc' port='-1' autoport='yes' fullscreen='yes'/>

and line #55
from <model type='vmvga' vram='9216' heads='1'/>
to <model type='vga' vram='32768' heads='1'/>
This will add little bit more the vram (video memory) and change mode to the correct value.



I tried the above but the display was still 4:3

Also to add the extra video memory didnt improve general speed of the vm? I am finding that youtube etc is slow.

I have a intel core 2 duo with vt technology laptop, i thought kvm was bare metal so better performace?
is there a tool that qemu uses on guest os? like vmware tools etc?

I found that with viritualbox I installed its tools and the resoulution issue was fixed and os was able to pick up usb etc.

virtualbox was also alot faster?

Shouldnt qemu be running using bare metal?

I think I may have missed something? because in virtualbox os I was able to run graphic tasks very smooth whereas qemu is slow and sluggish.

Regards
vmware uses no "guest tools", has VESA BIOS and is limited to 4:3/5:4 display modes
VirtualBox/VMWare etc will be as slow withut using virtualization extension on most CPUs

you mean qemu uses no guest tools?

if its limited to 4:3/5:4 then why would people want to go with that solution?

currently my windows 7 qemu using kvm hypervisor refuses to go into widescreen and is very slow with flash being slow also audio output not working even thtough ive given it a audio device its picked it up and installed it yet still no output.

I assumed qemu was the best option as it was bare metal and id get better performance however virtual box is alot better and when installing the guest tools was able to make the image full screen. its performance is very good also with no laggy video and excellent sound output.

I have enabled the vitualisation extention on my cpu which I had to do in order to get qemu kvm working.

am I missing something here ?
What is the practical purpose of having HD graphics in merely headless virtual machines?
Nobody prevents you for writing a driver for KVM graphics (both emulated hardware and windows client driver) and even profit from that.
Why not RDP, NX or VNC? They sort of use any resolution asked.
choppy video and bad sound are there because your network has random latency, and probably misses speed needed.