Meof

XPEnology 6.x over XEN

Recommended Posts

Succesfully installed DSM 6.1.4 on Xen. If somebody is interested in, please drop a post.

Share this post


Link to post
Share on other sites


Disclaimer: sorry for my poor english, but who cares...

 

So, at the beginning I've tried to do bare metal install with DSM loader image found on this site (Juns's mod).
It boots, but installation fails at some steps, sometimes on attempt to upgrade BIOS (whaat?), sometimes on raid setup (is seems that DS361x cant run withot raid),
and somtimes in does not, but downloading and installing original image of DSM itself fails. Putting downloaded official pat-image into the installer causes
fail too.

 

After that I've guess that I can install in onto Virtualbox-managed VM and then try to convert to RAW hdd image and run it over XEN. And it works!

The manual I've used for it is located here: https://xpenology.club/install-dsm-6-1-on-virtualbox/

 

After following installation steps and tests you need just to

VBoxManage clonehd disk.vdi disk.img -format RAW

 it on a linux machine with virtualbox installed on. Or even a windows machine, haven't tested, but think that's the same.

Disk size in my case was 8G.

 

The xen config I've got it works is...
(I've got XEN 4.8 on (under :) Debian machine, without any modifications, not the Citrixs release)

#
##
#
# on some releases you need to kernel = '/usr/lib/xen-4.x/bin/hvmloader'
builder='hvm'
memory = 1024
vcpus=1
name = "anyofyourchoise"
# The same mac as is in bootloader. The serial is already there to, btw
# Model=e1000 is required
# DHCP is required for first-run
vif = ['mac=00:11:32:2C:A7:85,bridge=br-b0-v1990-u,model=e1000']
disk = [
        'file:/mnt/surveillance0/boot.img,hda,w', # not touched bootloader from the link above
        'file:/mnt/surveillance0/disk.img,hdb,w', # converted virtualbox image
        'phy:/dev/Surveillance/Disk1,hdc,w',      # vg or dd-ed image or sparce image, don't matter
        'phy:/dev/Surveillance/Disk2,hdd,w',      # vg or...
]
acpi = 1
device_model_version = 'qemu-xen'
device_model_override = '/usr/bin/qemu-system-x86_64'
boot="c"
#sdl=0
serial='pty'
vnc=0
vnclisten=""
vncpasswd=""

on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy" # to prevent 'looping', you can change to restart after all's done
#
##
#

So, what problems you can reach after trying to run the converted image over xen...

 

It boots slowly. That's my first expierence with xpenology, and maybe it's normal. When it is booting, DO NOT TOUCH the web interface, even the xen console.
Reboot will be triggered. And sometimes it will lose own config and the solution is only the reinstalling. Just wait after starting VM 30-40 seconds measured
by ping command (when you got first pong) and try to log in.

 

DO NOT touch the xen console never. Causes crash after 5-10 seconds and then only the reinstalling will help.
(BTW, xen console works when trying to bare metal install over xen, without virtualbox, but the install fails. tail -f /var/log/* if you want to do some
researches, but... just wasting of time. Maybe it will work with proper disk config, but which of them, witches, are proper? :)

 

If the DSM says that 'blah-blah-blah, config was modified or even not found', just boot it again and choose 'Reinstall' in Jun's mod grub. Sometimes it
helps, sometimes not. After converting virtualbox image just copy it somewere and use when your DSM will brick up. For the unknown reasons it will brick up.
Or will not, if you're luck blessed.

 

First time you boot, DO NOT give the data disks to it. Only bootloader and image from virtualbox. 

After your succesfully login via web-interface, take a look on disks it have. There will be two disks, obviously, the bootloader and the converted disk.
DSM will ask you for RAID creation on this disks (RAID is required on DS361x), DO NOT do it. The DSM doesn't matter it's installed on this disks and will
erase it. 

 

Then, shutdown gracefully your VM via button in DSMs web interface, modify the config and pass two (or four, e. g., even number for RAID) disks, which are
logical volumes, disk images or even hda pass-through (tested only with LVM).

 

Start the VM again, wait 40 secs and open disk manager. Then you need to create RAID array. I've chose JBOD, but think, that RAID1 and others will work to.
Be aware of touching the bootloader and converted image disk, it will destroy the system. Just forget about them.


Array creation and FS formatting goes slowly to, please wait it say that all's done.


Then gracefully reboot the DSM and pray. 2 of 3 times I've tried to assemble array and format it, it falls.

 

Last time I've got working system it requested to update itself. The "data" disks was detached. The update finished succesfully, system doesn't bricked.

 

Once or twice I've caught  the 'config not found' on DSM exception after turning off VNC in XEN config file. Be careful.

 

If you've got problems with your DSM like '404 not found error' or 'config not found', try to copy your converted image and do all the steps again.

 

After following this weird steps over and over again I've got working DSM wich can shut down, restart, update, xl destroy and boot properly after power loosing.

 

NOT TESTED:
Adding new disks
Adding new CPU
Adding new memory
Adding new NIC (will not work without modifying the bootloader)
Sparse disk images
HDD pass-through
Hot-swapping all described above

 

Unfortunately, I cant produse the step-by-step guide cause it fails randomly on random issues. But the result is stable.

 

I'm open up for any questions.


 

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