Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] QEMU virtualization via SPICE connection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
umka69
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2013
Posts: 124

PostPosted: Sun Sep 27, 2015 2:22 pm    Post subject: [SOLVED] QEMU virtualization via SPICE connection Reply with quote

Hello, gentoo community!
I had succeeded to emulate Windows 10 with QEMU and to connect to the guest with spice client application form the host.
Is it possible to run it with host native resolution and in fullscreen mode?
Does somebody know something about this?
Here is my current way but it is not setisfacteble.

Step 1: run the vm with the script
Code:
rolan@home ~ $ cat start-vm.sh
#!/bin/sh
export SPICE_PORT=5924
exec qemu-system-x86_64 \
        -enable-kvm \
        -cpu host -smp 4 -m 6G \
        -soundhw hda \
        -vga qxl -full-screen \
        -spice port=${SPICE_PORT},disable-ticketing \
        -usbdevice tablet \
        -device virtio-serial \
        -chardev spicevmc,id=vdagent,name=vdagent \
        -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
        -boot d \
        -drive file="/dev/repo/microsoft-desktop",if=virtio \
        -name "Windows 10" \
        -k en-us \
        "$@"

Step 2: connection...
Code:
rolan@home ~ $ spicec --title Windows -h 192.168.0.1 -p ${SPICE_PORT}

_________________
Make a wish, this text is magic. :)


Last edited by umka69 on Sun Sep 27, 2015 10:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 189
Location: Germany

PostPosted: Sun Sep 27, 2015 4:50 pm    Post subject: Reply with quote

I'm using win7 64bits with qemu.
Because i played around, i created first an image w/o virtio driver using AQEMU.
Here's my script:
Code:

#!/bin/sh
SPICE_PORT=5900
/usr/bin/qemu-system-x86_64 \
            -daemonize \
            -enable-kvm  \
            -cpu host \
            -smp 8,sockets=1,cores=4,threads=1 \
            -localtime \
            -cdrom "/mnt/iso/canonscan.iso" \
            -hda "/mnt/virtualbox/qemu/Windows_7_x64_HDA.img"  \
            -boot once=d,menu=off \
            -net nic,vlan=0 \
            -net user,smb=/mnt/storage \
            -m 4096 \
            -vga qxl \
            -spice port=${SPICE_PORT},disable-ticketing \
            -device virtio-serial \
            -chardev spicevmc,id=vdagent,name=vdagent \
            -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
            -usbdevice tablet
            -usbdevice host:1a61:3650 \
            #usb 2 for my scanner
            -device usb-ehci,id=ehci \
            -device usb-host,bus=ehci.0,vendorid=0x04a9,productid=0x190f \
            -name "Windows 7 x64" \
            "$@"
exec spicec --title Windows -f -h 127.0.0.1 -p ${SPICE_PORT}

First, you have to change your screen resolution in windows (in my case, to 1920x1080)
with spice... -f you get fullscreen.
to toggle fs: press shift + f11
to free the mouse when captured or set the focus back in the vm: shift + f12
Back to top
View user's profile Send private message
umka69
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2013
Posts: 124

PostPosted: Sun Sep 27, 2015 10:09 pm    Post subject: Reply with quote

Thank you! It was realy helpful.

USB scanner and key combination are interesting too.
I have just tried to config these lately.
_________________
Make a wish, this text is magic. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum