grayer Posted February 27, 2013 #1 Posted February 27, 2013 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. Quote
marc_al Posted March 20, 2013 #2 Posted March 20, 2013 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 Quote
grayer Posted March 22, 2013 Author #3 Posted March 22, 2013 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 Quote
marc_al Posted March 23, 2013 #4 Posted March 23, 2013 Hello, Thank you for the explanation. I will try next week and tell you how it works . Marc Quote
isabido Posted March 23, 2013 #5 Posted March 23, 2013 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. Quote
grayer Posted March 24, 2013 Author #6 Posted March 24, 2013 Yes I can, but I don't have space to upload. VHDs' about 4GB. Quote
grayer Posted March 24, 2013 Author #7 Posted March 24, 2013 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. Quote
isabido Posted March 24, 2013 #8 Posted March 24, 2013 Yes I can, but I don't have space to upload. VHDs' about 4GB. Can you test here? http://www.filedropper.com/ o the best.... https://mega.co.nz/ Thanks! Quote
marc_al Posted March 25, 2013 #9 Posted March 25, 2013 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 Quote
grayer Posted March 25, 2013 Author #10 Posted March 25, 2013 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. Quote
grayer Posted March 26, 2013 Author #12 Posted March 26, 2013 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. Quote
marc_al Posted March 26, 2013 #13 Posted March 26, 2013 Hello, I will do some tests with your image file. thank you for the time you spent doing it 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 Quote
grayer Posted March 29, 2013 Author #14 Posted March 29, 2013 I'm currently running dsm4.2 maybe you need to compile kernel 3201 Quote
marc_al Posted March 29, 2013 #15 Posted March 29, 2013 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 Quote
grayer Posted March 30, 2013 Author #16 Posted March 30, 2013 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. Quote
marc_al Posted March 30, 2013 #17 Posted March 30, 2013 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 Quote
grayer Posted March 30, 2013 Author #18 Posted March 30, 2013 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. Quote
marc_al Posted March 30, 2013 #19 Posted March 30, 2013 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 . 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 Quote
grayer Posted March 30, 2013 Author #20 Posted March 30, 2013 dsm 4.2 zImage https://mega.co.nz/#!I1YgAayS!CrFUDEbMx ... 69_vX4NqJM hyper-v module https://mega.co.nz/#!RtBVlJpY!MbdYMX2kX ... y7NdVQ9Z9c kernel source https://mega.co.nz/#!VtomxDDQ!QiASvUYo0 ... cVV_S3bWsk all hv driver's patched, and My modification to kernel itsef is surrounded with '#ifdef SYNOLOGY_HYPERV' Quote
marc_al Posted March 30, 2013 #21 Posted March 30, 2013 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 Quote
veldieengineer Posted April 1, 2013 #22 Posted April 1, 2013 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. Quote
marc_al Posted April 1, 2013 #23 Posted April 1, 2013 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 Quote
marc_al Posted April 16, 2013 #24 Posted April 16, 2013 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 Quote
veldieengineer Posted April 17, 2013 #25 Posted April 17, 2013 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.