Overclock.net › Forums › Software, Programming and Coding › Operating Systems › {Guide} Create a Gaming Virtual Machine
New Posts  All Forums:Forum Nav:

{Guide} Create a Gaming Virtual Machine - Page 48

post #471 of 778
Quote:
Originally Posted by powerhouse View Post

You'll need some more HDDs for your media center. If you're looking for speed, may I suggest getting 2 identical low-cost "green" HDD and running them LVM striped - it works beautifully, even between domU/dom0. GPLPV driver for the HDD is necessary, though. By the way, you can get signed drivers from the univention website (if you plan to replace the drivers, you may have to get the uninstall batch file from meadows and read the comments!!!).

Thanks powerhouse.
I will eventually get an additional USB 3 external storage hdd (I might run into a bit of a temperature problem if I install another larger HDD in the case I'm using and another simply won't fit).

The version of GPLPV is the very latest I could find (.369 as opposed to .356 or .357) and appears to be signed. It seems to run a lot smoother and didn't cause a problem with Win 8 activation.
Quote:
Originally Posted by powerhouse View Post

Several minutes boot time is a lot! My rig takes about 35 sec. cold boot into Linux Mint 13 dom0, then another 30 sec. to load Windows 7 from the moment I press the launcher.

Yes. 2 or 3 minutes (after Mint boots) is very slow for Win 8. I'm still trying to solve this.
Quote:
Originally Posted by dizzy4 View Post

I had to do the same thing with Microsoft over the ohone on friday because of GPLPV drivers.

Have you tried the .369? It seems to not cause the activation headaches I had with .357.
post #472 of 778
@powerhouse
Would you be up to putting together a dedicated website/forum for this kind of discussion?

Synergy actually copies the clipboard across the Linux and Windows hosts for me.

/etc/synergy.conf
Code:
section: screens
linux:
windows:
end

section: aliases
windows:
Josh-PC
linux:
josh-fedora
end

section: links
linux:
right = windows
windows:
left = linux
end

section: options
screenSaverSync = false
relativeMouseMoves = true
# My KVM uses Scroll Lock to switch screens, so set the
# hotkey to lock the cursor to the screen to something else
keystroke(f12) = lockCursorToScreen(toggle)
end

win7.cfg
A few notes about this. I'm using LVM to manage the partitioning. I have the LV /dev/passport/cleaninstall as the default installation with the ATI drivers, USB and synergy drivers installed. /dev/passport/win7 is a snapshot of cleaninstall. If windows stops working (which it does for me, every few months) I can delete the /dev/passport/win7 snapshot and create a new snapshot from cleaninstall. No more reinstalling through VNC smile.gif
/dev/passport/persistent is a secondary drive in the VM, where steam and all my games are reinstalled. Since my internet connections is useless, in the event that I delete the snapshot, I don't have to redownload all the games.
Code:
kernel = "hvmloader"
builder='hvm'
memory = 4096
name = "win7"
vcpus=2
pae=1
acpi=1
apic=1
vif = [ 'bridge=br0' ]
disk = [ 'phy:/dev/cdrom,hdc:cdrom,r', 'phy:/dev/passport/win7,hda,w', 'phy:/dev/passport/persistent,hdb,w' ]
device_model = 'qemu-dm'
boot="dc"
sdl=0
opengl=1
serial='pty'
tsc_mode=0
soundhw='all'


vnc=1
vncpasswd=''
usb=1
usbdevice='tablet' # fixes the cursor offset in a VNC session

#graphic card only
pci=[ '01:00.0', '01:00.1' ]

# use the command usb-devices to find USB BUS PCI
#pci=[ '01:00.0', '01:00.1', '00:14.0' ]

# usb only
#pci=[ '00:14.0' ]

Networking
I'm not using libvirtd ... it doesn't do anything that xm create, shutdown, destroy and xm top can't do. Plus the default NAT network configuration, as you have witnessed, is poor.
I setup a bridge network. First disable the NetworkManager service, since it doesn't support network bridging through the GUI yet. Tutorial to setup the bridge: http://www.virtpanel.com/docs-virtualbox-installation-centos/

Sound
I did check out pulseaudio, but it doesn't seem to support windows very well. People who have it working then report problems with a delay in the audio being received. Not good for gaming.
Did you passthrough the PCI of the USB hub, or did it work using the Xen USB emulation for the device?
I would like to avoid passing through the entire USB hub, because my system only has 2 and i'm thinking replacing my HTPC using another VM and GPU on my second PCI-E slot.
Edited by BulliteShot - 1/17/13 at 5:17am
post #473 of 778
So, I'm back. tongue.gif

I recently acquired a Nvidia GT 640. I planned on using it on my Host (LM14) to play Steam on Linux games, however I've run into some issues. If I boot into xen with the card and no proprietary drivers, I can get into LM though Cinnamon crashes. If I install the drivers and setup my xorg, I just get a black screen on startup though I lose no video signal (it's just a black screen). I also can't switch to another TTY either.
The card and drivers however do work absolutely fine when not booting with Xen, so I've narrowed down the problem slightly.

Any ideas on what to do?
Old Faithful
(8 items)
 
   
CPUMotherboardGraphicsRAM
Intel i5-3570 Asrock Pro3 Z77 Asus 7850 2GB Corsair Vengeance x2 
Hard DriveOSPowerCase
Western Digital Cavalier Black Adonis Linux APEVIA ATX-AS680W-BL 680W  Zalman Z11 
CPUMotherboardGraphicsRAM
Intel i5-480M OEM Acer Nvidia GeForce GT 540M 4 GB DDR3 
Hard DriveOptical DriveOS
500 GB HDD DVD Drive Crunchbang Linux, Windows 7, BlackBuntu (triple... 
  hide details  
Reply
Old Faithful
(8 items)
 
   
CPUMotherboardGraphicsRAM
Intel i5-3570 Asrock Pro3 Z77 Asus 7850 2GB Corsair Vengeance x2 
Hard DriveOSPowerCase
Western Digital Cavalier Black Adonis Linux APEVIA ATX-AS680W-BL 680W  Zalman Z11 
CPUMotherboardGraphicsRAM
Intel i5-480M OEM Acer Nvidia GeForce GT 540M 4 GB DDR3 
Hard DriveOptical DriveOS
500 GB HDD DVD Drive Crunchbang Linux, Windows 7, BlackBuntu (triple... 
  hide details  
Reply
post #474 of 778
@ BulliteShot:

1. Dedicated forum: I'm still in the process of learning about this and there are more qualified people around here. On the other hand, I try to share as much as I can since I know how hard it can be sometimes to find information. Maybe one day I will open a forum.

2. Synergy: Yes, copying worked for me too. Thanks for the synergy config file! I vaguely remember something about an "elevate" option, but couldn't make it work.

3. win.cfg: Thanks for sharing your config file. Did you write the comment on using "usb-devices" to find the PCIs for the USB? It took me a while to figure that out.

You say your Windows crashes every couple of months. Was that prior to using a snapshot? Because I wouldn't be surprised that this happens when you use a snapshot. When doing a snapshot, the original LV is frozen and no changes are applied to it. Instead any changes to the files/folders are written to the snapshot. Depending on how large of a snapshot (snapshot size) you create, it probably will fill up eventually. When it does fill up, LVM automatically discards the snapshot which could crash Windows.

It's an interesting concept to use a snapshot as the regular Windows VM disk. I on the other hand use snapshots to create backups. After major changes to the Windows VM (installation of software, major Windows updates, etc.) I backup the Windows LV (using snapshot). I always keep the last 2 backups, plus a backup of the original installation. The same goes for Linux. Here is my backup script for the Windows VM:
Code:
#!/bin/sh
mv /media/tmp_stripe/lm13-win7.img /media/tmp_stripe/lm13-win7.img.old
lvcreate --size 10G --snapshot -n win7-snap /dev/lm13/win7
echo Creating backup copy of win7...
pv /dev/mapper/lm13-win7-snap | dd of=/media/tmp_stripe/lm13-win7.img
lvremove /dev/lm13/win7-snap
echo Finished

4. Networking: I too disabled the network manager (actually, I removed it I believe) and created a bridge configuration in the /etc/network/interfaces file. I don't see libvirtd running on my machine. I tried several things but nothing really fixed the issues, although I managed to improve Samba file transfer speed a little bit. I will check the link you posted.

5. Sound: I passed through a USB host (got plenty of them) and never tried a Xen emulated USB device. I suppose you get only 2 lines when running "lspci | grep -i usb". You may want to install a sound PCI card and pass that thru, if you have a spare slot. My gut feeling is that using an emulated USB for sound isn't a good idea. Again, I didn't try it and $4-5 for a USB sound stick is not a lot of money.
post #475 of 778
Quote:
Originally Posted by nyxcharon View Post

So, I'm back. tongue.gif

I recently acquired a Nvidia GT 640. I planned on using it on my Host (LM14) to play Steam on Linux games, however I've run into some issues. If I boot into xen with the card and no proprietary drivers, I can get into LM though Cinnamon crashes. If I install the drivers and setup my xorg, I just get a black screen on startup though I lose no video signal (it's just a black screen). I also can't switch to another TTY either.
The card and drivers however do work absolutely fine when not booting with Xen, so I've narrowed down the problem slightly.

Any ideas on what to do?

Sounds familiar to me. I had the same issues with using a Nvidia card with proprietary driver under LM13 Mate. Booting a normal LM kernel worked fine with the Nvidia driver.

Did you install the Nvidia driver while running Xen?

By the way, I didn't have these issues with the proprietary ATI/catalyst driver.
post #476 of 778
@powerhouse
I don't want a USB sound device. I can't find one that doesn't have reports of poor sound quality.
My GPU seems to support Audio over HDMI. I have been searching around for devices which extract the audio from a HDMI cable, but could only find devices in the region of €300+
I found this though, which I am going to try: eBay Item
It converts the HDMI to VGA while extracting the audio for only €15. My monitor supports both VGA and DVI and I personally don't see the difference between the two running at 1920x1080 resolution.

Yes, I found out that the usb-devices lists the PCI device ID of the USB hub through a quick google search. lsusb only seems to list the attached USB devices.

When I say windows stops working, I mean it just breaks. It's little things like a certain game won't start, and the only thing to fix it is a fresh install of windows. My most recent problem with windows was when triple clicking on a word in Chrome wouldn't select the entire paragraph. I could only fix it with a reinstall. (which was what made me switch to linux for my primary OS)
post #477 of 778
@ powerhouse
Quote:
@ nbhusain: Interesting approach. I have some questions.

1. Was there a reason for choosing UEFI DUET boot? Faster Windows boot?

2. Does UEFI DUET boot only work when directly booting from disk (AHCI)?

3. How about disk performance of the passed-thru disk(s) (AHCI)? Is it faster than the regular LVM based disk access, using the GPLPV drivers? N.B.: As far as I have seen, the GPLPV drivers (under Windows 7) greatly affect disk I/O speed.

4. You say you boot Xen and afterwards Windows? Though I know that dom0 is nothing but a privileged VM, don't you need to run the dom0 (Linux) to start a domU (Windows)? I'm a bit confused.

5. Do you care to share the Windows cfg file?

Forgive me for asking so many questions, but it's the first time I read about this option. And thanks for sharing this info.

1)

My idea was to create 2 different VM's both capable of gaming/multimedia without affecting eachother under load, so my dom0 is my primary Linux desktop using gnome and 2 usb controllers, and my windows domU is my secondary desktop with 2 other usb controllers, and 1 sata controller, i chose DUET because i wanted to boot windows directly from an ahci disk instead of lvm/file/blktap, i also tried to load the option rom for the sata controller directly from hvmloader but it messes up the boot table on rombios, my setup is like this:

Dom0
  • 2 pinned cpus
  • 3850MB ram
  • 2 usb controller
  • 1 sata controller (asmedia ASM1062 integrated)
  • RADEON 5450 primary
  • Internal audio

my grub.cfg file:
Code:
        multiboot /xen-4.1.4.gz  xsave=1 dom0_max_vcpus=2 dom0_vcpus_pin noselfballooning  dom0_mem=3850M  cpuidle
        module   /vmlinuz-linux root=/dev/mapper/vg0-root ro xen-pciback.permissive xen-pciback.hide=(00:11.0)(00:16.0)(00:16.2)(04:00.0)(05:00.0)(06:00.0)(07:00.0)(07:00.1) 
        module  /initramfs-linux.img

DomU
  • 6 pinned cpus
  • 8GB ram
  • 1 usb3 controller and 1 usb2 controller
  • 1 sata controller (amd sb integrated)
  • RADEON 6950 secondary (primary on guest OS)
  • usb audio

my domU cfg:
Code:
kernel = "hvmloader"
builder='hvm'
memory = 8192
name = "hvm"
cpus = [ "2", "3", "4", "5", "6", "7" ]
vcpus = 6
localtime = 1
vif = [ 'bridge=br0' ]
disk = [ 'file:/root/xen/img/duet.img,xvda,w' ]
pci_msitranslate=0
gfx_passthru=1
pci_power_mgmt=1
viridian=1
acpi_s3=1
acpi_s4=1
hpet=1
xen_platform_pci = 1
pci = [ '0000:07:00.*', '00:11.0', '04:00.0', '05:00.0', '06:00.0', '0000:00:16.*', ]

2) No DUET can boot qemu emulated disks and cdroms too, it even boots my native ahci cdrom connected to the controller, since DUET contains efi drivers, it can also boot windows/linux/etc from usb devices connected to the pass-thru controller.

Since its uefi it might be able to boot a hackintosh build but since im using an amd cpu so i didnt even try.
(if u wanna try you might also want to look at Clover bootloader http://sourceforge.net/projects/cloverefiboot/)

3) Yes, its faster as it completly bypasses the dom0 and gplpv drivers, i do not pass the the real disk to the vm only the duet image.

4) No, windows boots like any other vm except it boots directly from the sata controller instead of the qemu emulated one. Xen creates the vm then it boots DUET from the qemu emulated disk, then DUET loads the ahci drives and finds \EFI\boot\bootx64.efi from the native ahci drive and boots from it.

I hope this answers your questions.

EDIT: Attached are some screenshots of the boot process






Edited by nbhusain - 1/17/13 at 12:52pm
post #478 of 778
I'd also like to point that seabios (kvm, xen-4.3-unstable) also containts ahci "drivers" so you can boot directly from a native controller without the need of a qemu emulated controller and/or gplpv drivers (and snd-hda-intel for audio passthrough) but unfortunately kvm doesnt allow you to reserve cpus for the "dom0" and xen-4.3-unstable is too buggy at this point. Also since both use the new qemu (1.3.0 atm) none of them support vga pasthrough as a primary device tho you can pass them as secondary. Work is being done to support this using vfio-pci but unfortunately its wip atm and not usable at all
http://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg00959.html
post #479 of 778
Wow, great guide Dizzy4! It's about time for a better solution than Dual Booting, Wine, or paid version of Wine.

Quick question, has the guide been edited to your most recent version?
post #480 of 778
Quote:
Originally Posted by powerhouse View Post

Sounds familiar to me. I had the same issues with using a Nvidia card with proprietary driver under LM13 Mate. Booting a normal LM kernel worked fine with the Nvidia driver.

Did you install the Nvidia driver while running Xen?

By the way, I didn't have these issues with the proprietary ATI/catalyst driver.

I did indeed install the driver while running Xen. Not sure how to go about troubleshooting this, since all I get is a black screen and I can't find anything in my logs. mad.gif
Old Faithful
(8 items)
 
   
CPUMotherboardGraphicsRAM
Intel i5-3570 Asrock Pro3 Z77 Asus 7850 2GB Corsair Vengeance x2 
Hard DriveOSPowerCase
Western Digital Cavalier Black Adonis Linux APEVIA ATX-AS680W-BL 680W  Zalman Z11 
CPUMotherboardGraphicsRAM
Intel i5-480M OEM Acer Nvidia GeForce GT 540M 4 GB DDR3 
Hard DriveOptical DriveOS
500 GB HDD DVD Drive Crunchbang Linux, Windows 7, BlackBuntu (triple... 
  hide details  
Reply
Old Faithful
(8 items)
 
   
CPUMotherboardGraphicsRAM
Intel i5-3570 Asrock Pro3 Z77 Asus 7850 2GB Corsair Vengeance x2 
Hard DriveOSPowerCase
Western Digital Cavalier Black Adonis Linux APEVIA ATX-AS680W-BL 680W  Zalman Z11 
CPUMotherboardGraphicsRAM
Intel i5-480M OEM Acer Nvidia GeForce GT 540M 4 GB DDR3 
Hard DriveOptical DriveOS
500 GB HDD DVD Drive Crunchbang Linux, Windows 7, BlackBuntu (triple... 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Operating Systems
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › {Guide} Create a Gaming Virtual Machine