vhyvenom

[GUIDE] XPEnology/DSM on XenServer - Ongoing Effort

Recommended Posts

Hello,

 

This is a thread about the best/solid way to run XPenology/DSM on XenServer. Multiple methods will used/attempted as time goes on, depending on which one works best. There are multiple threads about this version or that tool - the idea for this thread/post is to keep an eye on the best ways for DSM on XenServer - hopefully staying up to date.

 

XenServer Tips/Scripts

 

Wishlist:

- Identify Hypervisor properly during boot (currently GNOboot/Nanoboot seem to think XenServer is HyperV) - See Post 5

- Fix Paravirtualization Support? - It appears GNOboot 10.4 Xen Tools worked, but GNOboot 10.5 has a known issue with this.

- Drivers for XenServer paravirtualization - ie XenTools - Help? (this should be easyish to include? Xen tools available for tremendous amount of platform)

 

Status Today:

--- Nanoboot ---

- Able to run stably DSM 5.0-4493 (latest as of writing) using Nanoboot 5.0.3.1 - no major issues noted yet. Requires small but useful patch to XenServer.

 

--- GNOBoot ---

- Able to run DSM 5.0-4493 (latest as of writing) using GNOBoot 10.5 (designed for older 4458). However substantial issues exist. Not yet recommended.

- Able to run stably DSM 5.0-4458 using GNOBoot 10.5 - no major issues noted yet.

 

 

Recommended: Nanoboot 5.0.3.1 and DSM 5.0-4493 + Update 3 | Loads and seems to be stable

[spoiler=][b]Requires:[/b] XenServer Patch - See Post 2

 

VM Config:

>> ISO to boot (Nano-Boot 5.0.3.1 DSM 5.0-4493 X64 from the http://xpenology.nl site)

>> NIC MAC Address begins with 00:11:11 - use online MAC address tool to generate the rest

>> 5GB disk (5GB is smallest disk size allowed)

>> 4GB RAM

>> 8 vCPUs (only 2 "cores" are reported cosmetically)

 

 

Steps to Repro:

1. Create a VM in XenServer - modify config to match - If VM is created, delete and recreate again. Make sure you have the XenServer patch applied and a proper NIC MAC address.

2. Start the VM

3. Choose the Install/Upgrade option (second one for me). VM boots Nanoboot in "install/debug" mode.

4. Find your DSM IP (whether through the Find Synology Assistant or alternate means like device listing in router). Visit that IP.

5. Use pat file for DSM 5.0-4493 (DS3612xs model). Uncheck the "Create SHR volume blah blah" if checkbox exists. DSM successfully installs and reboots the VM.

6. You should be able to login into DSM and confirm version 5.0-4493 is installed.

7. See Post 3 on how to update to 4493 Update 3 (latest as of writing)

 

 

GNOBoot Alternate 1 - GNOboot 10.5 and DSM 5.0-4493 | Loads but has blocking issues

[spoiler=][b]VM Config:[/b]

>> ISO to boot (gnoboot_105_xpenology_5.0-4458_bootloader_X64_by_Poechi.iso from the http://xpenology.nl site)

>> 5GB disk (5GB is smallest disk size allowed)

>> 4GB RAM

>> 8 vCPUs

 

Issues Encountered:

-- On reboot, MAC address changes (causing new IP)

-- On boot system reports "Abnormality detected on DiskStation. All volumes have been unmounted".

-- Post install performance was noticeably slower.

 

Steps to Repro:

1. Create a VM in XenServer - modify config to match - If VM is created, delete HDD and create new 10GB disk.

2. Start the VM

3. Choose the second option, PRESS TAB, and modify ending line to 4493. VM boots GNOboot in "install/debug" mode.

4. Find your DSM IP (whether through the Find Synology Assistant or alternate means like device listing in router). Visit that IP.

5. Use pat file for DSM 5.0-4493 (DS3612xs model). Uncheck the "Create SHR volume blah blah" if checkbox exists. DSM successfully installs and reboots the VM

6. After reboot the MAC address has changed and the machine IP has changed. Find your DSM IP (whether through the Find Synology Assistant or alternate means like device listing in router). Visit that IP.

7. You should be able to login into DSM and confirm version 5.0-4493 is installed

GNOBoot Alternate 2 - GNOboot 10.5 and DSM 5.0-4458 | Loads and seems to be stable, version 5.0-4458 is bit behind current releases

[spoiler=][b]VM Config:[/b]

>> ISO to boot (gnoboot_105_xpenology_5.0-4458_bootloader_X64_by_Poechi.iso from the http://xpenology.nl site)

>> 5GB disk (5GB is smallest disk size allowed)

>> 4GB RAM

>> 8 vCPUs

 

Issues Encountered:

-- Single core reported in Control Panel (in other words - just the clock speed shown, no core count shown)

 

Steps to Repro:

1. Create a VM in XenServer - modify config to match - If VM is created, delete HDD and create new 10GB disk.

2. Start the VM

3. Choose the second option. VM boots GNOboot in "install/debug" mode.

4. Find your DSM IP (whether through the Find Synology Assistant or alternate means like device listing in router). Visit that IP.

5. Use pat file for DSM 5.0-4458 (DS3612xs model). Uncheck the "Create SHR volume blah blah" if checkbox exists. DSM successfully installs and reboots the VM.

6. You should be able to login into DSM and confirm version 5.0-4458 is installed

 

 

-v

Edited by Guest

Share this post


Link to post
Share on other sites

Good news. Located workaround to allow Nanoboot (4493) to be able to work on XenServer 6.2 SP1. Adding to main post shortly.

 

Xen Patch

Description: Enables 'e1000' NICs based on NIC MAC Address

[spoiler=]Patch for XenServer 6.2 to allow Intel e1000 NIC emulation instead of the the Realtek 8139 NIC emulation used by XenServer by default.

 

Patch: http://www.ualberta.ca/~jpm1/xenserver/ ... 1000.patch (included here in the end in case file goes down)

 

To apply this patch you'll need to copy it to your server (e.g. via scp) and back up your current /opt/xensource/libexec/qemu-dm-wrapper like so:

 

cp /opt/xensource/libexec/qemu-dm-wrapper ~/qemu-dm-wrapper.original

Then patch your qemu-dm-wrapper:

 

patch /opt/xensource/libexec/qemu-dm-wrapper < qemu-dm-wrapper-e1000.patch 

All Done. If that goes smoothly you can create a new VM and have the MAC address of your NIC(s) start with 00:11:11 and they will automagically get assigned e1000 NICs instead!

 

qemu-dm-wrapper-e1000.patch (for reference)

99a100,104
> 
> 	for i in range(len(qemu_args)):
> 		if qemu_args[i].find('macaddr=00:11:11:') > 0:
> 			qemu_args[i] = qemu_args[i].replace('rtl8139', 'e1000')
> 

Credit:

http://www.ualberta.ca/~jpm1/xenserver/readme.txt

John McGuigan - jpm1@ualberta.ca

 

 

-v

Edited by Guest

Share this post


Link to post
Share on other sites

Setup XenServer to enable Passthrough:

[spoiler=][b]Get[/b] DeviceID of device to passthrough:

lspci | more

Hide DeviceID from XenServer at boot:

1. Use text editor to add boot flag so it hides the device when XenServer boots:

nano /boot/extlinux.conf

Under the Xe entry - Add pciback.hide=(deviceID) after ''splash" but before the "---" - notice where its bolded below:

append /boot/xen.gz mem=1024G dom0_max_vcpus=8 dom0_mem=752M,max:752M watchdog_timeout=300 lowmem_emergency_pool=1M crashkernel=64M@32M cpuid_mask_xsave_eax=0 console=vga vga=mode-0x0311 --- /boot/vmlinuz-2.6-xen root=LABEL=root-vmpvrmuz ro xencons=hvc console=hvc0 console=tty0 quiet vga=785 splash pciback.hide=(??:???:?.?) --- /boot/initrd-2.6-xen.img

2. Update XenServer boot.

extlinux -i /boot

3. Reboot the XenServer.

reboot

 

Assign PCI device to VM:

[spoiler=][b]Get UUID of VM:[/b]

xe vm-list

Add passthrough PCI device to VM:

xe vm-param-set other-config:pci=0/0000:???.? uuid=xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx

Remove PCI passthrough entry from VM:

xe vm-param-remove param-name=other-config param-key=pci uuid=xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx

List of PCI passthrough entries in VM:

xe vm-param-get param-name=other-config uuid=xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx

 

Credit: http://lime-technology.com/forum/index. ... #msg275912

Edited by Guest

Share this post


Link to post
Share on other sites

Update to DSM-4493 Update 3 (latest as of writing)

[spoiler=][b]1.[/b] Obtain Update Package (http://www.xpenology.nl/xpenology-software/) - NOTE: Havent tried but I think you could use the built in downloader and after it downloads run step 4 and try it but not sure.

2. Go to the DSM Interface -> Control Panel -> Update and Restore -> "DSM Update manually" ---> Point to a file downloaded and click OK. File uploads.

3. DO NOT CLICK YES after uploading, yet.

4. SSH in DSM as root and run following commands (or use Task Scheduler from the GUI)

 

Command 1 (notice no spacing between s/flash/flash):

sed 's/flashupdateDeb/flashupdateDeb1/' /autoupd@te.info > /autoupd@te.info1

Command 2:

mv /autoupd@te.info1 /autoupd@te.info

 

5. Click "Yes" to Update now.

6. Update should install and DSM will reboot. You should be set.

 

Common Errors Encountered:

[spoiler=]

Permission denied
You are probably NOT logged in as root in SSH or the scheduled command is not running as root.

 

"There is a temporary directory access error (2) during update".
The commands in step 4 did not run successfully (try from SSH if doing from Task Scheduler to see errors).

 

sed: bad option in substitution expression
In Command 1 you have more spaces than required screwing up the command - for some reason most posts elsewhere show Command 1 as [sed 's / flashupdateDeb / flashupdateDeb1 /' /autoupd@te.info> /autoupd@te.info1] - there is too many spaces in the first part between s/flashupdateDeb/flashupdateDeb1.

 

Share this post


Link to post
Share on other sites

Issue: Identify Hypervisor properly during boot (currently GNOboot/Nanoboot seem to think XenServer is HyperV) - see this post by billytheczeh

 

The following 'fixes' this:

On XE host run (get UUID by using 'xe vm-list'):

xe vm-param-set uuid=xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx platform:viridian=false

And now when booting the when booting the 'virt-what' sequence reports:

:: Checking hypervisor [ OK ]

Detected hypervisor: xen/xen-hvm

 

HOWEVER this then breaks network connectivity (e1000 or realtek). It appears the the e1000 module is not loaded when Xen is detected?

 

 

To rollback change:

xe vm-param-set uuid=xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx platform:viridian=true

Share this post


Link to post
Share on other sites

Hy,

 

i would like try a new configuration and a new product, S.A.R.A.H.

 

for that, I would like make 2 VM under Xenserver, first to use xpenology with 6HDD of 3To and the second to install Windows 7 or 8 to use S.A.R.A.H. who are only compatible with Windows...

 

You think it's possible ?

 

Rgds

Akhlan

Share this post


Link to post
Share on other sites
Hy,

 

i would like try a new configuration and a new product, S.A.R.A.H.

 

for that, I would like make 2 VM under Xenserver, first to use xpenology with 6HDD of 3To and the second to install Windows 7 or 8 to use S.A.R.A.H. who are only compatible with Windows...

 

You think it's possible ?

 

Rgds

Akhlan

Stay out of this thread with unrelated questions. Ask your generic Xen questions here: http://www.xenproject.org/help/question ... swers.html

Share this post


Link to post
Share on other sites

Hardware:

HP N54L microserver

(4) 3tb sata drives(in machine)

(1) USB drive(xenserver is installed to this)

 

Virtulization/Hypervisor:

Xenserver 6.5

 

Software:

Xpenoboot 5.1-5022.2

Xpenology 5.1 – 5022

Modded Bios

Modded - qemu-dm-wrapper – got a new one from John McGuigan for xenserver 6.5 (allows the nic card to show as an e1000 nic so xpenoboot will pick it up) -

 

viewtopic.php?f=15&t=3718&p=22250

 

 

 

I don’t know why I aways decide to go a little against the grain… Might be that I already had another Xenserver up and running already…. I perfer Xenserver just because it is a very mature hypervisor, and a person can do what they want with it and not be forced into buying additional functions. Looking around I didn’t see much on Xenserver working with Xpenology. I see a lot of how to’s with ESXI, Hyper-V, etc….

 

However I was able to Xpenology to work OK, unfortunately I ran into some additional unforeseen issues. I was attempting to do PCI pass-through for SATA so that Xpenology would see the separate disks to create a larger raid. I found out that while the Turion II n54l processor does support virtualization it does not support IOMMU which I am reading is needed for PCI pass-through to work inside of xenserver. If my processor supported IOMMU I think I would be home free and this would be a null issue, but I know there a a bunch of N54L, N40L, and N36L's out there which this could be useful to....

 

I was working through a few work arounds and found two options that seemed like they might work, but ran into a few roadblocks.

 

 

The first one is to basically fool xenserver into seeing the sata disks(sdb,sdc,sdd,sde) as removable disks. This one seems like the most viable option, but I could use some help……

 

http://techblog.conglomer.net/sata-dire ... xenserver/

 

I made the edits, and they showed up perfectly as SCSI disks as was intended. I was able to attach 2 of the sata disks inside of the xencenter gui perfectly, and they showed as two seperate usable disks inside of synology. The roadblock I ran into was that because I can't install xentools I was only able to attach 2 disks per GUI default.

 

I thought to myself no problem.... I will just manually attach via a VDB through command line. Well.... that didn't work so hot and I get this message "Error: Empty VBDs can only be made for type=CD". I hunted around a bit and found what I think is the xencode here which shows the message where I am getting with what I think is the parameters. I'm not 100% sure why they are showing up “empty”. This happens even if I attach them, add something inside of synology to them(so they aren't "empty"), detach, then try to reattach through CLI.

 

http://webcache.googleusercontent.com/s ... clnk&gl=us

 

 

The second way which I haven't tried since it seems like a huge mess/pain from what I am reading is "raw device mapping". I stumbled upon it when someone was talking about it for ESXI as a way to attach disks, so I did a little digging if I could do it in xenserver. Didn't find much, but what I found seemed pretty ugly:

 

https://forums.plex.tv/index.php/topic/ ... pms/page-2

 

 

So at this point I guess I have two options. Keep trying to chase down figuring out how to force additional disks through CLI inside of xenserver. Or scrap the whole idea of running this through xenserver and just install it bare metal.

 

 

I put a LOT of work/research into getting this to where I am right now, I thought maybe you might be of some assistance? Technically I am there, however I just can only add so many disks. I am like so close..... I just need a little help getting unstuck to add some more!…… I’m hoping someone might be able to offer some assistance to get this little box up and running right!

 

Thanks

Share this post


Link to post
Share on other sites