Advertisement
Guest User

Xen Windows DomU

a guest
May 12th, 2012
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. My Xen DomU Windows Configuration File passes two USB 2.0 Controllers and my ATI Graphics card for Secondary VGA Passthrough:
  2.  
  3. cdelorme@xen:~/hvm$ cat windows
  4. name='windows'
  5. builder='hvm'
  6. vcpus=4
  7. memory=6144
  8. disk=[
  9. '/dev/xen/windows,,hda,w',
  10. '/dev/nas/software,,sda,w',
  11. '/dev/nas/media,,sdb,w',
  12. '/dev/nas/special,,sdc,w',
  13. '/dev/nas/dumpbox,,sdd,w',
  14. '/dev/nas/family,,sde,w'
  15. ]
  16. vif=['bridge=xenbr0,model=e1000,mac=5a:50:a3:14:b1:1c']
  17. pci=['01:00.0','01:00.1','00:1a.0','00:1d.0']
  18. boot='c'
  19. pae=1
  20. nx=1
  21. nestedhvm=1
  22. viridian=1
  23. videoram=16
  24. stdvga=1
  25. vnc=1
  26. vnclisten='0.0.0.0:10'
  27. vncpasswd=''
  28. usb=1
  29. usbdevice='tablet'
  30.  
  31.  
  32.  
  33. I am using Debian Wheezy for my DomU, and I use a DomU PFSense for my network, with Dom0 and my other machines inside the network. My interfaces file has two bridges:
  34.  
  35. cdelorme@xen:~/hvm$ cat /etc/network/interfaces
  36. auto lo xenbr0 xenbr1
  37. iface lo inet loopback
  38. iface eth0 inet manual
  39. iface eth1 inet manual
  40. iface xenbr0 inet static
  41. bridge_ports eth1
  42. address 10.0.0.2
  43. netmask 255.255.255.224
  44. gateway 10.0.0.1
  45. dns-nameservers 10.0.0.1
  46. iface xenbr1 inet manual
  47. bridge_ports eth0
  48.  
  49.  
  50.  
  51. I compiled a custom Linux Kernel to embed Xen-PCIBack among various other modules. This way I can pass devices from the Grub configuration, it was easier than it sounds. Here is my GRUB entry (/boot/grub/grub.cfg) for Xen:
  52.  
  53. menuentry 'Debian GNU/Linux, with Xen 4.2-unstable and Linux 3.3.3' --class debian --class gnu-linux --class gnu --class os --class xen {
  54. insmod part_gpt
  55. insmod ext2
  56. set root='(hd0,gpt2)'
  57. search --no-floppy --fs-uuid --set=root 1229b41c-108e-4e26-a78b-3a958e9acc2b
  58. echo 'Loading Xen 4.2-unstable ...'
  59. multiboot /xen-4.2-unstable.gz placeholder
  60. echo 'Loading Linux 3.3.3 ...'
  61. module /vmlinuz-3.3.3 placeholder root=/dev/mapper/xen-linux ro quiet xen-pciback.hide=(01:00.0)(01:00.1)(00:1a.0)(00:1d.0)
  62. echo 'Loading initial ramdisk ...'
  63. module /initrd.img-3.3.3
  64. }
  65. menuentry 'Debian GNU/Linux, with Xen 4.2-unstable and Linux 3.3.3 (recovery mode)' --class debian --class gnu-linux --class gnu --class os --class xen {
  66. insmod part_gpt
  67. insmod ext2
  68. set root='(hd0,gpt2)'
  69. search --no-floppy --fs-uuid --set=root 1229b41c-108e-4e26-a78b-3a958e9acc2b
  70. echo 'Loading Xen 4.2-unstable ...'
  71. multiboot /xen-4.2-unstable.gz placeholder
  72. echo 'Loading Linux 3.3.3 ...'
  73. module /vmlinuz-3.3.3 placeholder root=/dev/mapper/xen-linux ro single
  74. echo 'Loading initial ramdisk ...'
  75. module /initrd.img-3.3.3
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement