Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Deprecated] Create a Windows 7 VM with Xen on unRAID 6

Featured Replies

This guide is now deprecated. unRAID beta 15 now has an awesome GUI to create virtual machines using KVM making this process super easy! Moving forward, this is the preferred method for creating VM's. Support for Xen is going to be phased out.

Information about the new VM Manager in beta 15.

 

http://lime-technology.com/forum/index.php?topic=39322.0

 

If you wish to try converting a Xen VM to KVM, Jonp has posted a guide. Additional help is found in that thread.

 

http://lime-technology.com/forum/index.php?topic=39412.msg368753#msg368753

 

Check out the Wiki on unRAID 6 and vrtual machines - work in progress.

 

http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Using_Localized_Virtual_Machines

 

Deprecated Xen guide below

This guide is for creating a Windows 7 VM with Xen on unRAID beta 7.

 

I am not using pass-through for any of my devices, but you need to make sure your motherboard and CPU support VT-X or VT-D for Intel hardware or AMD-V or AMD-Vi for AMD hardware. You can check your Intel CPU here: http://ark.intel.com/ by selecting your processor and then look for Intel Virtualization Technology support in the table. For the motherboard, you will have to look through the BIOS for Virtualization Technology, VT-D, or AMD-V, and make sure it is se to enabled.

 

I cannot guarantee this guide will work on your hardware. It works for me with 2 different servers. Some people have said Windows 8 works better in Xen than Windows 7.

 

You will need Telnet software, a Windows 7 ISO file, VNC viewer software, and GPLPV Drivers.

 

I have included links in the steps throughout the guide where you can get them. If you don't have Windows 7 ISO file, you can create one from your DVD installation media by following one of the guides on the internet. I'm not going to explain that in this guide.

 

Before you get started, you need to reboot unRAID to enable Xen. To do this, you need to edit the syslinux.cfg file located in the syslinux folder on your USB Flash drive. You will need to remove the "menu default" line under the "label unRAID OS" entry and place it under the "label Xen/unRAID OS" entry.

 

This is the default syslinux.cfg file:

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

 

Here is what your new syslinux.cfg file should look like. You can copy and paste this into your current syslinux.cfg file or make the edit yourself:

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  kernel /bzimage
  append initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  menu default
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

 

After editing your syslinux.cfg file and rebooting unRAID, we can now begin to create a Windows 7 VM.

 

Important Note before proceeding: It's best to not use any spaces in your folder or file names as this can cause problems later on in this guide with Xen or Xenman finding the appropriate files or folders.

 

1. Create a Cache Only Share called VMs in the unRAID webGUI..

 

2. Go to the VMs share you just created and create a Windows7 folder using Windows Explorer.

 

3. In the Windows7 folder create a Windows7.cfg file. Here is mine to use as a guide. You will need to change a few things where I have made comments and maybe adjust the vcpu and memory lines.

 

name = "Windows7"
builder = "hvm"
# kernel = 'hvmloader' not needed.
# device_model_version = "qemu-xen-traditional" deprecated.

# You can adjust the vcpu and memory lines if you wish.
vcpus = 2
memory = 4096

# Win7x64.iso is the name of my ISO, change it to whatever yours is named.
# When your Windows 7 installation is complete, you can delete the reference to your ISO image below, which is this part:
#  , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r'
disk = ['qcow2:/mnt/cache/VMs/Windows7/Windows7.qcow2,hda,w' , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r']

# Note: Your bridge name (br0) needs to match the bridge name in the unRAID network settings.
vif = [ 'mac=00:16:3e:01:01:01,bridge=br0' ]

# When your Windows 7 installation is complete, change this to "c" so you don't boot with the DVD.
boot = "dc"

acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci = '1'
sdl = '0'
vnc = '1'

# This is the IP address of your unRAID server.
vnclisten = '192.168.2.1'

# vncpasswd = '' No password.
stdvga=1
usb = '1'
usbdevice = 'tablet'  
localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"

 

4. SSH or telnet into unRAID and create a Windows7 VM image file. I have mine set to 40GB as shown in the command below. You can change the size by changing the 40G flag to another size. I use Putty for Windows which you can get here: http://www.putty.org/

 

qemu-img create -f qcow2 /mnt/cache/VMs/Windows7/Windows7.qcow2 40G

 

5. Copy your Windows7 DVD ISO to /mnt/cache/Windows7/ folder using Windows Explorer. Example: Mine is named Win7x64.iso which is shown in the disk section of the .cfg file above. Optionally, you can also have an icon for your VM and a Readme.md file. The icon file name should be named either Windows7.png (Same prefix as your domain name, which is Windows7) or icon.png. These 2 items will show up in the unRAID webGUI on the Xen page. After completing the first 5 steps, you should have a folder and file structure like this:

 

/mnt/cache/VMs/Windows7/
/mnt/cache/VMs/Windows7/Windows7.qcow2  <- your disk image
/mnt/cache/VMs/Windows7/Windows7.cfg    <- your Xen config file
/mnt/cache/VMs/Windows7/Win7x64.iso     <- your Windows 7 ISO image
/mnt/cache/VMs/Windows7/Windows7.png    <- Optional: your Windows 7 icon
/mnt/cache/VMs/Windows7/Readme.md       <- Optional: your Windows 7 Readme.md

 

6. SSH or telnet into unRAID and start the Windows7 VM.

 

xl create /mnt/cache/VMs/Windows7/Windows7.cfg

 

7. Connect via VNC to your Windows7 VM to complete the Windows 7 installation. You will need some VNC Viewer software if you don't have it already. I use the VNC Viewer for Google Chrome Extension. You can also get software here: http://www.realvnc.com/products/vnc/

Your connection will be the IP address of your unRAID server, which should match what you put in your Windows7.cfg file and there is no password.

 

8. After completing your Windows 7 installation (Hold off on installing any updates, they can be done later after completing this guide), we can now install the GPLPV Drivers. Choose either ejbpv_Vista2008x64_1.0.1100 for 64-bit Windows 7 or ejbpv_Vista2008x32_1.0.1100 for 32-bit Windows 7. You can download them here for your platform: http://www.ejbdigital.com.au/1-0-1100/ You want to download the driver file from a browser inside your Windows 7 VM and install it. Windows will need to be rebooted.

 

Note: as of this guide, the 1.0.1100 drivers are the latest version. You can check here for the newest version: http://www.ejbdigital.com.au/gplpv/

 

9. Open a command prompt with administrator privileges in your Windows 7 VM and install Shutdownmon as a service. You can find it here:

"C:\Program Files (x86)\Xen PV Drivers\bin" for 64-bit Windows 7 or here: "C:\Program Files\Xen PV Drivers\bin" for 32-bit Windows 7

 

In the command prompt, navigate to the folder where Shutdownmon.exe is located by typing: CD "C:\Program Files (x86)\Xen PV Drivers\bin" and then type: shutdownmon.exe -i

You should see that it has succeeded. Go ahead and reboot your VM.

 

10. Connect via VNC to your Windows7 VM and you can setup Remote Desktop to allow a Remote Desktop Connection. This will allow you to use RDC instead of VNC.

 

11. Make any edits you want to in your Windows7.cfg file, like removing the CDROM as I have shown in the Windows7.cfg comments. Now you can SSH or telnet into unRAID and type the following command:

 

xenman register /mnt/cache/VMs/Windows7/Windows7.cfg

 

This will allow you to start and stop the VM in the unRAID webGUI on the Xen page.

 

12. In the unRAID webGUI under Extensions and Xen Domains, you will see your Windows 7 VM listed. Click on the name Windows 7 and you will see the Domain settings. You can make changes to your Windows 7 VM, like setting it to auto-start on unRAID boot or edit the Windows7.cfg file.

 

Please post any comments or changes and I will update this post as needed.

  • Replies 54
  • Views 22.4k
  • Created
  • Last Reply

Top Posters In This Topic

Posted Images

I get an error:

 

root@HomeServer:/mnt/cache/VMs/Windows7# xl create /mnt/cache/VMs/Windows7/Windows7.cfg
Parsing config from /mnt/cache/VMs/Windows7/Windows7.cfg
/mnt/cache/VMs/Windows7/Windows7.cfg:13: config parsing error near `,': syntax error, unexpected ',', expecting $end
Failed to parse config: Invalid argument

 

my file Windows7.cfg:

 

name = "Windows7"
builder = "hvm"
# kernel = 'hvmloader' not needed.
# device_model_version = "qemu-xen-traditional" deprecated.

# You can adjust the vcpu and memory lines if you wish.
vcpus = 2
memory = 4096

# Win7x64.iso is the name of my ISO, change it to whatever yours is named.
# When your Windows 7 installation is complete, you can delete the reference to your ISO image below, which is this part:
#  , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r'
disk = ['qcow2:/mnt/cache/VMs/Windows7/Windows7.qcow2,hda,w'] , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r'

# Note: Your bridge name (br0) needs to match the bridge name in the unRAID network settings.
vif = [ 'mac=10:78:d2:8c:18:4e,bridge=br0' ]

# When your Windows 7 installation is complete, change this to "c" so you don't boot with the DVD.
boot = "dc"

acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci = '1'
sdl = '0'
vnc = '1'

# This is the IP address of your unRAID server.
vnclisten = '10.0.0.3'

vncpasswd = ''
stdvga=1
usb = '1'
usbdevice = 'tablet'  
localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"

 

my folder

Screen_Shot_2014-08-26_at_19_39_47.png.f1e380a5a9ad32d051b7ba31dc8a7c16.png

  • Author

There is an error in this line here:

 

disk = ['qcow2:/mnt/cache/VMs/Windows7/Windows7.qcow2,hda,w'] , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r'

 

Change it to:

 

disk = ['qcow2:/mnt/cache/VMs/Windows7/Windows7.qcow2,hda,w' , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r']

 

I noticed it too in my initial post so I had edited it earlier. Everything in it should be correct now.

I get an error

 

root@HomeServer:/mnt/cache/VMs/Windows7# xl create /mnt/cache/VMs/Windows7/Windows7.cfg 
Parsing config from /mnt/cache/VMs/Windows7/Windows7.cfg
libxl: error: libxl.c:4105:libxl_set_memory_target: new target 0 for dom0 is below the minimum threshold

libxl: error: libxl.c:4105:libxl_set_memory_target: new target 0 for dom0 is below the minimum threshold

libxl: error: libxl.c:4105:libxl_set_memory_target: new target 0 for dom0 is below the minimum threshold

failed to free memory for the domain
root@HomeServer:/mnt/cache/VMs/Windows7# 

  • Author

Sounds like a memory error where you don't have enough to allocate 4 GB to the VM. How much memory do you have? How many CPU's?

 

Change this in your Windows7.cfg file:

 

# You can adjust the vcpu and memory lines if you wish.
vcpus = 2
memory = 4096

 

to this:

 

# You can adjust the vcpu and memory lines if you wish.
vcpus = 2
memory = 2048

 

You might need to adjust vcpu's too depending on how many cores your physical cpu has.

name = "Windows7"
builder = "hvm"
# kernel = 'hvmloader' not needed.
# device_model_version = "qemu-xen-traditional" deprecated.

# You can adjust the vcpu and memory lines if you wish.
vcpus = 2
memory = 2048

# Win7x64.iso is the name of my ISO, change it to whatever yours is named.
# When your Windows 7 installation is complete, you can delete the reference to your ISO image below, which is this part:
#  , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r'
disk = ['qcow2:/mnt/cache/VMs/Windows7/Windows7.qcow2,hda,w' , 'file:/mnt/cache/VMs/Windows7/Win7x64.iso,hdc:cdrom,r']

# Note: Your bridge name (br0) needs to match the bridge name in the unRAID network settings.
vif = [ 'mac=10:78:d2:8c:18:4e,bridge=br0' ]

# When your Windows 7 installation is complete, change this to "c" so you don't boot with the DVD.
boot = "dc"

acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci = '1'
sdl = '0'
vnc = '1'

# This is the IP address of your unRAID server.
vnclisten = '10.0.0.3'

vncpasswd = ''
stdvga= 1
usb = '1'
usbdevice = 'tablet'  
localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"

 

Still refuses to work. I changed a few options under

 

vcpus = 2

memory = 2048

 

 

  • Author

Well, I'm not sure what else to suggest. Which unRAID version are you running?

 

Maybe someone else can suggest something as I'm unsure what else to try. I'm not a Linux guy.

  • Author

Glad to hear it  :)

Any idea why I am not getting any network?  I made sure the mac address matched br0 from my UNRAID box.  Anything else I maybe missed?

 

Windows is installed and running (thanks for the guide!), just stuck at the moment on networking.

 

 

Edit:  ok, I didn't understand the mac address needed to be generic, not my unraid mac.  I have networking now

  • Author

Yeah, the first 3 numbers of the Mac address has to be 00:16:3e and the other 3 can be anything you wish.

Yeah, the first 3 numbers of the Mac address has to be 00:16:3e and the other 3 can be anything you wish.

 

I just used the whole thing you had!  I've got my Video card passed through as well and showing up in Windows.  Ultimately, I'm not after having my video card there, I want to pass through a sound card (Casatunes PCI card) that runs my whole house audio.  Goal is to virtualize that PC/Server into my unraid box.  But I wanted to make sure IOMMU was working first!

 

Thanks for this guide!

  • 1 month later...

Ghunter, thanks so much for this...this was exactly what I was looking for.

 

Just out of curiosity, what is your system makeup. I have a dual core processor and I think 6 or 8gb of RAM (can't remember offhand) and am trying to gauge performance and what setup I should use.

 

I actually use primarily dockers for everything but want a Win7 VM for a few other things that I don't want/need a docker for. That being said I need to make sure unRaid itself has enough juice for the dockers in addition to the VM. The VM isn't going to be used for gaming or anything like that, and only accessed using vnc or remote desktop so it will be used primarily for running a few lightweight apps.

 

Can you comment on the processor and memory allocation and it's performance...??

 

Thanks again! Great write up!

Ghunter, thanks so much for this...this was exactly what I was looking for.

 

Just out of curiosity, what is your system makeup. I have a dual core processor and I think 6 or 8gb of RAM (can't remember offhand) and am trying to gauge performance and what setup I should use.

 

I actually use primarily dockers for everything but want a Win7 VM for a few other things that I don't want/need a docker for. That being said I need to make sure unRaid itself has enough juice for the dockers in addition to the VM. The VM isn't going to be used for gaming or anything like that, and only accessed using vnc or remote desktop so it will be used primarily for running a few lightweight apps.

 

Can you comment on the processor and memory allocation and it's performance...??

 

Thanks again! Great write up!

 

 

I might have some input on the RAM side.  I moved over to KVM, but my Windows 7 64bit didn't run very well when I gave it only 2gb ram.  Bumping it up to 4 made it stable.  i have 8GB and run one other docker (plex) as well.  I've got an 8 core AMD processor, but I am thinking about buying another 8gb stick.

 

 

dmtalon...

 

thanks for the info...how many vcpus do you give your windows vs unraid/docker? Are you doing one core is one vcpu?

 

Have you had any issues transcoding content with only 4GB of RAM to your plex/unraid/docker side?

 

I would prefer to do only 2gb of RAM or as little as i can to get it to run...again, don't need it very snappy just running...the windows box will be running plexnotify...

 

thanks for the insight...appreciate it!

For *me* I retired an HTPC (when its HDD died)  that was used for torrent handling, and it runs one application called Casatunes which is for Whole House audio.  This requires a passed through audio card and the application.  With 2GB of ram Casatunes was not stable.  It seemed that windows had to start swapping (ram) almost immediately after booting and would get stuck into a high CPU state where random applications were hogging CPU.  Raising the ram to 4 seems to have fixed that.

 

 

I am giving windows 3 for started with a max of 4 VCPUs.  Unfortunately Windows is a resource hog, but I had the vCPU(s) to spare.  Ram, I was less happy about.  hate giving up half my ram to one VM.

 

 

 

 

 

vm.PNG.887ac611311be79b55dc3a5ce8420bc4.PNG

Thanks for the info...really appreciate it. BTW is that screenshot from within Unraid...i have not enabled Xen on my box yet.

 

Nice to know I could tweak using that.

 

Tony

Yes, it's from webvirtman (which afaik doesn't work with xen yet).  I'm running KVM now because I couldn't get my PCIe card passed through on XEN.

 

Not to get too off-topic but here's a few screens of WebVirtMan

 

http://imgur.com/a/qgZcK

 

 

 

 

 

 

  • Author

Ghunter, thanks so much for this...this was exactly what I was looking for.

 

Just out of curiosity, what is your system makeup. I have a dual core processor and I think 6 or 8gb of RAM (can't remember offhand) and am trying to gauge performance and what setup I should use.

 

I actually use primarily dockers for everything but want a Win7 VM for a few other things that I don't want/need a docker for. That being said I need to make sure unRaid itself has enough juice for the dockers in addition to the VM. The VM isn't going to be used for gaming or anything like that, and only accessed using vnc or remote desktop so it will be used primarily for running a few lightweight apps.

 

Can you comment on the processor and memory allocation and it's performance...??

 

Thanks again! Great write up!

 

Glad you found the guide helpful.

 

My current build is in my sig and I have been using it since June 2014.

 

Before that, I played with Xen on unRAID v6b4 (I think) on a Supermicro C2SEA MB, Intel Q9650, and 8GB of memory, which is closer to your build. My VM ran pretty good and didn't seem to affect unRAID at all on the older hardware. My Windows 7 VM only runs Mediabrowser 3 and a few Powershell scripts for maintenance tasks, so it isn't getting heavy use. That VM was configured to use 2 VCPU's and 4GB or memory. Running the same VM on my new server doesn't really seem to be any faster other than the fact that the previous server didn't support VT-d, so I was stuck using a 100Mbps network card.

 

I don't run any dockers as I am only interested in running Windows programs, but that could always change.

 

The new server supports VT-d, so I get a nice increase in network speed. I have not tried any hardware pass-through yet, but am dying to give it a try. I'd have to decide on what video card to buy first and am leaning towards an AMD Radeon R9 285 or something in that price range.

  • Author

Yes, it's from webvirtman (which afaik doesn't work with xen yet).  I'm running KVM now because I couldn't get my PCIe card passed through on XEN.

 

I have played around with KVM too. The only difference I have noticed so far is that without GPU pass-through, the Xen VM's seem more snappy with video than a KVM VM. But other than that, performance seems very similar. So, unless you're doing any hardware pass-through, Xen is just fine and easier to configure. I will keep playing with KVM though. I just installed dmacias' virtman and webvirtmgr plugins the other day and look forward to using it.

The new server supports VT-d, so I get a nice increase in network speed. I have not tried any hardware pass-through yet, but am dying to give it a try. I'd have to decide on what video card to buy first and am leaning towards an AMD Radeon R9 285 or something in that price range.

 

I'm also leaning towards the 285 for my build. I know its just a 280 with some upgrades and optimisation but for the price it seems like it would be "ok" for gaming. I'm considering holding out for the 4GB version, but with no price available I don’t know if its worth the wait. I imagine it will cost about the same as a 290. I'm sure I'll be going to be an R9 anyway. They seem to have a pretty high success rate on Xen and KVM. But I guess alot of that is done to the user  :)

 

Did you ever passthrough more than  4GB of ram to your windows VM GHunter?.  I cant remember if it was Xen of KVM but I remember reading that more than 4GB could cause issues. I'm asking because I was going to passthrough 16GB to my proposed windows VM for gaming.

 

 

 

  • Author
I'm also leaning towards the 285 for my build. I know its just a 280 with some upgrades and optimisation but for the price it seems like it would be "ok" for gaming. I'm considering holding out for the 4GB version, but with no price available I don’t know if its worth the wait. I imagine it will cost about the same as a 290. I'm sure I'll be going to be an R9 anyway. They seem to have a pretty high success rate on Xen and KVM. But I guess alot of that is done to the user  :)

 

Did you ever passthrough more than  4GB of ram to your windows VM GHunter?.  I cant remember if it was Xen of KVM but I remember reading that more than 4GB could cause issues. I'm asking because I was going to passthrough 16GB to my proposed windows VM for gaming.

 

I haven't tried more than 4GB. I tried 2GB at first and it ran ok but I did see better performance with 4GB. It was Xen that JonP had commented about greater than 4GB had causes problems. I'm not sure about KVM though.

 

I'm gonna hold off on a video card. AMD just did some price drops so a R9 290 might be worth the extra money.

Did you ever passthrough more than  4GB of ram to your windows VM GHunter?.  I cant remember if it was Xen of KVM but I remember reading that more than 4GB could cause issues. I'm asking because I was going to passthrough 16GB to my proposed windows VM for gaming.

 

I haven't tried more than 4GB. I tried 2GB at first and it ran ok but I did see better performance with 4GB. It was Xen that JonP had commented about greater than 4GB had causes problems. I'm not sure about KVM though.

 

 

I have a Windows 7 VM running under Xen with 16GB RAM allocated. 12GB of this is used as a ramdisk for PVR timeshift. The system as a whole has 32GB with 3/4 GB passed through to various other VMs.

 

The whole thing is rock solid.

 

Peter

 

 

  • Author

Thanks Peter. Are you doing GPU pass-through? Maybe that's where JonP ran into problems with greater than 4GB of memory allocated to a VM.

 

Gary

Thanks Peter. Are you doing GPU pass-through? Maybe that's where JonP ran into problems with greater than 4GB of memory allocated to a VM.

 

Gary

 

I'm not doing GPU passthrough to this particular VM. I am passing through a TV Tuner Card and a SoundCard.

 

Any VMs I'm passing GPU to are <=4GB memory allocation.

 

Peter

 

 

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.