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.

Basic guide for windows VM in unraid.

Featured Replies

With beta 3 out thinking of trying out the vm ability in unraid.

 

Use virtualbox via windows and install windows

Install gplpv drivers

Install VNC server

shutdown vm

From C:\Program Files\Oracle\VirtualBox\VBoxManage.exe run the command to convert a vdi to img:

  VBoxManage internalcommands converttoraw machine-name.vdi machine-name.img

 

then  on unraid

mkdir /mnt/cache/Xen/Win

Copy machine-name.img to /mnt/cache/Xen/Win

 

and now i need a cfg....

place the config in the same folder and

 

xl create machine-name.cfg -c

 

 

Thoughts / input?

  • Replies 146
  • Views 25.6k
  • Created
  • Last Reply

That is more complicated than it needs to be.

 

1. Create a Cache Only Share called VMs

 

2. Goto that VMs share and create a Windows folder.

 

3. In the windows folder create a Windows.cfg file (use the one below as a guide)

 

NOTE: Change the paths and the names to the correct locations on your system.

 

name="Windows8"
kernel = 'hvmloader'
builder="hvm"
vcpus=2
memory=2048
disk = ['file:/mnt/cache/VMs/Windows.img,hda,w' , 'file:/mnt/user/ISOs/Win_Ent_8_64BIT_English.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 (c), 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' ]

 

4. SSH into unRAID and goto /mnt/cache/VMs/Windows and create Window Image File.

 

truncate -s 30G Windows.img  # <--- That creates a 30GB Windows Virtual Drive

 

5. Start the VM

 

xl create windows.cfg

 

6. Connect via VNC to Windows Setup and complete install.

 

7. After install you can edit the cfg and remove the Windows ISO from the disk line.

 

8. Install GPLPV Drivers

 

9. When everything works, symbolic link Windows.cfg to the autostart folder on the Flash Drive (I am not sure if Tom addressed this or not but if not, this would autostart this VM when unRAID boots)

 

I'm going off of memory so somebody will need to clean this up and create a new thread with more details. But this is a good starting point for any of you Linux / unRAID Gurus out there.

 

IMPORTANT NOTE: Now is a good time for many of you to check out Installing a PXE Server on unRAID. Sure does make installing VMs a whole lot easier when you just PXE Boot into the PXE Server running on unRAID.

  • Author

Thanx for picking me up schoolbus, will post results.

Thanks SchoolBusDriver.  Did a test install of Windows and it worked great!

 

More info on config file options and lots of other good stuff here:

http://wiki.prgmr.com/mediawiki/index.php/Appendix_B:_The_Structure_of_the_Xen_Config_File

 

I installed the signed GPLPV drivers from here:

http://wiki.univention.de/index.php?title=Installing-signed-GPLPV-drivers

I see some Xen devices in device manager so I assume the install went ok.

 

Rendering of graphics like animation on web pages is a bit sluggish.  Oddly enough it's more noticeable over RDP than VNC.

I was expecting not to see "Standard VGA Graphics Adapter" under display in device manager.

I don't want to do pass through.  Just run with optimal settings/drivers so things are as accelerated as they can be.

Kind of like how things are snappier after installing vmware tools or virtualbox extensions.

 

I'm coming from type 2 hypervisors so I have some reading to do!

Very excited about finally seeing this on unRAID though.  I will be dropping VirtualBox once things are stable and I wrap my head around Xen.

 

What's the correct way to check CPU usage, xentop?

I guess with unRAID running as dom0 top from the unRAID console will only show you unRAID's CPU usage.

vnc.jpg.f2717259a08f0937a53bfca1d71b062d.jpg

Looks interesting may have to have a play. Looking forward to seeing a guide on how to do an a Linux distro install from scratch

 

Sent from my GT-I9100 using Tapatalk

 

 

  • Author

root@Tower:/mnt/cache/.custom/VMs# xl create windows.cfg
Parsing config from windows.cfg
': lexical erroronfig parsing error near `
': lexical erroronfig parsing error near `
': lexical erroronfig parsing error near `
': lexical erroronfig parsing error near `
': lexical erroronfig parsing error near `
': lexical erroronfig parsing error near `
': lexical erroronfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
': lexical errorconfig parsing error near `
Failed to parse config: Invalid argument

 

windows.cfg

name="Windows7"
kernel = 'hvmloader'
builder="hvm"
vcpus=2
memory=2048
disk = ['file:/mnt/cache/.custom/VMs/Windows.img,hda,w' , 'file:/mnt/cache/.custom/VMs/Windows_7_Ultimate.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 (c), 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"

  • Author

tried this as well, same error

 

kernel = 'hvmloader'
builder = 'hvm'
memory = '2048'
disk = [ 'file:/mnt/cache/VMs/Windows.img,hda,w',
'file:/mnt/cache/VMs/Windows_7_Ultimate.iso,hdc:cdrom,r' ]
name = 'Windows7'
vif = ['bridge=br0, mac=01:23:de:ad:be:ef'] 
boot='dc'
vnc=1
vncviewer=0
sdl=0
vcpus=2
usbdevice='tablet' 
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart

tried this as well, same error

 

kernel = 'hvmloader'
builder = 'hvm'
memory = '2048'
disk = [ 'file:/mnt/cache/VMs/Windows.img,hda,w',
'file:/mnt/cache/VMs/Windows_7_Ultimate.iso,hdc:cdrom,r' ]
name = 'Windows7'
vif = ['bridge=br0, mac=01:23:de:ad:be:ef'] 
boot='dc'
vnc=1
vncviewer=0
sdl=0
vcpus=2
usbdevice='tablet' 
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart

 

Did you first create the windows.img for the cfg to use?

 

# dd if=/dev/zero of=/mnt/cache/VMs/windows.img bs=1M count=40960

 

Sent from my LG-VS980 using Tapatalk

 

 

  • Author

yes i did truncate -s 30G Windows.img  # <--- That creates a 30GB Windows Virtual Drive per schoolbus's reply

  • Author

The parse error is caused by notepad ++ manual input into vi fixes cfg errors.

 

root@Tower:/mnt/cache/.custom/VMs/Windows7# xl create windows.cfg
Parsing config from windows.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
Daemon running with PID 7116

 

cant seem to connect via VNC to install it just auto closes VNC viewer..

  • Author

^^ DO NOT USE VNC VIEWER for windows it will auto close when installing windows. Use the java version.

^^ DO NOT USE VNC VIEWER for windows it will auto close when installing windows. Use the java version.

 

Tightvnc, chicken of the vnc are the only two that reliably work for me on RAW encoding. That bits important that. It will close on reboot, that's normal.

 

Sent from my Nexus 5 using Tapatalk

 

 

So what hardware are you all running on the unraid box?  I'm thinking my proc is way too weak (and that i dont have enough memory) to even think about attempting this.

 

I have an amd sempron 145 with 2 GB of memory.  Not nearly powerful enough is it..

So what hardware are you all running on the unraid box?  I'm thinking my proc is way too weak (and that i dont have enough memory) to even think about attempting this.

 

I have an amd sempron 145 with 2 GB of memory.  Not nearly powerful enough is it..

 

Maybe a new thread would be best for this? It could go and go and go as a topic.

I have Windows7 up and running. Below is my config. Watch out for copy/paste errors that convert ASCII " and ' into unicode slanted versions. I have SageTV installed, and recording from a HDHomeRun network tuner. Yay!

 

# Documentation for the settings is here: http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html
kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
vcpus = 4
memory = 4096
# This causes Windows boot to stall at the "Starting Windows" boot screen.
#shadow_memory = 8
device_model_version = 'qemu-xen-traditional'

#disk = [
#  'file:/mnt/vms/windows/disk.img,ioemu:hda,w',
#  'file:/mnt/vms/windows/windows7.iso,ioemu:hdc:cdrom,r'
#]

# After installation...
disk = [ 'file:/mnt/vms/windows/disk.img,ioemu:hda,w' ]

name = 'windows7'

#vif = [ 'type=ioemu, bridge=xenbr0' ]
# I let xen generate one using the blank vif spec. Then after the VM started, I grabbed the MAC address and saved it here for
# next time.
#vif = [ '' ]
vif = [ 'mac=00:16:3e:4d:0f:48' ]

on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'

#-----------------------------------------------------------------------------
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot = 'dc'

acpi = 1
apic = 1
#viridian = 0
#xen_platform_pci = 0

sdl = 0
vnc = 1
vnclisten = '0.0.0.0'
# Force it to 5901. So connect to port vnc://dom0ip:5901/. Use raw encoding!
vncdisplay = 1
vncpasswd = ''

stdvga = 1
videoram = 16
usb = 1
usbdevice = 'tablet'
soundhw = 'sb16'
#serial = 'pty'
localtime = 1

 

Some notes:

 

- Set the MAC address in the cfg and DHCP allocation in your router otherwise your IP will change (even without a reboot).

- I've seen posts that say that setting viridian to 1 will avoid some VM crashes. So far I haven't seen a crash.

- Use VNC during installation, then enable remote desktop in the VM and use RDC.

- set videoram and stdvga so that you can raise the screen resolution

- set localtime to get your time zone correct

- Don't use shadow_memory. At least it caused Windows to sit indefinitely at the glowing windows screen during boot

- I have an SSD for my VMs, and this in my "go" script: mount /dev/sdb1 /mnt/vms. I plan to figure out how to find the device using some unique ID, in case it ends up being something other than sdb1 after switching things around. (Help on that is welcome!)

Coppit, will that setup allow access to a casatunes 5x5 matrix PCI audio card?  Or would I need PCI pass thru?

 

Sent from my XT1060 using Tapatalk

 

I have Windows7 up and running. Below is my config. Watch out for copy/paste errors that convert ASCII " and ' into unicode slanted versions. I have SageTV installed, and recording from a HDHomeRun network tuner. Yay!

 

Nice - I was running on the same path as you but forked to try installing on a HD and then creating an image of that drive to use. Img file created but it was too late to see if it worked as I needed to get to bed.

- I have an SSD for my VMs, and this in my "go" script: mount /dev/sdb1 /mnt/vms. I plan to figure out how to find the device using some unique ID, in case it ends up being something other than sdb1 after switching things around. (Help on that is welcome!)

Sorry at work so this might be a little off but try this:

mount /dev/disks/by-id/scsi-<SSD name>-part1 /mnt/vms

 

Will look when I get home tonight for exact mount by ID or find jumperalex's post explaining it for his apps drive.

Hi guys, I've followed thuis thread and tried several different .cfg files from this thread but every time i get this error

 

 

': lexical errornfig parsing error near `

': lexical errornfig parsing error near `

': lexical errornfig parsing error near `

': lexical errornfig parsing error near `

': lexical errornfig parsing error near `

 

I have created a windows.img file and edited my paths to suit,

 

any ideas why this might be happening?

 

  • Author

Your using a windows based editor, telnet/ssh into your unraid machine and type vi name.cfg and paste the information in there.

@BobPhoenix: Thanks! This works:

 

# ls -l /dev/disk/by-id/ata-Samsung_SSD_840_EVO_120GB_S1D5NSBDC54953M-part1

lrwxrwxrwx 1 root root 9 Feb  2 12:37 /dev/disk/by-id/ata-Samsung_SSD_840_EVO_120GB_S1D5NSBDC54953M-part1 -> ../../sdb1

 

@jumperalex: Sounds like you'll need to pass the device through. There are some examples on the web, but I haven't yet gotten up the courage to try passing through my GTX 460 video card. It may not even be supported...

 

@NSTAR: Replace the quotes with the same thing. In vim (and maybe vi), you can put your mouse on the char and type :asc<cr> and see the code for the character. The parser requires ASCII single and double quotes. hex 27 and 22 respectively.

 

Edit: Actually, it should be -part1, which gets you sdb1.

Thanks coppit and pyrater

 

I am now getting the following.........

 

libxl: error: libxl_dm.c:1275:device_model_spawn_outcome: domain 14 device model: spawn failed (rc=-3)

libxl: error: libxl_create.c:1075:domcreate_devmodel_started: device model did not start: -3

libxl: error: libxl_dm.c:1306:libxl__destroy_device_model: Device Model already exited

 

 

when I create the VM

 

 

 

  • Author

your windows.cfg is most likely wrong, can you post it here.

here you go :)

 

kernel = 'hvmloader'

builder = 'hvm'

vcpus = '2'

memory = '2048'

# device_model_version="qemu-xen-traditional"

disk = [ 'file:/mnt/user/Xen/WinXP/WinXP.img,hda,w' , 'file:/mnt/user/ISOs/WinXP.iso,hdc:cdrom,r' ]

name = 'WinXP'

vif = [ 'mac=00:16:3e:51:20:4C,bridge=xenbr0' ]

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

  • Author

No clue you will have to wait for the unRaid guru's like school, ironic, or lime-tech. I personally would reboot the box change viridian = '1' to viridian = '0' and if that doesnt work....start googling like crazy and hope you find a solution/ hope school, ironic, or lime-tech knows the answer.

 

BTW usbdevice = 'tablet is missing a ' i assume it was a copying error?

Archived

This topic is now archived and is closed to further replies.

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.