Xpenology runing on docker


Recommended Posts

  • 3 weeks later...
  • 2 weeks later...

I would like to run this docker on QNAP-4.5.2.1594 but receive errors:

 

[admin@NAS4]# uname -a
Linux NAS4 4.14.24-qnap #1 SMP Tue Mar 2 05:26:12 CST 2021 x86_64 GNU/Linux
[admin@NAS4]# iptables --version
iptables v1.4.21

Maybe the iptables is too old ?

 

INFO: Start downloading bootloader from URL ...

     0K ........ ........ ........ ........ 64% 93.3M 0s
 32768K ........ ........ ..               100% 61.4M=0.6s
INFO: Bootloader has been successfully downloaded from URL.
INFO: /image/bootloader.raw file size seems valid for synoboot.
INFO: Bootloader has been converted to qcow2
INFO: No Initial Disk found, creating disk /image/vm-disk-1.qcow2
Formatting '/image/vm-disk-1.qcow2', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
INFO: No Initial Disk found, creating disk /image/vm-disk-2.qcow2
Formatting '/image/vm-disk-2.qcow2', fmt=qcow2 size=17179869184 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
INFO: KVM acceleration enabled
INFO: Configuring network ...
net.ipv4.ip_forward = 1
INFO: DHCP configured to serve IP 20.20.20.21/24 via dockerbridge
iptables: No chain/target/match by that name.


 

docker run --privileged --cap-add=NET_ADMIN \ --device=/dev/net/tun --device=/dev/kvm \ -p 5007:5000 -p 5008:5001 -p 2222:22 -p 8888:80 \ -e CPU="qemu64" \ -e THREADS=1 \ -e RAM=512 \ -e DISK_SIZE="8G 16G" \ -e DISK_PATH="/image" \ -e BOOTLOADER_URL="http://localhost/synoboot_103b_ds3615xs_virtio_9p.img" \ -e BOOTLOADER_AS_USB="Y" \ -e VM_ENABLE_VIRTIO="Y" \ -v /tmp/tmp:/datashare \ uxora/xpenology

 

Link to post
Share on other sites
16 hours ago, s2k7 said:

I would like to run this docker on QNAP-4.5.2.1594 but receive errors:

 

[admin@NAS4]# uname -a
Linux NAS4 4.14.24-qnap #1 SMP Tue Mar 2 05:26:12 CST 2021 x86_64 GNU/Linux
[admin@NAS4]# iptables --version
iptables v1.4.21

Maybe the iptables is too old ?

 



INFO: Start downloading bootloader from URL ...

     0K ........ ........ ........ ........ 64% 93.3M 0s
 32768K ........ ........ ..               100% 61.4M=0.6s
INFO: Bootloader has been successfully downloaded from URL.
INFO: /image/bootloader.raw file size seems valid for synoboot.
INFO: Bootloader has been converted to qcow2
INFO: No Initial Disk found, creating disk /image/vm-disk-1.qcow2
Formatting '/image/vm-disk-1.qcow2', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
INFO: No Initial Disk found, creating disk /image/vm-disk-2.qcow2
Formatting '/image/vm-disk-2.qcow2', fmt=qcow2 size=17179869184 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
INFO: KVM acceleration enabled
INFO: Configuring network ...
net.ipv4.ip_forward = 1
INFO: DHCP configured to serve IP 20.20.20.21/24 via dockerbridge
iptables: No chain/target/match by that name.


 



docker run --privileged --cap-add=NET_ADMIN \ --device=/dev/net/tun --device=/dev/kvm \ -p 5007:5000 -p 5008:5001 -p 2222:22 -p 8888:80 \ -e CPU="qemu64" \ -e THREADS=1 \ -e RAM=512 \ -e DISK_SIZE="8G 16G" \ -e DISK_PATH="/image" \ -e BOOTLOADER_URL="http://localhost/synoboot_103b_ds3615xs_virtio_9p.img" \ -e BOOTLOADER_AS_USB="Y" \ -e VM_ENABLE_VIRTIO="Y" \ -v /tmp/tmp:/datashare \ uxora/xpenology

 

 

 

As suggested by uxora  in the previous post, after deleting following line, the docker started now.

Thanks a lot!

I installed DS3615xs to play.

DS918 seemed failure.

 

# iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill

Edited by s2k7
Link to post
Share on other sites
4 hours ago, s2k7 said:

 

As suggested by uxora  in the previous post, after deleting following line, the docker started now.

Thanks a lot!

I installed DS3615xs to play.

DS918 seemed failure.

 

# iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill

 

I cannot use 9p driver.

Any comments welcome!

 

admin@DS3615:~$ sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=262144 datashare /volume1/datashare
mount: special device datashare does not exist

 

I passed following settings to docker

    -e VM_PATH_9P="datashare" \
    -v /tmp/tmp:/datashare \

 

Edited by s2k7
Link to post
Share on other sites
  • 2 weeks later...
On 5/30/2021 at 2:32 PM, s2k7 said:

 

I cannot use 9p driver.

Any comments welcome!

 





admin@DS3615:~$ sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=262144 datashare /volume1/datashare
mount: special device datashare does not exist

 

I passed following settings to docker





    -e VM_PATH_9P="datashare" \
    -v /tmp/tmp:/datashare \

 

 

I figured out.

I have to use "hostdata" which is hard-coded in /usr/bin/vm-startup

"rw" is OK here. I use same uid bwteen host and xpenlogy for convenience.

 

admin@DS3615:~$ sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=262144 hostdata /volume1/datashare

 

  • Like 1
Link to post
Share on other sites
Sorry for the late reply, and that's great you figured that out by yourself.
But it was already written in this Readme here: https://github.com/uxora-com/xpenology-docker

Thank u for your great work!
I should read the information more carefully.

Another point for Synology Moments.
If your CPU has two threads, you have to start the docker, with threads=2.
Otherwise, Moments will not make face recognition.

Tapatalk を使用して私の ELS-NX9 から送信

Link to post
Share on other sites
  • 4 months later...

@s2k7

Hi, actually for 9p, tag changed a bit ... it's now hostdata0, hostdata1, ...

 

On 10/30/2021 at 3:22 PM, s2k7 said:

Redpill two versions worked well in this docker system.

Thanks for this info, i may give it a try :)

 

On 11/3/2021 at 9:49 AM, s2k7 said:

Is it possible to passthrough iGPU to xpenology ?

From proxmox, it is possible to passtrough pcie GPU to vm (tried and it works well)

and it seems possible to passtrough some iGPU as well (but never tried with iGPU)

 

Now, in this case of docker kvm, it seems more complicated cause u will need to (first) passtrough iGPU through docker then again pass it through KVM ... maybe it can be done but i never tried ... and then i am not sure which iGPU, ds918+ can work with. 

Link to post
Share on other sites
  • 1 month later...
  • 1 month later...

@seanone @hendry @s2k7

 

Hi all,

 

It's been a while ... 

 

I had some free time, so I have just updated https://github.com/uxora-com/xpenology-docker repository :

- to take in count Redpill bootloader compatibility

- to be able to change vid, pid and sn just by providing variables in cmd line (GRUBCFG_VID, GRUBCFG_PID and GRUBCFG_SN)

- to be able to run docker without BOOTLOADER_URL

 

To compile your own redpill loader with virtio and 9p, you may want to use RedPill Tinycore loader img and check this:

-  https://github.com/uxora-com/rpext

 

I did a quick test with redpill for DS3615xs with virtio/9p and it seems to be working pretty well.

I did not test it long enough to know if it's as much stable as Jun's loader 1.03b.

 

HTH,  

 

  • Like 3
  • Thanks 1
Link to post
Share on other sites
13 hours ago, uxora-com said:

@seanone @hendry @s2k7

 

Hi all,

 

It's been a while ... 

 

I had some free time, so I have just updated https://github.com/uxora-com/xpenology-docker repository :

- to take in count Redpill bootloader compatibility

- to be able to change vid, pid and sn just by providing variables in cmd line (GRUBCFG_VID, GRUBCFG_PID and GRUBCFG_SN)

- to be able to run docker without BOOTLOADER_URL

 

To compile your own redpill loader with virtio and 9p, you may want to use RedPill Tinycore loader img and check this:

-  https://github.com/uxora-com/rpext

 

I did a quick test with redpill for DS3615xs with virtio/9p and it seems to be working pretty well.

I did not test it long enough to know if it's as much stable as Jun's loader 1.03b.

 

HTH,  

 

 

I start to follow your guide on creating xpenology docker using redpill tinycore compiled with virtio and 9p.

but why it cannot start ?

 

[~] # docker run --privileged --name xpenology --cap-add=NET_ADMIN \
> --device=/dev/net/tun --device=/dev/kvm \
> -p 5500:5000 -p 5001:5001 -p 2224:22 -p 8084:80 \
> -e CPU="qemu64" \
> -e THREADS=1 \
> -e RAM=1024 \
> -e DISK_SIZE="8G 16G" \
> -e DISK_PATH="/xpy_syst" \
> -e BOOTLOADER_URL="http://192.168.10.2:81/tinycore-redpill.img" \
> -e BOOTLOADER_AS_USB="Y" \
> -e VM_ENABLE_VIRTIO="Y" \
> -e VM_PATH_9P="/xpy_data /xpy_syst" \
> -v /share/CACHEDEV1_DATA/Public/XPE/data:/xpy_data \
> -v /share/CACHEDEV1_DATA/Public/XPE/syst:/xpy_syst \
> uxora/xpenology
Unable to find image 'uxora/xpenology:latest' locally
latest: Pulling from uxora/xpenology
d5c6f90da05d: Pull complete
1300883d87d5: Pull complete
c220aa3cfc1b: Pull complete
2e9398f099dc: Pull complete
dc27a084064f: Pull complete
5d8619b1005b: Pull complete
a8615cd4c65b: Pull complete
787c4a2eba63: Pull complete
1b5c44bbe7b0: Pull complete
Digest: sha256:399edf7dd3adae507aa3658c6a45764860e38c3f249f5ad660fa8b775397b72c
Status: Downloaded newer image for uxora/xpenology:latest
INFO: Start downloading bootloader from URL: http://192.168.10.2:81/tinycore-redpill.img ...

     0K ........ ........ ........ ........ 25% 80.1M 1s
 32768K ........ ........ ........ ........ 50%  129M 1s
 65536K ........ ........ ........ ........ 75%  139M 0s
 98304K ........ ........ ........ ......  100%  166M=1.1s
INFO: Bootloader has been successfully downloaded from URL.

[~] # docker ps -a
CONTAINER ID   IMAGE             COMMAND                  CREATED              STATUS                     PORTS     NAMES
69ca692afe76   uxora/xpenology   "/bin/sh -c /usr/bin…"   About a minute ago   Exited (1) 2 seconds ago             xpenology
 

[~] # docker inspect 69ca692afe76
[
    {
        "Id": "69ca692afe764d12ebb125e743b3531c4514192a957a7d2849231ca1e7f7a7f0",
        "Created": "2022-02-12T05:13:13.162966656Z",
        "Path": "/bin/sh",
        "Args": [
            "-c",
            "/usr/bin/vm-startup"
        ],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 1,
            "Error": "",
            "StartedAt": "2022-02-12T05:14:41.493311546Z",
            "FinishedAt": "2022-02-12T05:14:41.523344309Z"
        },
        "Image": "sha256:728ea1290241051fead0d484c1b8cad811204b58307f0a38d6e8e9a41378cf23",
        "ResolvConfPath": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/69ca692afe764d12ebb125e743b3531c4514192a957a7d2849231ca1e7f7a7f0/resolv.conf",
        "HostnamePath": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/69ca692afe764d12ebb125e743b3531c4514192a957a7d2849231ca1e7f7a7f0/hostname",
        "HostsPath": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/69ca692afe764d12ebb125e743b3531c4514192a957a7d2849231ca1e7f7a7f0/hosts",
        "LogPath": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/69ca692afe764d12ebb125e743b3531c4514192a957a7d2849231ca1e7f7a7f0/69ca692afe764d12ebb125e743b3531c4514192a957a7d2849231ca1e7f7a7f0-json.log",
        "Name": "/xpenology",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/share/CACHEDEV1_DATA/Public/XPE/data:/xpy_data",
                "/share/CACHEDEV1_DATA/Public/XPE/syst:/xpy_syst"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-file": "10",
                    "max-size": "10m"
                }
            },
            "NetworkMode": "default",
            "PortBindings": {
                "22/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "2224"
                    }
                ],
                "5000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5500"
                    }
                ],
                "5001/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5001"
                    }
                ],
                "80/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8084"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": [
                "NET_ADMIN"
            ],
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": true,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [
                "label=disable"
            ],
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [
                {
                    "PathOnHost": "/dev/net/tun",
                    "PathInContainer": "/dev/net/tun",
                    "CgroupPermissions": "rwm"
                },
                {
                    "PathOnHost": "/dev/kvm",
                    "PathInContainer": "/dev/kvm",
                    "CgroupPermissions": "rwm"
                }
            ],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": [
                {
                    "Name": "nofile",
                    "Hard": 65535,
                    "Soft": 65535
                }
            ],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/4177bfa400078536a112271e63d06751bf9196a7506c8127b849d12d897be739-init/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/b9b52a025c4d490d4d7a23f9842d12df70a63b59b95f4cb83286af46c0d45cb4/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/b831b12601a08cbe08551eea287d0f252ff659fd20901050efddf6d69bba20ea/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/64f1db4bc51a1f4c1d76196d877415e8df814a906b407c8e70576aae45d9b1c7/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/8f19e99f10868f279647e05617a9d19aab08267f8a2370fbaa72e245623ca8e2/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/71fe8a8991e64e263aac5ccb2097711815a89414e5632c3d25a78235a22b41f6/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/8a635a6de62ae979bbe6c124ad860bdd330758ef7e121fb6bbd1eb070ba92c5e/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/e16b40090609a30bd187f01d21295827193150ec50bcbfb3dfee068e86b56ca6/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/91c0b080a31b99615423c367140f562fe0915b5d5e5a68258b23a08fc5d53353/diff:/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/5a5b9bb9f3e7eccd8d83a37a97f78f598098ad8bf76835842f8401c9f4d706e8/diff",
                "MergedDir": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/4177bfa400078536a112271e63d06751bf9196a7506c8127b849d12d897be739/merged",
                "UpperDir": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/4177bfa400078536a112271e63d06751bf9196a7506c8127b849d12d897be739/diff",
                "WorkDir": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/4177bfa400078536a112271e63d06751bf9196a7506c8127b849d12d897be739/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "c600d9295a65b8b2c763f5042d378d4f907a036d0a869a52ca18d5a3d41aae12",
                "Source": "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/volumes/c600d9295a65b8b2c763f5042d378d4f907a036d0a869a52ca18d5a3d41aae12/_data",
                "Destination": "/datashare",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "/share/CACHEDEV1_DATA/Public/XPE/data",
                "Destination": "/xpy_data",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/share/CACHEDEV1_DATA/Public/XPE/syst",
                "Destination": "/xpy_syst",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "69ca692afe76",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "111/tcp": {},
                "139/tcp": {},
                "2049/tcp": {},
                "22/tcp": {},
                "445/tcp": {},
                "5000/tcp": {},
                "5001/tcp": {},
                "80/tcp": {},
                "892/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "CPU=qemu64",
                "THREADS=1",
                "RAM=1024",
                "DISK_PATH=/xpy_syst",
                "BOOTLOADER_URL=http://192.168.10.2:81/tinycore-redpill.img",
                "DISK_SIZE=8G 16G",
                "BOOTLOADER_AS_USB=Y",
                "VM_ENABLE_VIRTIO=Y",
                "VM_PATH_9P=/xpy_data /xpy_syst",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "CORES=1",
                "DISK_FORMAT=qcow2",
                "DISK_CACHE=none",
                "VM_IP=20.20.20.21",
                "VM_MAC=00:11:32:2C:A7:85",
                "VM_ENABLE_VGA=N",
                "VM_ENABLE_9P=Y",
                "VM_CUSTOM_OPTS=",
                "VM_TIMEOUT_POWERDOWN=10",
                "GRUBCFG_VID=46f4",
                "GRUBCFG_PID=0001",
                "GRUBCFG_SN=",
                "GRUBCFG_DISKIDXMAP=",
                "GRUBCFG_SATAPORTMAP="
            ],
            "Cmd": null,
            "Image": "uxora/xpenology",
            "Volumes": {
                "/datashare": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/bin/sh",
                "-c",
                "/usr/bin/vm-startup"
            ],
            "OnBuild": null,
            "Labels": {
                "maintainer": "Michel VONGVILAY <https://www.uxora.com/about/me#contact-form>",
                "version": "0.1"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "ca1b703bd2f914660600ca51f0be0900f8b54b1bc66c20fb8a5fb4bf14816fa0",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/ca1b703bd2f9",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "2a5f8c976a3871761e58ec8dbaf9be942231e9bd9448d0e7555362caa4c23f6c",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]
 

is it because redpill loader when start has grub menu, so the grub may not valid within docker ?

 

Edited by hendry
Link to post
Share on other sites

@henry

 

I just have updated docker base image to update linux debian bullseye and kvm 5.2 for better compatibility.

Maybe you can give another try.

 

11 hours ago, hendry said:

is it because redpill loader when start has grub menu, so the grub may not valid within docker ?

 

 

I don't know what you mean by that. And I cannot see any error in your output.

I just tried a new container with BOOTLOADER_URL pointing to a redpill bootloader (virtio/9p) and it still works.

 

11 hours ago, hendry said:

can i run xpenology docker on qnap NAS ?

 

 

I don't know ... I never tried. And I dont have qnap.

Link to post
Share on other sites
On 2/12/2022 at 11:47 PM, uxora-com said:

@henry

 

I just have updated docker base image to update linux debian bullseye and kvm 5.2 for better compatibility.

Maybe you can give another try.

 

 

I don't know what you mean by that. And I cannot see any error in your output.

I just tried a new container with BOOTLOADER_URL pointing to a redpill bootloader (virtio/9p) and it still works.

 

 

I don't know ... I never tried. And I dont have qnap.

 

i tried to run docker using -it --entrypoint /bin/bash 

i can enter to the prompt, when i execute /usr/bin/vm-startup it show 

INFO: Skip URL download, raw bootloader already exist: /xpy_syst/bootloader.img

 

then i run docker again without using -it options, but it always exit not starting.

how can i inspect what caused xpenology cannot start ?

 

@uxora-comwould u pls attach your bootloader.img here ? it seems, the bootloader cannot run.. 

 

EDIT:

when i execute /usr/bin/vm-startup, it seems this command cannot executes.

tmp_bootl_part1="$( fdisk -l -o Device,Start,Sectors,Type ${BOOTLOADER_FULLPATH} | grep -e .${BOOTLOADER_FULLPATH##*/}1.*2048 )"

 

then i try to check my bootloader.img from that command. 

root@6c39a54eab6c:/usr/bin# fdisk -l -o Device,Start,Sectors,Type /xpy_syst/bootloader.img
Disk /xpy_syst/bootloader.img: 126.4 MiB, 132579328 bytes, 258944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 

i suspect, my bootloader.img compiled from redpill loader is not compatible with your script. 

would like you to send me your bootloader.img.

 

 

Edited by hendry
Link to post
Share on other sites

I download synoboot 3615.img and try to run docker again, but it stopped on this command

 

INFO: Launching qemu-kvm ...
DEBUG: qemu-system-x86_64  -device 'ahci,id=ahci0,multifunction=on,bus=pcie.0,addr=0x7' -drive 'file=/xpy_syst/vm-disk-0-snapshot.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pcie.0,addr=0xa'  -device 'nec-usb-xhci,id=usb-bus0,multifunction=on' -drive 'file=/xpy_syst/bootloader.qcow2,format=qcow2,if=none,id=drive-disk-bootloader,cache=none,aio=native,detect-zeroes=on' -device 'usb-storage,bus=usb-bus0.0,port=1,drive=drive-disk-bootloader,id=usb-disk-bootloader,bootindex=1,removable=on'  -drive 'file=/xpy_syst/vm-disk-1.qcow2,if=none,id=drive-sata1,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ahci0.1,drive=drive-sata1,id=sata1' -drive 'file=/xpy_syst/vm-disk-2.qcow2,if=none,id=drive-sata2,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ahci0.2,drive=drive-sata2,id=sata2'   -machine q35   -nodefaults   -realtime mlock=off   -msg timestamp=on   -chardev pty,id=charserial0   -device isa-serial,chardev=charserial0,id=serial0   -serial stdio   -monitor unix:/run/qemu-monitor.sock,server,nowait   -pidfile /run/qemu.pid    -device 'virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x3' -enable-kvm -machine accel=kvm,usb=off  -nographic -m 1024 -cpu qemu64 -smp 1,sockets=1,cores=1,threads=1 -netdev tap,ifname=vm-nat,script=no,downscript=no,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,mac=00:11:32:2C:A7:85,id=net0  -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/xpy_data -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=hostdata0,bus=pcie.0 -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/xpy_syst -device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=hostdata1,bus=pcie.0
2022-02-14T09:07:56.795053Z qemu-system-x86_64: -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/xpy_syst: Duplicate ID 'fsdev-fs0' for fsdev
 

before, the iptables command also return some errors.

iptables: No chain/target/match by that name.
WARNING: Iptables hack for checksum FAILED
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
 

 

Edited by hendry
Link to post
Share on other sites

i compare both synoboot.img & redpill loader img file.

the redpill loader structure is :

redpill.png.503fad8f5575e8a37ef7521b0bf685c2.png

the synoboot.img structure is 

synoboot.png.f3365175b5d25e3f0f19eebf09d465a3.png

the uxora script only run on synoboot.img file.  even it ended with errors like my previous post.. 

why redpill loader cannot run from his script ?

 

 

Edited by hendry
Link to post
Share on other sites
2 hours ago, hendry said:

I download synoboot 3615.img and try to run docker again, but it stopped on this command

 

INFO: Launching qemu-kvm ...
DEBUG: qemu-system-x86_64  -device 'ahci,id=ahci0,multifunction=on,bus=pcie.0,addr=0x7' -drive 'file=/xpy_syst/vm-disk-0-snapshot.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pcie.0,addr=0xa'  -device 'nec-usb-xhci,id=usb-bus0,multifunction=on' -drive 'file=/xpy_syst/bootloader.qcow2,format=qcow2,if=none,id=drive-disk-bootloader,cache=none,aio=native,detect-zeroes=on' -device 'usb-storage,bus=usb-bus0.0,port=1,drive=drive-disk-bootloader,id=usb-disk-bootloader,bootindex=1,removable=on'  -drive 'file=/xpy_syst/vm-disk-1.qcow2,if=none,id=drive-sata1,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ahci0.1,drive=drive-sata1,id=sata1' -drive 'file=/xpy_syst/vm-disk-2.qcow2,if=none,id=drive-sata2,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ahci0.2,drive=drive-sata2,id=sata2'   -machine q35   -nodefaults   -realtime mlock=off   -msg timestamp=on   -chardev pty,id=charserial0   -device isa-serial,chardev=charserial0,id=serial0   -serial stdio   -monitor unix:/run/qemu-monitor.sock,server,nowait   -pidfile /run/qemu.pid    -device 'virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x3' -enable-kvm -machine accel=kvm,usb=off  -nographic -m 1024 -cpu qemu64 -smp 1,sockets=1,cores=1,threads=1 -netdev tap,ifname=vm-nat,script=no,downscript=no,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,mac=00:11:32:2C:A7:85,id=net0  -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/xpy_data -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=hostdata0,bus=pcie.0 -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/xpy_syst -device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=hostdata1,bus=pcie.0
2022-02-14T09:07:56.795053Z qemu-system-x86_64: -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/xpy_syst: Duplicate ID 'fsdev-fs0' for fsdev
 

before, the iptables command also return some errors.

iptables: No chain/target/match by that name.
WARNING: Iptables hack for checksum FAILED
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
 

 

there're little errors on this code

 

for path_ in $VM_PATH_9P ; do

log "INFO" "... path=${path_} , mount_tag=hostdata${i}"

KVM_9P="${KVM_9P} -fsdev local,security_model=passthrough,id=fsdev-fs0,path=${path_} -device virtio-9p-pci,id=fs${i},fsdev=fsdev-fs${i},mount_tag=hostdata${i},bus=pcie.0"

((++i))

done

 

 

it should be like this.

KVM_9P="${KVM_9P} -fsdev local,security_model=passthrough,id=fsdev-fs${i},path=${path_} -device virtio-9p-pci,id=fs${i},fsdev=fsdev-fs${i},mount_tag=hostdata${i},bus=pcie.0"

((++i))

@uxora-complease fix your code for this error... 

 

it can start now, displaying grub menu..

+----------------------------------------------------------------------------+
 |*DS3615xs 6.2 Baremetal with Jun's Mod v1.03b                               |
 | DS3615xs 6.2 Baremetal with Jun's Mod v1.03b Reinstall                     |
 | DS3615xs 6.2 VMWare/ESXI with Jun's Mod v1.03b                             |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 +----------------------------------------------------------------------------+

      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line.
   The highlighted entry will be executed automatically in 0s.
patching file etc/rc
patching file etc/synoinfo.conf
patching file linuxrc.syno
patching file usr/sbin/init.post
START /linuxrc.syno
Insert basic USB modules...
:: Loading module usb-common ... [  OK  ]
:: Loading module usbcore ... [  OK  ]
:: Loading module ehci-hcd ... [  OK  ]
:: Loading module ehci-pci ... [  OK  ]
:: Loading module ohci-hcd ... [  OK  ]
:: Loading module uhci-hcd ... [  OK  ]
:: Loading module xhci-hcd ... [  OK  ]
:: Loading module usb-storage ... [  OK  ]
:: Loading module scsi_transport_spi ... [  OK  ]
:: Loading module BusLogic ... [  OK  ]
:: Loading module vmw_pvscsi ... [  OK  ]
:: Loading module megaraid_mm ... [  OK  ]
:: Loading module megaraid_mbox ... [  OK  ]
:: Loading module megaraid ... [  OK  ]
:: Loading module mptbase ... [  OK  ]
:: Loading module mptscsih ... [  OK  ]
:: Loading module mptspi ... [  OK  ]
:: Loading module mptsas ... [  OK  ]
:: Loading module mptctl ... [  OK  ]
:: Loading module megaraid_sas ... [  OK  ]
:: Loading module mpt2sas ... [  OK  ]
:: Loading module mpt3sas ... [  OK  ]
:: Loading module sx8 ... [  OK  ]
:: Loading module aacraid ... [  OK  ]
:: Loading module aic94xx ... [  OK  ]
:: Loading module 3w-9xxx ... [  OK  ]
:: Loading module 3w-sas ... [  OK  ]
:: Loading module 3w-xxxx ... [  OK  ]
:: Loading module mvumi ... [  OK  ]
:: Loading module mvsas ... [  OK  ]
:: Loading module arcmsr ... [  OK  ]
:: Loading module isci ... [  OK  ]
:: Loading module hpsa ... [  OK  ]
:: Loading module nvme ... [  OK  ]
:: Loading module ata_piix ... [  OK  ]
:: Loading module virtio ... [  OK  ]
:: Loading module virtio_ring ... [  OK  ]
:: Loading module virtio_scsi ... [  OK  ]
:: Loading module virtio_pci ... [  OK  ]
:: Loading module virtio_blk ... [  OK  ]
:: Loading module aufs ... [  OK  ]
Insert net driver(Mindspeed only)...
Starting /usr/syno/bin/synocfgen...
/usr/syno/bin/synocfgen returns 0
All disk ready or timeout execeed
Partition Version=0
Partition layout is not DiskStation style.
NOT EXECUTE /sbin/e2fsck.
Mounting /dev/md0 /tmpRoot
mount: lseek failed, msg:Invalid argument
mount: mounting /dev/md0 on /tmpRoot failed: No such device
mount /dev/md0 fail, returns
Exit on error [3] no init exists...
Mon Feb 14 11:35:07 UTC 2022
none /sys/kernel/debug debugfs rw,relatime 0 0
sys /sys sysfs rw,relatime 0 0
none /dev devtmpfs rw,relatime,size=496472k,nr_inodes=124118,mode=755 0 0
umount: can't umount /dev: Device or resource busy
proc /proc proc rw,relatime 0 0
linuxrc.syno failed on 3
starting pid 4317, tty '': '/etc/rc'
:: Starting /etc/rc
:: Mounting procfs ... [  OK  ]
:: Mounting tmpfs ... [  OK  ]
:: Mounting devtmpfs ... [FAILED]
:: Mounting devpts ... [  OK  ]
:: Mounting sysfs ... [  OK  ]
mdadm: error opening /dev/md1: No such file or directory
rc: Use all internal disk as swap.
swapon: can't stat '/dev/md1': No such file or directory
:: Loading module sg ... [  OK  ]
:: Loading module crc-ccitt ... [  OK  ]
:: Loading module crc-itu-t ... [  OK  ]
:: Loading module mdio ... [  OK  ]
:: Loading module rng-core ... [  OK  ]
:: Loading module fat ... [  OK  ]
:: Loading module vfat ... [  OK  ]
:: Loading module ip_tunnel ... [  OK  ]
:: Loading module vxlan ... [  OK  ]
:: Loading module dca ... [  OK  ]
:: Loading module e1000e ... [  OK  ]
:: Loading module i2c-algo-bit ... [  OK  ]
:: Loading module igb ... [  OK  ]
:: Loading module be2net ... [  OK  ]
:: Loading module ixgbe ... [  OK  ]
:: Loading module r8168 ... [  OK  ]
:: Loading module libcrc32c ... [  OK  ]
:: Loading module mii ... [  OK  ]
:: Loading module libphy ... [  OK  ]
:: Loading module atl1 ... [  OK  ]
:: Loading module atl1e ... [  OK  ]
:: Loading module atl1c ... [  OK  ]
:: Loading module alx ... [  OK  ]
:: Loading module uio ... [  OK  ]
:: Loading module ipg ... [  OK  ]
:: Loading module jme ... [  OK  ]
:: Loading module skge ... [  OK  ]
:: Loading module sky2 ... [  OK  ]
:: Loading module ptp_pch ... [  OK  ]
:: Loading module pch_gbe ... [  OK  ]
:: Loading module qla3xxx ... [  OK  ]
:: Loading module qlcnic ... [  OK  ]
:: Loading module qlge ... [  OK  ]
:: Loading module netxen_nic ... [  OK  ]
:: Loading module sfc ... [  OK  ]
:: Loading module e1000 ... [  OK  ]
:: Loading module pcnet32 ... [  OK  ]
:: Loading module vmxnet3 ... [  OK  ]
:: Loading module bnx2 ... [  OK  ]
:: Loading module bnx2x ... [  OK  ]
:: Loading module igbvf ... [  OK  ]
:: Loading module ixgbevf ... [  OK  ]
:: Loading module r8101 ... [  OK  ]
:: Loading module r8125 ... [  OK  ]
:: Loading module r8169 ... [  OK  ]
:: Loading module tg3 ... [  OK  ]
:: Loading module usbnet ... [  OK  ]
:: Loading module ax88179_178a ... [  OK  ]
:: Loading module button ... [  OK  ]
:: Loading module evdev ... [  OK  ]
:: Loading module atl2 ... [  OK  ]
:: Loading module e100 ... [  OK  ]
:: Loading module ixgb ... [  OK  ]
:: Loading module forcedeth ... [  OK  ]
:: Loading module tn40xx[    9.399233] tn40xx: Tehuti Network Driver, 0.3.6.17.2
[    9.400369] tn40xx: Supported phys : MV88X3120 MV88X3310 MV88E2010 QT2025 TLK10232 AQR105 MUSTANG
 ... [  OK  ]
:: Loading module cxgb ... [  OK  ]
:: Loading module cxgb3 ... [  OK  ]
:: Loading module cxgb4 ... [  OK  ]
:: Loading module atlantic ... [  OK  ]
:: Loading module bna ... [  OK  ]
:: Loading module vxge ... [  OK  ]
:: Loading module aqc111 ... [  OK  ]
:: Loading module asix ... [  OK  ]
:: Loading module cx82310_eth ... [  OK  ]
:: Loading module et131x ... [  OK  ]
:: Loading module i40e ... [  OK  ]
:: Loading module i40evf ... [  OK  ]
:: Loading module mcs7830 ... [  OK  ]
:: Loading module pegasus ... [  OK  ]
:: Loading module plusb ... [  OK  ]
:: Loading module r8152 ... [  OK  ]
:: Loading module rtl8150 ... [  OK  ]
:: Loading module s2io ... [  OK  ]
:: Loading module xgmac ... [  OK  ]
:: Loading module virtio_net ... [  OK  ]
:: Loading module virtio_mmio ... [  OK  ]
:: Loading module virtio_balloon ... [  OK  ]
:: Loading module 9pnet ... [  OK  ]
:: Loading module 9pnet_virtio ... [  OK  ]
:: Loading module 9p ... [  OK  ]
:: Loading module synobios ... [  OK  ]
udhcpc (v1.16.1) started
eth0      Link encap:Ethernet  HWaddr 00:11:32:2C:A7:85
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

:: Starting syslogd ... [  OK  ]
:: Starting scemd
:: Starting services in background
Starting findhostd in flash_rd...
Starting services in flash_rd...
Running /usr/syno/etc/rc.d/J01httpd.sh...
Starting httpd:80 in flash_rd...
Starting httpd:5000 in flash_rd...
Running /usr/syno/etc/rc.d/J03ssdpd.sh...
/usr/bin/minissdpd -i eth0
(15): upnp:rootdevice
(51): uuid:upnp_SynologyNAS-0011322ca785::upnp:rootdevice
(55): Synology/synology_bromolow_3615xs/6.2-23739/20.20.20.21
(44): http://20.20.20.21:5000/description-eth0.xml
Connected.
done.
/usr/syno/bin/reg_ssdp_service 20.20.20.21 0011322ca785 6.2-23739 synology_bromolow_3615xs eth0
Running /usr/syno/etc/rc.d/J04synoagentregisterd.sh...
Starting synoagentregisterd...
Running /usr/syno/etc/rc.d/J30DisableNCQ.sh...
Running /usr/syno/etc/rc.d/J80ADTFanControl.sh...
Running /usr/syno/etc/rc.d/J98nbnsd.sh...
Starting nbnsd...
Running /usr/syno/etc/rc.d/J99avahi.sh...
Starting Avahi mDNS/DNS-SD Daemon
cname_load_conf failed:/var/tmp/nginx/avahi-aliases.conf
:: Loading module hid ... [  OK  ]
:: Loading module usbhid ... [  OK  ]
============ Date ============
Mon Feb 14 11:35:15 UTC 2022
==============================
starting pid 6660, tty '': '/sbin/getty 115200 console'

Mon Feb 14 11:35:16 2022

DiskStation login:

 

still got some errors..

 

Partition layout is not DiskStation style.
NOT EXECUTE /sbin/e2fsck.
Mounting /dev/md0 /tmpRoot
mount: lseek failed, msg:Invalid argument
mount: mounting /dev/md0 on /tmpRoot failed: No such device
mount /dev/md0 fail, returns
Exit on error [3] no init exists...

 

any idea ??

 

but DSM web ui can show now..

image.thumb.png.3d571373e43270efe40116a90d0155b7.png

 

 

EDIT: after flashing with DS3615xs pat file for DSM 7.0.1 and success 100%, it reboot but with following errors:

va not found
Failed to process header

and i can't access web ui anymore..
any idea ??

Edited by hendry
Link to post
Share on other sites

if using redpill loader downloaded from this forum, find errors 

 

warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
error: file `/boot/grub/i386-pc/efi_gop.mod' not found.
error: file `/boot/grub/i386-pc/efi_uga.mod' not found.
error: file `/boot/grub/unicode.pf2' not found.

 

and when it starting, it stuck on this line..

:: Loading module adt7475

 

i think module adt7475 cannot be loaded, it hung.. 

 

Link to post
Share on other sites
On 2/22/2021 at 8:58 PM, koval said:

Hello, 

I have successfully started this container. But found issues with "Storage pool". I couldn't create storage pool. DSM show that "Storage pool required HDD". 

But I have already created 16 Gb disk.  Can someone tell me where I am wrong?

 

 

 

Screenshot_406.thumb.png.5cdaa70d15007feb705a9303a9d4cdad.png

 

 

 

did you success to install DSM 7.0.1 on docker ?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.