#import os, re #arch = os.uname()[4] #if re.search('64', arch): # arch_libdir = 'lib64' #else: # arch_libdir = 'lib' #device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm' #device_model = '/usr/lib/xen-4.4/bin/qemu-dm' ### Domain name name="w7a" # 128-bit UUID for the domain. The default behavior is to generate a new UUID # on each call to 'xm create'. #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9" builder="hvm" # Kernel image file #kernel = "/usr/lib/xen-4.4/boot/hvmloader" # The number of cpus guest platform has, default=1 vcpus=2 # List of which CPUS this domain is allowed to use, default Xen picks #cpus = "" # leave to Xen to pick #cpus = "0" # all vcpus run on CPU0 #cpus = "0-3,5,^1" # run on cpus 0,2,3,5 memory="2048" # Enable/disable HVM guest PAE, default=1 (enabled) #pae=1 # Enable/disable HVM guest ACPI, default=1 (enabled) acpi = 1 # Enable/disable HVM APIC mode, default=1 (enabled) # Note that this option is ignored if vcpus > 1 apic = 1 # Shadow pagetable memory for the domain, in MB. # If not explicictly set, xend will pick an appropriate value. # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu. #shadow_memory = 8 ### Disks disk = [ 'file:/xenvirt/vm/w7a/disk.img,ioemu:hda,w', 'file:/xenvirt/iso/win7-sp1-x64.iso,ioemu:hdc:cdrom,r', ] #disk = [ # 'file:/guest/myvm/disk.img,ioemu:hda,w', # 'file:/guest/myvm/os-cd.iso,ioemu:hdc:cdrom,r', #] # 'phy:/dev/cdrom,hdc:cdrom,r' # 'phy:/dev/sdb11,hda,w' # 'file:/path/xxx.img,hda,w' # Disk spec: http://xenbits.xen.org/docs/4.3-testing/misc/xl-disk-configuration.txt # write to temporary files instead of disk image files #snapshot=1 # serial port re-direct to pty deivce, /dev/pts/n # then xm console or minicom can connect serial='pty' # Enable USB mouse support (only enable one of the following, `mouse' for # PS/2 protocol relative mouse, `tablet' for # absolute mouse) usbdevice='mouse' #usbdevice='tablet' # Optionally define mac and/or bridge for the network interfaces. # Random MACs are assigned if not given. # type=ioemu specify the NIC is an ioemu device not netfront #vif = [ 'type=ioemu, ip=192.168.1.210, mac=00:26:B9:48:74:d9, bridge=virbr0 , model=ne2k_pci' ] vif = [ 'type=ioemu, ip=192.168.1.210, mac=00:26:B9:48:74:d9, bridge=virbr0' ] #vif = [ # 'type=ioemu, mac=00:16:3e:09:f0:12, bridge=virbr0', # 'type=ioemu, mac=00:16:3e:09:f0:13, bridge=virbr1' #] ### Networking: use default parameters and DHCP #vif = [ '' ] #dhcp = "dhcp" ### Behavior # Enable VNC or SDL libraries for graphics # SDL is faster, but local only and closing screen terminates the domain # Default: sdl=0, vnc=1 sdl=1 vnc=0 #sdl=0 #vnc=1 # enable spawning vncviewer for domain's console # (only valid when vnc=1), default = 0 #vncconsole=1 # set password for domain's VNC console # default is depents on vncpasswd in xend-config.sxp vncpasswd='abc' # try to find an unused port for the VNC server, default = 1 #vncunused=1 # don't automatically assign unused port based on domain id vncunused=0 # VNC display number, i.e. port number to be added to "5900" # e.g.: vncdisplay=2 => port=5902 # vncdisplay=30 => port 5930 # default = domid # connect as vncviewer host:2 (not host:5902) vncdisplay=2 # address that should be listened on for the VNC server if vnc is set. # default is to use 'vnc-listen' setting from /etc/xen/xend-config.sxp #vnclisten="127.0.0.1" # no graphics, use serial port #nographic=0 # enable stdvga, default = 0 (0 = use Cirrus Logic device model) stdvga=1 videoram=16 # upto 2048x1536x32 ### Boot #boot='a' # boot from floppy boot='c' # boot from HDD #boot='d' # boot from CD #boot='dc' # boot from CD + HDD # Qemu Monitor, default is disable # Use ctrl-alt-2 to connect #monitor=1 # start in full screen #full-screen=1 # enable sound card support, [sb16|es1370|all|..,..], default none #soundhw='sb16' # set the real time clock to local time [default=0 i.e. set to utc] #localtime=1 # set the real time clock offset in seconds [default=0 i.e. same as dom0] #rtc_timeoffset=3600 # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # # on_poweroff = 'destroy' # on_reboot = 'restart' # on_crash = 'restart' #on_poweroff=preserve