Skip to content

Instantly share code, notes, and snippets.

@liuexp
liuexp / xl.log
Created November 2, 2012 16:46
libxl__device_pci_reset
Waiting for domain win8a (domid 3) to die [pid 2097]
Domain 3 has shut down, reason code 0 0x0
Action for shutdown reason code 0 is destroy
Domain 3 needs to be cleaned up: destroying the domain
libxl: error: libxl_pci.c:1001:libxl__device_pci_reset: The kernel doesn't support reset from sysfs for PCI device 0000:04:00.0
libxl: error: libxl_pci.c:1001:libxl__device_pci_reset: The kernel doesn't support reset from sysfs for PCI device 0000:04:00.1
Done. Exiting now
@liuexp
liuexp / xen-init.sh
Created November 2, 2012 16:43
xen-network init
#!/bin/sh
#network
rc.d stop networkmanager
rc.d start network
brctl addbr xenbr0
brctl addif xenbr0 eth0
dhclient xenbr0
rc.d restart network
@liuexp
liuexp / gist:4002524
Created November 2, 2012 16:39
mem range for NVIDIA card
[liuexp@workstation xen]$ dmesg | grep 03:00.0 | grep "pci.*mem"
[ 0.856888] pci 0000:03:00.0: reg 10: [mem 0xf6000000-0xf6ffffff]
[ 0.856898] pci 0000:03:00.0: reg 14: [mem 0xd8000000-0xdfffffff 64bit pref]
[ 0.856908] pci 0000:03:00.0: reg 1c: [mem 0xe0000000-0xe1ffffff 64bit pref]
[ 0.856922] pci 0000:03:00.0: reg 30: [mem 0xf7e00000-0xf7e7ffff pref]
[liuexp@workstation xen]$ dmesg | grep 04:00.0 | grep "pci.*mem"
[ 0.866798] pci 0000:04:00.0: reg 10: [mem 0xf4000000-0xf5ffffff]
[ 0.866809] pci 0000:04:00.0: reg 14: [mem 0xe8000000-0xefffffff 64bit pref]
[ 0.866820] pci 0000:04:00.0: reg 1c: [mem 0xe4000000-0xe7ffffff 64bit pref]
[ 0.866834] pci 0000:04:00.0: reg 30: [mem 0xf3f00000-0xf3f7ffff pref]
@liuexp
liuexp / win7a.cfg
Created November 1, 2012 15:39
xen-win7a
builder='hvm'
memory = 8192
shadow_memory = 1024
name = "win7a"
vcpus='5'
vif = [ 'bridge=xenbr0,type=ioemu' ]
disk = [
'phy:/dev/vg0/win7,xvda,w', 'phy:/dev/sr0,xvdc:cdrom,r',
]
boot="cd"
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module MyMonad ( MyMonad
, runMyMonad
, indentMessages
, debug
, info
, trace
, warning
, finally
, throwError
[liuexp@liuexp virthualenv]$ cabal install
Resolving dependencies...
Configuring virthualenv-0.2.1...
Building virthualenv-0.2.1...
Preprocessing executable 'virthualenv' for virthualenv-0.2.1...
[ 6 of 13] Compiling MyMonad ( src/MyMonad.hs, dist/build/virthualenv/virthualenv-tmp/MyMonad.o )
src/MyMonad.hs:37:49:
No instance for (Exception a0) arising from a use of `catch'
The type variable `a0' is ambiguous