VIrtualBox: How to update the VBox.log location for a VM - virtualbox

After moving a VM into an external disk and updating the VM's disk image files, starting up the VM will show this warning
Starting "default"...
(default) Check network to re-create if needed...
Checking if hardware virtualization is enabled failed: open /Users/hanxue/.docker/machine/machines/default/default/Logs/VBox.log: no such file or directory
The VBoxManage modifyvm command does not seem to have an option to specify the log file
modifyvm <uuid|vmname>
[--name <name>]
[--groups <group>, ...]
[--description <desc>]
[--ostype <ostype>]
[--iconfile <filename>]
[--memory <memorysize in MB>]
[--pagefusion on|off]
[--vram <vramsize in MB>]
[--acpi on|off]
[--pciattach 03:04.0]
[--pciattach 03:04.0#02:01.0]
[--pcidetach 03:04.0]
[--ioapic on|off]
[--hpet on|off]
[--triplefaultreset on|off]
[--apic on|off]
[--x2apic on|off]
[--paravirtprovider none|default|legacy|minimal|
hyperv|kvm]
[--paravirtdebug <key=value> [,<key=value> ...]]
[--hwvirtex on|off]
[--nestedpaging on|off]
[--largepages on|off]
[--vtxvpid on|off]
[--vtxux on|off]
[--pae on|off]
[--longmode on|off]
[--ibpb-on-vm-exit on|off]
[--ibpb-on-vm-entry on|off]
[--spec-ctrl on|off]
[--l1d-flush-on-sched on|off]
[--l1d-flush-on-vm-entry on|off]
[--cpu-profile "host|Intel 80[86|286|386]"]
[--cpuid-portability-level <0..3>
[--cpuid-set <leaf[:subleaf]> <eax> <ebx> <ecx> <edx>]
[--cpuid-remove <leaf[:subleaf]>]
[--cpuidremoveall]
[--hardwareuuid <uuid>]
[--cpus <number>]
[--cpuhotplug on|off]
[--plugcpu <id>]
[--unplugcpu <id>]
[--cpuexecutioncap <1-100>]
[--rtcuseutc on|off]
[--graphicscontroller none|vboxvga|vmsvga]
[--monitorcount <number>]
[--accelerate3d on|off]
[--accelerate2dvideo on|off]
[--firmware bios|efi|efi32|efi64]
[--chipset ich9|piix3]
[--bioslogofadein on|off]
[--bioslogofadeout on|off]
[--bioslogodisplaytime <msec>]
[--bioslogoimagepath <imagepath>]
[--biosbootmenu disabled|menuonly|messageandmenu]
[--biosapic disabled|apic|x2apic]
[--biossystemtimeoffset <msec>]
[--biospxedebug on|off]
[--boot<1-4> none|floppy|dvd|disk|net>]
[--nic<1-N> none|null|nat|bridged|intnet|hostonly|
generic|natnetwork]
[--nictype<1-N> Am79C970A|Am79C973|
82540EM|82543GC|82545EM|
virtio]
[--cableconnected<1-N> on|off]
[--nictrace<1-N> on|off]
[--nictracefile<1-N> <filename>]
[--nicproperty<1-N> name=[value]]
[--nicspeed<1-N> <kbps>]
[--nicbootprio<1-N> <priority>]
[--nicpromisc<1-N> deny|allow-vms|allow-all]
[--nicbandwidthgroup<1-N> none|<name>]
[--bridgeadapter<1-N> none|<devicename>]
[--hostonlyadapter<1-N> none|<devicename>]
[--intnet<1-N> <network name>]
[--nat-network<1-N> <network name>]
[--nicgenericdrv<1-N> <driver>
[--natnet<1-N> <network>|default]
[--natsettings<1-N> [<mtu>],[<socksnd>],
[<sockrcv>],[<tcpsnd>],
[<tcprcv>]]
[--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport>]
[--natpf<1-N> delete <rulename>]
[--nattftpprefix<1-N> <prefix>]
[--nattftpfile<1-N> <file>]
[--nattftpserver<1-N> <ip>]
[--natbindip<1-N> <ip>
[--natdnspassdomain<1-N> on|off]
[--natdnsproxy<1-N> on|off]
[--natdnshostresolver<1-N> on|off]
[--nataliasmode<1-N> default|[log],[proxyonly],
[sameports]]
[--macaddress<1-N> auto|<mac>]
[--mouse ps2|usb|usbtablet|usbmultitouch]
[--keyboard ps2|usb
[--uart<1-N> off|<I/O base> <IRQ>]
[--uartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
tcpserver <port>|
tcpclient <hostname:port>|
file <file>|
<devicename>]
[--guestmemoryballoon <balloonsize in MB>]
[--audio none|null|coreaudio]
[--audioin on|off]
[--audioout on|off]
[--audiocontroller ac97|hda|sb16]
[--audiocodec stac9700|ad1980|stac9221|sb16]
[--clipboard disabled|hosttoguest|guesttohost|
bidirectional]
[--draganddrop disabled|hosttoguest]
[--vrde on|off]
[--vrdeextpack default|<name>
[--vrdeproperty <name=[value]>]
[--vrdeport <hostport>]
[--vrdeaddress <hostip>]
[--vrdeauthtype null|external|guest]
[--vrdeauthlibrary default|<name>
[--vrdemulticon on|off]
[--vrdereusecon on|off]
[--vrdevideochannel on|off]
[--vrdevideochannelquality <percent>]
[--usb on|off]
[--usbehci on|off]
[--usbxhci on|off]
[--usbrename <oldname> <newname>]
[--snapshotfolder default|<path>]
[--teleporter on|off]
[--teleporterport <port>]
[--teleporteraddress <address|empty>
[--teleporterpassword <password>]
[--teleporterpasswordfile <file>|stdin]
[--tracing-enabled on|off]
[--tracing-config <config-string>]
[--tracing-allow-vm-access on|off]
[--usbcardreader on|off]
[--autostart-enabled on|off]
[--autostart-delay <seconds>]
[--videocap on|off]
[--videocapscreens all|<screen ID> [<screen ID> ...]]
[--videocapfile <filename>]
[--videocapres <width> <height>]
[--videocaprate <rate>]
[--videocapfps <fps>]
[--videocapmaxtime <ms>]
[--videocapmaxsize <MB>]
[--videocapopts <key=value> [,<key=value> ...]]
[--defaultfrontend default|<name>]
How can I modify the VBox.log location? The default.vbox file does not specify the log location either
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-macosx">
<Machine uuid="{d2610ffb-f00c-4d36-8a4b-29043b02d2c4}" name="default" OSType="Linux26_64" snapshotFolder="Snapshots" lastStateChange="2019-01-18T11:27:07Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{fa1480e6-6cf8-410f-a16a-720bbf08ff22}" location="/Volumes/USB/docker/machine/machines/default/disk.vmdk" format="VMDK" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="{e85e5ef4-2c06-401f-9321-d7517a66b321}" location="/Users/hanxue/.docker/machine/machines/default/boot2docker.iso"/>
<Image uuid="{ab50127f-f7d5-415f-aa05-5981060f0eb4}" location="/Volumes/USB/docker/machine/machines/default/boot2docker.iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="71,198,720,421"/>
<ExtraDataItem name="VBoxInternal2/SharedFoldersEnableSymlinksCreate/Users" value="1"/>
</ExtraData>
<Hardware>
<CPU>
<PAE enabled="true"/>
<LongMode enabled="true"/>
<HardwareVirtExLargePages enabled="true"/>
</CPU>
<Memory RAMSize="1024"/>
<HPET enabled="true"/>
<Paravirt provider="Default"/>
<Boot>
<Order position="1" device="DVD"/>
<Order position="2" device="DVD"/>
<Order position="3" device="HardDisk"/>
<Order position="4" device="None"/>
</Boot>
<VideoCapture fps="25" options="ac_enabled=false"/>
<RemoteDisplay enabled="false"/>
<BIOS>
<IOAPIC enabled="true"/>
<Logo fadeIn="false" fadeOut="false" displayTime="0"/>
<BootMenu mode="Disabled"/>
</BIOS>
<Network>
<Adapter slot="0" enabled="true" MACAddress="08002725C9F6" cable="true" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT>
<DNS use-proxy="true"/>
<Forwarding name="ssh" proto="1" hostip="127.0.0.1" hostport="61378" guestport="22"/>
</NAT>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="080027E950C0" cable="true" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="vboxnet6"/>
</Adapter>
<Adapter slot="2" cable="true" type="Am79C973"/>
<Adapter slot="3" cable="true" type="Am79C973"/>
<Adapter slot="4" cable="true" type="Am79C973"/>
<Adapter slot="5" cable="true" type="Am79C973"/>
<Adapter slot="6" cable="true" type="Am79C973"/>
<Adapter slot="7" cable="true" type="Am79C973"/>
</Network>
<AudioAdapter driver="CoreAudio" enabled="true" enabledIn="false" enabledOut="false"/>
<RTC localOrUTC="UTC"/>
<SharedFolders>
<SharedFolder name="Users" hostPath="/Users" writable="true" autoMount="true"/>
</SharedFolders>
<GuestProperties>
<GuestProperty name="/VirtualBox/GuestAdd/Revision" value="125813" timestamp="1547810530818115000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/SharedFolders/MountDir" value="/" timestamp="1545727366043887000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/SharedFolders/MountPrefix" value="/" timestamp="1545727365986899000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/Version" value="5.2.20" timestamp="1547810530817930000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/VersionExt" value="5.2.20" timestamp="1547810530818010000" flags=""/>
<GuestProperty name="/VirtualBox/GuestInfo/OS/Product" value="Linux" timestamp="1547810530817144000" flags=""/>
<GuestProperty name="/VirtualBox/GuestInfo/OS/Release" value="4.14.79-boot2docker" timestamp="1547810530817276000" flags=""/>
<GuestProperty name="/VirtualBox/GuestInfo/OS/Version" value="#1 SMP Thu Nov 8 01:56:42 UTC 2018" timestamp="1547810530817380000" flags=""/>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1547810545759333000" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="SATA" type="AHCI" PortCount="30" useHostIOCache="true" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="0" device="0">
<Image uuid="{ab50127f-f7d5-415f-aa05-5981060f0eb4}"/>
</AttachedDevice>
<AttachedDevice type="HardDisk" hotpluggable="false" port="1" device="0">
<Image uuid="{fa1480e6-6cf8-410f-a16a-720bbf08ff22}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>

I believe the problem is a restructuring of VirtualBox directories, possibly due to upgrading VirtalBox. I encountered the problem and found a fix today.
I hit the same Checking if hardware virtualization is enabled failed: open /Users/ZZZZZ/.docker/machine/machines/default/default/Logs/VBox.log problem. The problem occurred on a docker-machine VM I had used smoothly for weeks. What went wrong?
I noticed that in the error message, docker-machine is looking for the VirtualBox log, not something special to Docker. Now docker-machine creates files under .docker but they seem to be fairly conventional in terms of VirtualBox, as if docker-machine gave VBoxManage create just a single folder.
I opened the VirtualBox manager GUI and opened the logs for that VM. There I saw the path for the VBox.Log file had a slight detour from what the docker-machine was looking for. My log file was at this location:
~/.docker/machine/machines/default/Utility/default/Logs/VBox.log
I fixed it by symlinking, not the Logs subdirectory, but the Utility/default subdirectory:
ln -s ~/.docker/machine/machines/default/Utility/default ~/.docker/machine/machines/default/
Now my default docker machine runs as before.
I hope this helps someone!

Related

Parameterized logging from Jboss to AWS cloud Watch

I have an application on spring boot which is running on JBoss EAP 7.2 server and the application is deployed as a WAR file, all my applications logs are getting to the server.log and when I check the cloud watch logs its just printing the STDOUT's and not the one which is parameterized (log.debug or log.info). My application server is in the ECS container and I am really missing out on the connection between the Jboss server.log to AWS. Can someone help me out with this All my parameterized logs (log.debug) must be printed in the AWS cloud watch? Are there any third-party tools or there are configs changes which are needed to be made?
This is how my logging Subsystem looks like <subsystem xmlns="urn:jboss:domain:logging:6.0">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.jboss.as.config">
<level name="DEBUG"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
<formatter name="PATTERN">
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
</formatter>
<formatter name="COLOR-PATTERN">
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
</formatter>
</subsystem>

WSO2 Identity Server pattern clustering

We are in production with WSO2 Identity Server 5.8.0
We configured the system according to the pattern 1 as described here
When we checked the symlink of config and governance we noticed that only config has a symlink icon as showed in this image
Moreover we registered some Service Providers but in the management interface they are not listed although they are present in the table. This seems to be related to the fact that we changed the WSO2 IS admin username after we created the Service Providers and in the table sp_app there is the old username (I can't understand the reason)
Her our configurations about pattern-1. We are using postgreSQL DB.
What we did is the following:
creation of db username_db. Here we executed the following SQL scripts
dbScripts/bps/bpel/create/postgresql.sql
dbScripts/content/postgresql.sql
dbScripts/identity/postgresql.sql
dbScripts/identity/uma/postgresql.sql
dbScripts/metrics/postgresql.sql
creation of db wso2sharedregistry. Here we executed the sql contained in
dbScripts/postgresql.sql
We configigured the following datasource in the master-datasources.xml file
<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">
<providers>
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
</providers>
<datasources>
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/usernameDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:postgresql://xxxxx:yyyy/username_db</url>
<username>username</username>
<password>username</password>
<driverClassName>org.postgresql.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>true</defaultAutoCommit>
<!--<validationQuery>SELECT 1</validationQuery>-->
</configuration>
</definition>
</datasource>
<datasource>
<name>WSO2_SHAREDREGISTRY_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2sharedbd</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:postgresql://xxxxx:yyyy/wso2sharedregistry</url>
<username>username</username>
<password>username</password>
<driverClassName>org.postgresql.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>true</defaultAutoCommit>
<!--<validationQuery>SELECT 1</validationQuery>-->
</configuration>
</definition>
</datasource>
</datasources>
</datasources-configuration>
We configured the registry.xml in this way
<?xml version="1.0" encoding="ISO-8859-1"?>
<wso2registry>
<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>
<dbConfig name="wso2sharedregistry">
<dataSource>jdbc/WSO2sharedbd</dataSource>
</dbConfig>
<handler class="org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyHandler">
<filter class="org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyMediaTypeMatcher">
<property name="mediaType">application/xacml-policy+xml</property>
</filter>
</handler>
<remoteInstance url="https://localhost:9443/registry">
<id>instanceid</id>
<dbConfig>wso2sharedregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>false</enableCache>
<registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/governance" overwrite="true">
<instanceId>instanceid</instanceId>
<targetPath>/_system/governance</targetPath>
</mount>
<mount path="/_system/config" overwrite="true">
<instanceId>instanceid</instanceId>
<targetPath>/_system/nodes</targetPath>
</mount>
<indexingConfiguration>
<startIndexing>false</startIndexing>
<startingDelayInSeconds>35</startingDelayInSeconds>
<indexingFrequencyInSeconds>5</indexingFrequencyInSeconds>
<!--number of resources submit for given indexing thread -->
<batchSize>40</batchSize>
<!--number of worker threads for indexing -->
<indexerPoolSize>40</indexerPoolSize>
<!-- location storing the time the indexing took place-->
<lastAccessTimeLocation>/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime</lastAccessTimeLocation>
<!-- the indexers that implement the indexer interface for a relevant media type/(s) -->
<indexers>
<indexer class="org.wso2.carbon.registry.indexing.indexer.MSExcelIndexer" mediaTypeRegEx="application/vnd.ms-excel"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.MSPowerpointIndexer" mediaTypeRegEx="application/vnd.ms-powerpoint"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.MSWordIndexer" mediaTypeRegEx="application/msword"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.PDFIndexer" mediaTypeRegEx="application/pdf"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.XMLIndexer" mediaTypeRegEx="application/xml"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.XMLIndexer" mediaTypeRegEx="application/(.)+\+xml"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.PlainTextIndexer" mediaTypeRegEx="application/swagger\+json"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.PlainTextIndexer" mediaTypeRegEx="application/(.)+\+json"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.PlainTextIndexer" mediaTypeRegEx="text/(.)+"/>
<indexer class="org.wso2.carbon.registry.indexing.indexer.PlainTextIndexer" mediaTypeRegEx="application/x-javascript"/>
</indexers>
<exclusions>
<exclusion pathRegEx="/_system/config/repository/dashboards/gadgets/swfobject1-5/.*[.]html"/>
<exclusion pathRegEx="/_system/local/repository/components/org[.]wso2[.]carbon[.]registry/mount/.*"/>
</exclusions>
</indexingConfiguration>
<versionResourcesOnChange>false</versionResourcesOnChange>
<!-- NOTE: You can edit the options under "StaticConfiguration" only before the
startup. -->
<staticConfiguration>
<versioningProperties>true</versioningProperties>
<versioningComments>true</versioningComments>
<versioningTags>true</versioningTags>
<versioningRatings>true</versioningRatings>
</staticConfiguration>
</wso2registry>
Any tips in how we can:
show the previously registered Service Providers
create the correct registry symlink

Replicate Secondary user store configuration in WSO2 Identity Server cluster

I have deployed WSO2 IS 5.1 cluster with 2 nodes. When I add secondary user store to one of the nodes, the configuration is stored on the filesystem of that node. The other node does not display any details related to the added secondary userstore. How do I configure such that all filesystem based configuration gets replicated across nodes in the cluster?
Do I need to use registry based depSync for this? I have tried to setup jdbc based registry for shared config and governance but I still do not see secondary userstore configuration replicating.
My registry.xml:
<wso2registry>
<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2LocalRegistry</dataSource>
</dbConfig>
<dbConfig name="sharedregistry">
<dataSource>jdbc/WSO2RegistryDB</dataSource>
</dbConfig>
<handler class="org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyHandler">
<filter class="org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyMediaTypeMatcher">
<property name="mediaType">application/xacml-policy+xml</property>
</filter>
</handler>
<remoteInstance url="https://localhost:9443/registry">
<id>instanceid</id>
<dbConfig>sharedregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/config" overwrite="true">
<instanceId>instanceid</instanceId>
<targetPath>/_system/config</targetPath>
</mount>
<mount path="/_system/governance" overwrite="true">
<instanceId>instanceid</instanceId>
<targetPath>/_system/governance</targetPath>
</mount>
<versionResourcesOnChange>false</versionResourcesOnChange>
<staticConfiguration>
<versioningProperties>true</versioningProperties>
<versioningComments>true</versioningComments>
<versioningTags>true</versioningTags>
<versioningRatings>true</versioningRatings>
</staticConfiguration>
</wso2registry>
In carbon.xml of each node:
<!-- Deployment Synchronizer Configuration. Uncomment the following section when running with "registry based" dep sync.
In master nodes you need to set both AutoCommit and AutoCheckout to true
and in worker nodes set only AutoCheckout to true.
-->
<DeploymentSynchronizer>
<Enabled>true</Enabled>
<AutoCommit>true</AutoCommit>
<AutoCheckout>true</AutoCheckout>
</DeploymentSynchronizer>
You need to sync files in the <IS_HOME>/repository/deployment/server/ folder (<IS_HOME>/repository/tenants/ folder if you are having multiple tenants) in a proper IS cluster.
IS have inbuilt mechanism to do that called deployment synchroniser. You can refer [1] on exact details to set that up.
[1] https://docs.wso2.com/display/Cluster/SVN-based+Deployment+Synchronizer
Regards,

Anyway to change the default CMS path for Sitecore e.g. /sitecore?

Is it possible to change the default CMS path on Sitecore to some other alias? For example going from http://website.com/sitecore to http://website.com/somethingelse
In theory you should be able to do this by changing the virtualPath value of the shell and login (possibly more) sites in the configuration (default located in the web.config).
Never tried it before though.
<site name="shell" virtualFolder="/somethingelse/shell" physicalFolder="/sitecore/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" loginPage="/sitecore/login" content="master" contentStartItem="/Home" enableWorkflow="true" enableAnalytics="false" analyticsDefinitions="content" xmlControlPage="/sitecore/shell/default.aspx" browserTitle="Sitecore" htmlCacheSize="2MB" registryCacheSize="3MB" viewStateCacheSize="200KB" xslCacheSize="5MB" disableBrowserCaching="true" />

P6SpyDriver cannot be cast to javax.sql.XADataSource exception while trying to configure P6Spy 2.0 with xa-datasource using Jboss AS 7 and potgres

P6spy v2 has a support for xa datasources - P6spy on github
In my jboss AS 7 standalone-full-ha.xml, i have the following datasource configurations.
<xa-datasource jndi-name="java:jboss/datasources/MyDS" pool-name="v" enabled="true" use-java-context="true" use-ccm="false">
<xa-datasource-property name="ServerName">
localhost
</xa-datasource-property>
<xa-datasource-property name="PortNumber">
5432
</xa-datasource-property>
<xa-datasource-property name="DatabaseName">
MyDB
</xa-datasource-property>
<driver>p6spy</driver>
<xa-pool>
<min-pool-size>50</min-pool-size>
<max-pool-size>150</max-pool-size>
<is-same-rm-override>false</is-same-rm-override>
<interleaving>false</interleaving>
<pad-xid>false</pad-xid>
<wrap-xa-resource>false</wrap-xa-resource>
</xa-pool>
<security>
<user-name>postgres</user-name>
<password>postgres</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</xa-datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
<driver name="p6spy" module="com.p6spy">
<xa-datasource-class>com.p6spy.engine.spy.P6SpyDriver</xa-datasource-class>
</driver>
</drivers>
After that, i put the p6spy-2.0.1.jar in jboss\modules\com\p6spy\main folder and also defined the module.xml file. Also, i put the spy.properties file alongwith the P6spy.jar and in that added the line to enable postgres driver
realdriver=org.postgresql.Driver
With all these settings, when i start my server, i get the following exception.
Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:447)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:385)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:67) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:253) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:119) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
Caused by: java.lang.ClassCastException: com.p6spy.engine.spy.P6SpyDriver cannot be cast to javax.sql.XADataSource
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:553)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)
... 30 more
At this step i am clueless as to how should i make it work.
Edit:
As per quintonm's reply, i used com.p6spy.engine.spy.P6ConnectionPoolDataSource class which implements XADatasource. But now i am getting the following exception.
Caused by: javax.resource.ResourceException: Could not find accessor on XADataSource:
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:629)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)
... 30 more
Caused by: java.lang.NoSuchMethodException: com.p6spy.engine.spy.P6ConnectionPoolDataSource.setDatabaseName(java.lang.String)
at java.lang.Class.getMethod(Class.java:1655) [rt.jar:1.7.0_40]
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:597)
Also, following the generic instructions stated in P6spy's documentation, i used the 'RealDataSource' property in xa-datasource-properties but it then says no such property exist.
The problem that you are currently facing is that JBoss is expecting you to use a class that implements the Datasource interface in xa-datasource-class. For the P6Spy driver definition, you are using P6SpyDriver which implements java.sql.Driver. Instead of using P6SpyDriver, you want to use com.p6spy.engine.spy.P6ConnectionPoolDataSource.
P6Spy's support for DataSource implementations in JNDI is a little different than using a Driver class. Instead of modifying the JDBC URL, you must setup a second JDNI DataSource. The one that the application connects to will be the P6Spy DataSource. That DataSource will be a proxy to the real data source. The instructions for setting this up are be found here.
Note: The instructions say that you should use P6DataSource. However, since you need XA support, you will need to use P6ConnectionPoolDataSource.
For a better understanding of how this works, you can take a look at the test for XADataSources - XADataSourceTest
If you have any problems getting this to work, just post a message to p6spy-users#googlegroups.com or enter an issue
well, after the update of the question, your config should look like this. Didn't give it a test try, but in general, you need to proxy your existing one (postgres one) via p6spy:
<xa-datasource jndi-name="java:jboss/datasources/MyDSReal" pool-name="v" enabled="true" use-java-context="true" use-ccm="false">
<xa-datasource-property name="ServerName">
localhost
</xa-datasource-property>
<xa-datasource-property name="PortNumber">
5432
</xa-datasource-property>
<xa-datasource-property name="DatabaseName">
MyDB
</xa-datasource-property>
<driver>postgresql</driver>
<xa-pool>
<min-pool-size>50</min-pool-size>
<max-pool-size>150</max-pool-size>
<is-same-rm-override>false</is-same-rm-override>
<interleaving>false</interleaving>
<pad-xid>false</pad-xid>
<wrap-xa-resource>false</wrap-xa-resource>
</xa-pool>
<security>
<user-name>postgres</user-name>
<password>postgres</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</xa-datasource>
<xa-datasource jndi-name="java:jboss/datasources/MyDS" pool-name="v" enabled="true" use-java-context="true" use-ccm="false">
<driver>p6spy</driver>
<xa-pool>
<min-pool-size>50</min-pool-size>
<max-pool-size>150</max-pool-size>
<is-same-rm-override>false</is-same-rm-override>
<interleaving>false</interleaving>
<pad-xid>false</pad-xid>
<wrap-xa-resource>false</wrap-xa-resource>
</xa-pool>
<security>
<user-name>postgres</user-name>
<password>postgres</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</xa-datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
<driver name="p6spy" module="com.p6spy">
<xa-datasource-class>com.p6spy.engine.spy.P6ConnectionPoolDataSource</xa-datasource-class>
</driver>
</drivers>
Moreover I think you don't need spy.properties file if you're OK with default config. As RealDriver property would be needed if going the driver way (not the datasource one as you do now).
UPDATE:
removed section reported as problematic:
<xa-datasource-property name="RealDataSource">
java:jboss/datasources/MyDSReal
</xa-datasource-property>
if that is a problem in the DS config => let's configure it in a different way, you can go for any of available:
System properties
Environment variables or
spy.properties
where you need to set:
realdatasource=java:jboss/datasources/MyDSReal
UPDATE 2:
I gave it a test try and it seems p6spy doesn't support the XA Datasources for the JBoss / Wildfly (yet). For more details, see the official docs: http://p6spy.github.io/p6spy/2.0/install.html