February 4, 201412 yr Thanks anyway! Its late here, so I'll give it a rest for tonight. Yes, that was just a copying error. Thanks for your help though
February 5, 201412 yr A question for those who have tried setting up a Windows VM under Xen in unRAID 6. Is it possible to use a screen directly attached to the uNRAID box from a VM that is running Windows for displaying the Windows desktop? This could be the screen that would usually act as a console, or alternatively a different physical screen attached to the same machine as the graphics card is multi-screen capable. I am thinking of a use case where I might auto start a Windows VM on the unRAID machine and then from within the VM telnet back to unRAID if I want console access. The rational for this approach would be to avoid the need to have a separate PC to run Windows at the location where the unRAID machine is located - just beef up the memory/RAM of the unRAID machine to allow for the overhead of running this Windows VM. A different approach would be to have a full Slackware install that is running unRAID to provide a GUI environment, and is something I have done with earlier releases of unRAID However if that is not required I would rather run unRAID as provided out-of-the-box.
February 5, 201412 yr A question for those who have tried setting up a Windows VM under Xen in unRAID 6. Is it possible to use a screen directly attached to the uNRAID box from a VM that is running Windows for displaying the Windows desktop? This could be the screen that would usually act as a console, or alternatively a different physical screen attached to the same machine as the graphics card is multi-screen capable. I am thinking of a use case where I might auto start a Windows VM on the unRAID machine and then from within the VM telnet back to unRAID if I want console access. The rational for this approach would be to avoid the need to have a separate PC to run Windows at the location where the unRAID machine is located - just beef up the memory/RAM of the unRAID machine to allow for the overhead of running this Windows VM. A different approach would be to have a full Slackware install that is running unRAID to provide a GUI environment, and is something I have done with earlier releases of unRAID However if that is not required I would rather run unRAID as provided out-of-the-box. Hi You're describing VGA passthrough - setting your VM up to have direct access to a graphics card in the host machine. This works great but there are a few gotchas; -The graphics card is assigned exclusively to the VM and cannot be used to access the host/unraid console (though you've described above how you'd get around this, essentially making your unRAID run headless. -This works better with AMD cards, nVidia cards are problematic -Depending on your version of windows, there can be issues with restarting / upgrading. There are workarounds. There's a thread here which discusses this and links through to a blog post I wrote describing how to set this up. It may seem complex but it's pretty straightforward in reality. http://lime-technology.com/forum/index.php?topic=31682.0 Peter
February 5, 201412 yr You're describing VGA passthrough - setting your VM up to have direct access to a graphics card in the host machine. I thought that it might be possible but I was not sure. In the location where the unRAID server is placed I have an old 32-bit PC running Windows 7 that is on its last legs. It is rarely used so I was hoping I could get the functionality it provides without having to replace it. This works great but there are a few gotchas; -The graphics card is assigned exclusively to the VM and cannot be used to access the host/unraid console (though you've described above how you'd get around this, essentially making your unRAID run headless. That is fine. I normally run in headless mode anyway. In the case I really need the console I should be able to just avoid starting the VM that grabs the screen. -This works better with AMD cards, nVidia cards are problematic The unRAID server has an AMD A8-3870 APU processor with integrated graphics which it sounds as if it will work OK. Certainly far more powerful than the base unRAID functionality requires -Depending on your version of windows, there can be issues with restarting / upgrading. There are workarounds. There's a thread here which discusses this and links through to a blog post I wrote describing how to set this up. It may seem complex but it's pretty straightforward in reality. http://lime-technology.com/forum/index.php?topic=31682.0 That all looks good. I guess it is now time for me to go ahead and actually try it! Thanks for the feedback.
February 5, 201412 yr I tried this using: xl create /mnt/disk1/win7.cfg win7.cfg Config file looks like: name="Windows7" kernel = 'hvmloader' builder="hvm" vcpus=2 memory=2048 disk = ['file:/mnt/disk1/Windows.img,hda,w' , 'file:/mnt/disk1/7_X64.iso,hdc:cdrom,r'] vif = [ 'mac=00:16:3e:01:01:02,bridge=xenbr0' ] #<--- Every MAC Address has to start with 00:16:3e the rest you can customize. # boot=[c|d|n] # Selects the emulated virtual device to boot from. Options are hard disk ©, cd-rom (d) or network/PXE (n). # Multiple options can be given and will be attempted in the order they are given. e.g. to boot from cd-rom but fallback to the hard disk you can give dc. The default is cd. boot="dc" acpi = '1' apic = '1' viridian = '1' xen_platform_pci='1' sdl = '0' vnc = '1' vnclisten = '0.0.0.0' vncpasswd = '' usb = '1' usbdevice = 'tablet' on_poweroff="destroy" on_reboot="restart" on_crash="destroy" # Enable Xen VGA Passthrough gfx_passthru=1 # VGA Passthrough Palit NVIDIA Geforce 8400 GS PCI Express x16 VGA card. pci = [ '01:00.0','00:1b.0' ] # PCI Passthrough Intel HD Audio Controller. #pci = [ '00:1b.0' ] # PCI Passthrough all the USB Controllers. # pci = [ '00:1a.0','00:1a.1','00:1a.2','00:1a.7','00:1d.0','00:1d.1','00:1d.2','00:1d.7' ] I get the following error: Parsing config from /mnt/disk1/win7.cfg WARNING: ignoring "kernel" directive for HVM guest. Use "firmware_override" instead if you really want a non-default firmware xc: info: VIRTUAL MEMORY ARRANGEMENT: Loader: 0000000000100000->000000000019ec84 Modules: 0000000000000000->0000000000000000 TOTAL: 0000000000000000->000000007f800000 ENTRY ADDRESS: 0000000000100000 xc: info: PHYSICAL MEMORY ALLOCATION: 4KB PAGES: 0x0000000000000200 2MB PAGES: 0x00000000000003fb 1GB PAGES: 0x0000000000000000 libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [11969] exited with error status 1 libxl: error: libxl_device.c:1021:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0 libxl: error: libxl_create.c:1115:domcreate_attach_vtpms: unable to add nic devices libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge offline [12003] exited with error status 1 libxl: error: libxl_device.c:1021:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0 libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge remove [12042] exited with error status 1 libxl: error: libxl_device.c:1021:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0 I created the .cfg file with vi created image file using: truncate -s 30G Windows.img Any help would be greatly appreciated. Thanks!
February 5, 201412 yr This works great but there are a few gotchas; -The graphics card is assigned exclusively to the VM and cannot be used to access the host/unraid console (though you've described above how you'd get around this, essentially making your unRAID run headless. That is fine. I normally run in headless mode anyway. In the case I really need the console I should be able to just avoid starting the VM that grabs the screen. -This works better with AMD cards, nVidia cards are problematic The unRAID server has an AMD A8-3870 APU processor with integrated graphics which it sounds as if it will work OK. Certainly far more powerful than the base unRAID functionality requires You can't grab the console before starting the VM. It's unavailable to you before the VM 'grabs' it. The first step in the process is to 'hide' the graphics card from Xen during boot. So from early in the boot process, there's no display from the unRAID console. Also, I'm not sure of integrated graphics can be passed through. I *think* it's restricted to discrete cards only (but am open to correction) What most people do is use the integrated graphics for Don0 display (in this case, unRAID) and have discrete graphics for passthrough. That way, all available graphics are maximised. I can't test this, unfortunately, as I don't have IDG on my current motherboard.
February 5, 201412 yr You can't grab the console before starting the VM. It's unavailable to you before the VM 'grabs' it. The first step in the process is to 'hide' the graphics card from Xen during boot. So from early in the boot process, there's no display from the unRAID console. I have already resolved this issue by having appropriate entries in the syslinux.cfg - one which grabs the video card for xen and one which does not. Also, I'm not sure of integrated graphics can be passed through. I *think* it's restricted to discrete cards only (but am open to correction) I guess it is time to see if this works then. The integrated graphics looks like a Radeon card so there is a chance that it may. I am in the process of setting up a Windows 7 VM (initially accessing it via VNC/RDP) but once it is running I will see if I an pass in the integrated graphics. Time to experiment What most people do is use the integrated graphics for Don0 display (in this case, unRAID) and have discrete graphics for passthrough. That way, all available graphics are maximised. If necessary I could add a separate graphics card. However since AMD have now integrated the Radeon graphics capability into their APU it would be shame not to use that capability if at all possible.
February 5, 201412 yr changed: vif = [ 'mac=00:16:3e:01:01:02,bridge=xenbr0' ] to: vif = [ 'mac=00:16:3e:01:01:02,bridge=br0' ] Got a response: Daemon running with PID 2085 Edit: Working now...... Cool stuff.
February 5, 201412 yr Just to follow up with my error above, I had a typo in vnclisten = '0,0,0,0' Spot the commas.......... Now to connect to it via VNC
February 18, 201412 yr Some of you seem to be successful in building the Windows VM. I still have difficulties. The error messages are similar to those of j5428 and I checked the cfg file again and again but I can't see the mistake. Maybe someone is more successful in identifying what's wrong with my setup (I also checked the WebGUI bridge settings and I have br0 defined). root@Tower:/mnt/user/Win7# xl create windows.cfg -c Parsing config from windows.cfg WARNING: ignoring "kernel" directive for HVM guest. Use "firmware_override" instead if you really want a non-default firmware libxl: notice: libxl_numa.c:491:libxl__get_numa_candidate: NUMA placement failed, performance might be affected xc: info: VIRTUAL MEMORY ARRANGEMENT: Loader: 0000000000100000->000000000019ec84 Modules: 0000000000000000->0000000000000000 TOTAL: 0000000000000000->00000000ff800000 ENTRY ADDRESS: 0000000000100000 xc: error: Could not allocate memory for HVM guest. (16 = Device or resource busy): Internal error libxl: error: libxl_dom.c:620:libxl__build_hvm: hvm building failed libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 libxl: error: libxl_dm.c:1300:libxl__destroy_device_model: could not find device-model's pid for dom 5 libxl: error: libxl.c:1416:libxl__destroy_domid: libxl__destroy_device_model failed for 5 root@Tower:/mnt/cache/Win7# cat windows.cfg # Documentation for the settings is here: http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html name = 'windows' kernel = 'hvmloader' builder = 'hvm' vcpus = '4' memory = '4096' device_model_version="qemu-xen-traditional" disk = ['file:/mnt/cache/Win7/windows.img,hda,w' , 'file:/mnt/cache/Win7/windows.iso,hdc:cdrom,r'] vif = [ 'mac=00:16:3E:51:20:4C,bridge=br0' ] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' boot = 'dc' acpi = '1' apic = '1' viridian = '1' xen_platform_pci='1' sdl = '0' vnc = '1' vnclisten = '0.0.0.0' vncpasswd = '' stdvga = '0' usb = '1' usbdevice = 'tablet' root@Tower:/mnt/cache/Win7# ls -ali total 2438585 29 drwxrwxrwx 2 nobody users 144 Feb 17 17:06 ./ 2 drwxrwxrwx 9 nobody users 224 Feb 17 22:13 ../ 74 -rw-r--r-- 1 root root 605 Feb 17 17:06 windows.cfg 73 -rw-rw-rw- 1 root root 32212254720 Feb 17 16:52 windows.img 4 -rwxrwxrwx 1 oliver users 2463242240 Dec 22 00:05 windows.iso*
February 18, 201412 yr You can't console into windows so drop the -c, you also don't need hvmloader and hvm. Either or I think. If you're not doing PCI passthrough you don't need qemu traditional line. Have you enough ram free? Sent from my Nexus 5 using Tapatalk
February 18, 201412 yr I have 8GB ram - so this should be enough as I dedicated only 2GB for Arch and 256MB for deb cloud. Adapted the cfg file according to your guidance: # Documentation for the settings is here: http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html name = 'windows' kernel = 'hvmloader' vcpus = '4' memory = '4096' disk = ['file:/mnt/cache/Win7/windows.img,hda,w' , 'file:/mnt/cache/Win7/windows.iso,hdc:cdrom,r'] vif = [ 'mac=00:16:3E:51:20:4C,bridge=br0' ] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' boot = 'dc' acpi = '1' apic = '1' viridian = '1' xen_platform_pci='1' sdl = '0' vnc = '1' vnclisten = '0.0.0.0' vncpasswd = '' stdvga = '0' usb = '1' usbdevice = 'tablet' root@Tower:/mnt/cache/Win7# xl -vvv create windows.cfg Parsing config from windows.cfg libxl: debug: libxl_create.c:1230:do_domain_create: ao 0x629450: create: how=(nil) callback=(nil) poller=0x6300c0 libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=hda spec.backend=unknown libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=hda, backend phy unsuitable as phys path not a block device libxl: debug: libxl_device.c:212:disk_try_backend: Disk vdev=hda, backend tap unsuitable because blktap not available libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=hda, using backend qdisk libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=hdc spec.backend=unknown libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=hdc, backend phy unsuitable as phys path not a block device libxl: debug: libxl_device.c:206:disk_try_backend: Disk vdev=hdc, backend tap unsuitable for cdroms libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=hdc, using backend qdisk libxl: debug: libxl_create.c:675:initiate_domain_create: running bootloader libxl: debug: libxl_bootloader.c:327:libxl__bootloader_run: no bootloader configured, using user supplied kernel libxl: debug: libxl_event.c:608:libxl__ev_xswatch_deregister: watch w=0x62cf68: deregister unregistered libxl: notice: libxl_numa.c:491:libxl__get_numa_candidate: NUMA placement failed, performance might be affected domainbuilder: detail: xc_dom_allocate: cmdline="", features="(null)" libxl: debug: libxl_dom.c:341:libxl__build_pv: pv kernel mapped 0 path hvmloader domainbuilder: detail: xc_dom_kernel_file: filename="hvmloader" domainbuilder: detail: xc_dom_malloc_filemap: failed (on file `hvmloader') libxl: error: libxl_dom.c:353:libxl__build_pv: xc_dom_kernel_file failed: No such file or directory domainbuilder: detail: xc_dom_release: called libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 libxl: debug: libxl_event.c:1569:libxl__ao_complete: ao 0x629450: complete, rc=-3 libxl: debug: libxl_create.c:1243:do_domain_create: ao 0x629450: inprogress: poller=0x6300c0, flags=ic libxl: debug: libxl_event.c:1541:libxl__ao__destroy: ao 0x629450: destroy xc: debug: hypercall buffer: total allocations:122 total releases:122 xc: debug: hypercall buffer: current allocations:0 maximum allocations:4 xc: debug: hypercall buffer: cache current size:4 xc: debug: hypercall buffer: cache hits:114 misses:4 toobig:4
February 18, 201412 yr Author Try reducing the ram to 2 gigs and 1vpc. I dont know all of your specs but you dont have the resources per your first post.
February 18, 201412 yr Thanks pyrater, resources don't seem to be the issue. I have changed the cfg: root@Tower:/mnt/cache/Win7# cat windows.cfg # Documentation for the settings is here: http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html name = 'windows' kernel = 'hvmloader' vcpus = '1' memory = '2048' disk = ['file:/mnt/cache/Win7/windows.img,hda,w' , 'file:/mnt/cache/Win7/windows.iso,hdc:cdrom,r'] vif = [ 'mac=00:16:3E:51:20:4C,bridge=br0' ] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' boot = 'dc' acpi = '1' apic = '1' viridian = '1' xen_platform_pci='1' sdl = '0' vnc = '1' vnclisten = '0.0.0.0' vncpasswd = '' stdvga = '0' usb = '1' usbdevice = 'tablet' Result: libxl: debug: libxl_create.c:1230:do_domain_create: ao 0x629450: create: how=(nil) callback=(nil) poller=0x6300c0 libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=hda spec.backend=unknown libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=hda, backend phy unsuitable as phys path not a block device libxl: debug: libxl_device.c:212:disk_try_backend: Disk vdev=hda, backend tap unsuitable because blktap not available libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=hda, using backend qdisk libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=hdc spec.backend=unknown libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=hdc, backend phy unsuitable as phys path not a block device libxl: debug: libxl_device.c:206:disk_try_backend: Disk vdev=hdc, backend tap unsuitable for cdroms libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=hdc, using backend qdisk libxl: debug: libxl_create.c:675:initiate_domain_create: running bootloader libxl: debug: libxl_bootloader.c:327:libxl__bootloader_run: no bootloader configured, using user supplied kernel libxl: debug: libxl_event.c:608:libxl__ev_xswatch_deregister: watch w=0x62cf68: deregister unregistered libxl: debug: libxl_numa.c:475:libxl__get_numa_candidate: New best NUMA placement candidate found: nr_nodes=1, nr_cpus=8, nr_vcpus=12, free_memkb=3697 libxl: detail: libxl_dom.c:195:numa_place_domain: NUMA placement candidate with 1 nodes, 8 cpus and 3697 KB free selected domainbuilder: detail: xc_dom_allocate: cmdline="", features="(null)" libxl: debug: libxl_dom.c:341:libxl__build_pv: pv kernel mapped 0 path hvmloader domainbuilder: detail: xc_dom_kernel_file: filename="hvmloader" domainbuilder: detail: xc_dom_malloc_filemap: failed (on file `hvmloader') libxl: error: libxl_dom.c:353:libxl__build_pv: xc_dom_kernel_file failed: No such file or directory domainbuilder: detail: xc_dom_release: called libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 libxl: debug: libxl_event.c:1569:libxl__ao_complete: ao 0x629450: complete, rc=-3 libxl: debug: libxl_create.c:1243:do_domain_create: ao 0x629450: inprogress: poller=0x6300c0, flags=ic libxl: debug: libxl_event.c:1541:libxl__ao__destroy: ao 0x629450: destroy xc: debug: hypercall buffer: total allocations:111 total releases:111 xc: debug: hypercall buffer: current allocations:0 maximum allocations:4 xc: debug: hypercall buffer: cache current size:4 xc: debug: hypercall buffer: cache hits:103 misses:4 toobig:4
February 18, 201412 yr Author Can u try it without ['file:/mnt/cache/Win7/windows.img,hda,w' , to see if its related to the data disk. The errors look like its an unsuitable block device.
February 18, 201412 yr That last error is related to a disk problem ... Sent from my Nexus 5 using Tapatalk
February 18, 201412 yr I deleted the ing and was creating a new one: truncate -s 30G Windows.img My cache drive is 250GB, actually there is still 40GB available. Any other ideas?
February 18, 201412 yr Is it a good windows.iso? Try formating the data.img with ntfs That won't help...
February 19, 201412 yr Cache: 2x Samsung SSD 840, 256 GB (RAID 1 in a MR2020-2S enclosure) Is it possible something doesn't like the controller...
February 19, 201412 yr For those wondering I have attempted to use the on board graphics and run unraid headless, (which can be done on xenserver fyi) on the new A series (mine is an A106800k) it DOES NOT pass through correctly. You have to run a second graphics card, I used a HD5450. I did try to get the on board to work after I bought the new card but I had issues so I quickly gave up and have not attempted to try the on board again.
February 19, 201412 yr Cache: 2x Samsung SSD 840, 256 GB (RAID 1 in a MR2020-2S enclosure) Is it possible something doesn't like the controller... This is a great idea - I just pulled one of the SSD's off the controller. However. no luck. Btw. this controller was running well with ESXi and behaves transparent to the operating system, that means that XEN only sees one drive.
February 19, 201412 yr hi EdgarWallace, just try the attached cfg file below, there are some subtle differences between yours and this one, just save it drop the txt extension and give it a go, i have edited it for you so no need to edit, infact i would recommend not editing to ensure no windows CR's get included by accident. windows.cfg.txt
February 19, 201412 yr binhex - really - what is he difference? You made my day !! root@Tower:/mnt/cache/Windows# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 2048 8 r----- 352.4 windows 1 2048 4 -b---- 23.5 xentop - 11:24:47 Xen 4.3.1 4 domains: 1 running, 3 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown Mem: 8360400k total, 6954236k used, 1406164k free CPUs: 8 @ 3392MHz NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR VBD_RSECT VBD_WSECT SSID archVM --b--- 66 2.3 2097152 25.1 2098176 25.1 1 1 37437 655 0 0 0 0 0 0 0 Net0 RX: 671401bytes 12481pkts 0err 0drop TX: 38335659bytes 25717pkts 0err 0drop Domain-0 -----r 762 15.6 2097152 25.1 no limit n/a 8 0 0 0 0 0 0 0 0 0 0 ownCloud --b--- 70 0.1 524288 6.3 525312 6.3 1 1 12239 2443 0 0 0 0 0 0 0 Net0 RX: 2501817bytes 7057pkts 0err 0drop TX: 12533699bytes 15065pkts 0err 0drop windows --b--- 23 1.3 2097228 25.1 2098176 25.1 4 2 32 0 0 0 0 0 0 0 0 Net0 RX: 0bytes 0pkts 0err 0drop TX: 0bytes 0pkts 0err 0drop Net1 RX: 0bytes 0pkts 0err 0drop TX: 32855bytes 283pkts 0err 0drop Unfortunately not getting an IP from my router. Need to look into that but definitely a step forward.
Archived
This topic is now archived and is closed to further replies.