grayer

[SOLVED] Tips for installing XPENology in Hyper-V

Recommended Posts

I spent 2 days to install XPEnology in Windows Server 2012 Hyper-V,

 

so I'm writing some tips for you.

 

1. Setup virtual machine with 2 IDE Hdd and legacy network card.

SCSI or network card will not work even if you compile kernel with staging hv driver.

 

2. You need to compile kernel with DEC ethernet driver. (That's legacy network card emulated.)

 

3. Modify grub's kernel parameter

"inum_hdd=0" should be inum_hdd=1, or DiskAsssistant will fail when partitioning system drive.

 

4. Always backup your boot vhd. If boot fails, then restore your boot vhd with backup.

 

5. After install DSM, you need to rename or remove /usr/sbin/irqbalance (or /sbin/irqbalace).

Or NIC will be shutted down.

( Mount 2nd hdd with other linux distro. )

 

Problem

 

I don't know why but libcrypto.so.1.0.0 keeps on crashing.

- You cannot download packages with package manager.

- You cannot use ddns.

 

Sorry for my broken english. :sad:

Share this post


Link to post
Share on other sites

Hello,

 

I have compiled a new kernel to make some tests with hyper-v (and qemu), but How can I modify the img file. Can you please tell me how you did it? If I put the zImage inside the img file there are a lot of errors with modules that don't have the correct version and the DS assistant can't find the virtual syno?

 

Marc

Share this post


Link to post
Share on other sites

I did not modified img.

 

1. convert .img to .vhd

2. make new vhdx (1 GB will be enough)

3. attach two vhd to running linux

4. fdisk vhdx

partion 1 : 30MB

partion 2 : 300MB

 

5. make ext2 fs

6. copy all stuff from vhd partion1 to vhdx partion1

7. copy all stuff from vhd partion2 to vhdx partion2

8. copy your kernel and checksum to vhdx partion2

9. modify vhd's grub.conf

delete "default" so that you can boot into grub

9. make new virtual machine

10. attack vhd as booting disk and vhdx as second disk

11. boot into grub. install grub to vhdx

12. detach vhd.

 

now you can boot with vhdx

Share this post


Link to post
Share on other sites

Hello,

 

Thank you for the explanation. I will try next week and tell you how it works .

 

Marc

Share this post


Link to post
Share on other sites

Could you please export your virtual machine to test it?

 

I have a server currently testing Hyper-V Core on an HP Microserver NL40.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

By the way, I'm currently working for dsm4.2 with hyper-v dynamic memory support( which is in Linux kernel v3.9-rc3 )

 

It'll be great if that works.

Share this post


Link to post
Share on other sites

Hello,

 

I am sorry but I didn't manage to do it.

I can do the replace if the zImage on the new vhdx. After that I delete the line with the default in the partition 2 of the vhd (/boot/Grub)

I do the new virtual machine then I start and I can't go in the Grub Menu (it seems to choose a default item too)

When I choose one of the two it doesn't work. The program talks about modules with the wrong version. I guess that I have to copy other files (in addition to the zImage)

Do you haev any idea?

Thank you

Marc

Share this post


Link to post
Share on other sites

https://mega.co.nz/#!0wYilRQb!cWjVHVsqb ... D3S2IecsJM

 

Cause it's been up and running, it is not clean installation.

1. I made some modifications on configs (especially /etc/fstab, /opt/etc/init.d)

2. Kernel's modified to use synthetic scsi, network driver.

3. libcrypto.so.1.0.0 is replaced with latest build.

 

Admin password is '11'.

 

again, sorry for my broken english.

Share this post


Link to post
Share on other sites
Hello,

 

I am sorry but I didn't manage to do it.

I can do the replace if the zImage on the new vhdx. After that I delete the line with the default in the partition 2 of the vhd (/boot/Grub)

I do the new virtual machine then I start and I can't go in the Grub Menu (it seems to choose a default item too)

When I choose one of the two it doesn't work. The program talks about modules with the wrong version. I guess that I have to copy other files (in addition to the zImage)

Do you haev any idea?

Thank you

Marc

 

just delete /boot/grub/menu.lst or grub.cfg

then, you can boot into grub command line.

 

or, download link. first vhdx is boot disk.

Share this post


Link to post
Share on other sites

Hello,

 

I will do some tests with your image file.

thank you for the time you spent doing it :smile:

 

EDIT : All is working with your files.

In case someone has a problem using it here is what I had to do :

To use the image I had to add a new network adapter (a second one) and then the DS assistant was able to find it (as the first adaptater is in another subnet than mine), after I had to put a fixed IP address in the first adapter (in my network subnet) and finally I was able to remove the second one and enable DHCP (or not if I don't want to use it).

Unfortunately I have not been able to upgrade the image to 4.2

Video station is not working too (I have to restart the syno and by SSH I have to remove manually the directory Videostation in /volume1/@app... ) but it is a problem with xpenology as it is not working with virtual box. Perhaps there is a license or something like that in the syno.

 

Thanks again for the time you spent doing it.

Marc

Share this post


Link to post
Share on other sites

Hello,

 

I have managed to compile a DSM 4.2 In fact I used the git from the 4.1 with the 4.2 from syno.

I have been able to mahe the img file (vhd format), but I have the same problem as you had : The DEC driver works but after a moment it is stopped and there is no network access.

I have also seen that the hyper-v drivers are not working. A HDD in SCSI is not working and the network driver is not working too (the same problem as the one you had in the original post).

I have selected Hyper-v and all the hyper-v options (network, scsi and the thitd one). Can you please tell me what I am missing? Did I miss one driver for hyper-v somewhere? Do I have to remove something for the Hyper-v driver to work? You have managed to solve the problem in your image

 

Thank you

Marc

Share this post


Link to post
Share on other sites

If you want DEC drivers to work, you have to remove /sbin/irqbalance.

 

Kernel that I uploaded is patched with kernel v3.4 hyper-v driver.

 

v3.4 kernel hyper-v driver

linux-3.4/drivers/hv/*.*

linux-3.4/drivers/net/hyperv/*.*

linux-3.4/drivers/scsi/hv/*.*

linux-3.4/kernel/arch/x86/cpu/mshyperv.*

linux-3.4/include/kernel/hyperv.h

 

dsm 4.2 hyper-v driver

linux-3.x/drivers/staging/*.*

linux-3.x/kernel/arch/x86/cpu/mshyperv.*

linux-3.x/include/kernel/hyperv.

 

so the dsm 4.2 hyper-v driver is staging driver, and very unstable (it is not even working!)

 

You can try v3.8 kernel hyper-v driver, if you want dynamic memory.

Share this post


Link to post
Share on other sites

Hello,

Since the 3.2 kernel (of linux), the hyper-v drivers have been changed by MS and they have left the staging area. Perhaps that is why they are unstable?

How can you patch the kernel with the 3.4 (or even better 3.8 version of the drivers?)

Do you simply copy the files in the directory you specified into the xpenology drivers? Do you have to change something in the Makefile?

And after that you compile the kernel?

 

Thank you

Marc

Share this post


Link to post
Share on other sites

Makefile is very simple.

 

kernel v3.4's hyper-v driver has exact same files, so just copy them to staging folder.

kernel v3.8 has a little change to kernel header, so you need to modify some source files to compile it.

(If you are a programmer, I bet you can modify it.)

 

Try v3.4 first. It will work.

 

or I can upload patched kernel source with latest hyper-v drivers, If you want.

(It is a latest patch, so it might be unstable.)

 

go to kernel.googlesource.com, browse hyper-v driver folder, and view folder history.

It helps a lot.

Share this post


Link to post
Share on other sites

Hello,

 

I will try by myself to add the 3.4 (and perhaps put the changes in git (I have no idea about how to do it but there is probably a way :smile:.

 

If you have the zImage for the DSM 4.2, it would be great if you can put it here so I will be able to make the image for 4.2 (in case I have a problem doing the merge)..

 

Marc

Share this post


Link to post
Share on other sites

Hello,

 

Thank you for the files.

I have already made a new image file and Pat file to install on a new Hyper-v (with your zImage).

 

Here is a file (7zip) with a vhd file and a Pat file).

If you create a vhd file as secondary slave there is no problem. Il the hvd is as SCSI you will have an error 22 and after that you must restore the vhd from the zip file and reboot the machine.

 

Thank you again for your time

Marc

Here are the files to use DSM 4.2 with Hyper-v

 

https://mega.co.nz/#!bYZmGAZS!AgDSqhlmm ... ZQFpLtqa4Y

Share this post


Link to post
Share on other sites

Hi marc_al, thank you for the files to make the DSM work under Hyper-v! Can you please give instructions on how to use it? Would we be able to map raw disks to it and use SHR natively? I apologize for not knowing a lot about how the XPENology works, but i recently bought an HP Microserver N56L and really want to get the DSM to function on it - preferrably using the SSD caching that is available on the higher end hardware, but i am just not sure how to do it with the instructions and posts on the forum.

Share this post


Link to post
Share on other sites

Hello,

 

This image is nearly the same as the one with virtual box (viewtopic.php?f=2&t=3)

The important thing is to put the MAC address (00113208D62A)

You must create a PC with the first HDD that is in the image. After that you create a second HDD where you will put the data (it can be SCSI or secondary master).

In the network you use the external network adapter (MAC 00113208D62A) it is very important or it won't work.

You boot then with the DS Assistant you will see the synology (wait a moment to be sure the image is correctly booted). After that you can do a right click and choose Install then you choose the PAT file in the 7zip file. After that the syno will reboot. If you see a grub error 22 you put the vhd file from the archive again (as the first vhd) and you restart the virtual machine. the installer will continue the installation normally. For the SSD caching I have no idea. This image is only interesting for Hyper-V and I have ni idea if it is possible to use a SSD cache. Perhaps if you can make it work in Windows it will work but I am not sure.

 

Marc

Share this post


Link to post
Share on other sites

Hello,

 

I have managed to create a kernel by doing changes to the kernel source code but it seems that the SCSI driver is not working. When the new HDD is in the SCSI card the configuration doesn't work, if I put the HDD in the IDE port it is fine.

A second HDD in SCSI is working perfectly too but the first installed HDD has to be in IDE (so 2 in IDE and one in SCSI)

 

Marc

Share this post


Link to post
Share on other sites
Hello,

 

I have managed to create a kernel by doing changes to the kernel source code but it seems that the SCSI driver is not working. When the new HDD is in the SCSI card the configuration doesn't work, if I put the HDD in the IDE port it is fine.

A second HDD in SCSI is working perfectly too but the first installed HDD has to be in IDE (so 2 in IDE and one in SCSI)

 

Marc

Hi Marc,

 

Could you provide your new files if you get a moment please? I have not tried your old ones yet, but i know from experience that you cannot put the swap file or your boot files on SCSI devices within hyper-v, because it does not get instantiated until mid-boot with the hyper-v integration drivers. Microsoft requires OS + swap to be on IDE, and any data/program files/etc to be on SCSI.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now