bypass license check issue with xo-proxy. issue #111
This commit is contained in:
@@ -149,6 +149,8 @@ deb:
|
||||
|
||||
**Proxy installation method is experimental, use at your own risk. Proxy installation from sources is not documented by Xen Orchestra team. Method used here is the outcome of trial and error.**
|
||||
|
||||
**Proxy source code will be edited slightly to disable license check which only works with official XOA and there is no documented or working procedure to bypass it properly (there used to be but not anymore)**
|
||||
|
||||
Backup proxy can be used to offload backup tasks from the main Xen Orchestra instance to a proxy which has a direct connection to remote where backups are stored.
|
||||
|
||||
Requirements for proxy VM are otherwise the same as mentioned above, in addition the VM needs to live inside XCP-ng/XenServer pool managed by Xen Orchestra instance and have xen tools installed. VM needs to have access to pool master host and Xen Orchestra needs to be able to access this VM via TCP/443.
|
||||
|
@@ -935,8 +935,36 @@ function InstallXOProxy {
|
||||
runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn && yarn build"
|
||||
printok "Running installation"
|
||||
|
||||
echo
|
||||
printinfo "Disabling license check in proxy to enable running it in XO from sources"
|
||||
|
||||
cat <<-EOF | runcmd "patch --fuzz=0 --no-backup-if-mismatch $INSTALLDIR/xo-builds/xen-orchestra-$TIME/@xen-orchestra/proxy/app/mixins/appliance.mjs"
|
||||
--- appliance.mjs~ 2022-03-30 15:28:52.360814994 +0300
|
||||
+++ appliance.mjs 2022-03-30 15:27:57.823598169 +0300
|
||||
@@ -153,10 +153,13 @@
|
||||
|
||||
// A proxy can be bound to a unique license
|
||||
getSelfLicense() {
|
||||
- return Disposable.use(getUpdater(), async updater => {
|
||||
- const licenses = await updater.call('getSelfLicenses')
|
||||
- const now = Date.now()
|
||||
- return licenses.find(({ expires }) => expires === undefined || expires > now)
|
||||
- })
|
||||
+ // modified by XenOrchestraInstallerUpdater
|
||||
+ //
|
||||
+ // return Disposable.use(getUpdater(), async updater => {
|
||||
+ // const licenses = await updater.call('getSelfLicenses')
|
||||
+ // const now = Date.now()
|
||||
+ // return licenses.find(({ expires }) => expires === undefined || expires > now)
|
||||
+ // })
|
||||
+ return true
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
echo
|
||||
printinfo "Generate systemd service configuration file"
|
||||
|
||||
cat <<EOF >/etc/systemd/system/xo-proxy.service
|
||||
[Unit]
|
||||
Description=xo-proxy
|
||||
@@ -950,6 +978,7 @@ SyslogIdentifier=xo-proxy
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
printinfo "Reloading systemd configuration"
|
||||
runcmd "/bin/systemctl daemon-reload"
|
||||
|
||||
|
Reference in New Issue
Block a user