import multisig wallet into bitcoin core, Vpub keys are not valid. how to?
this is a script that works for me, it imports a 2of3 HD multisig wallet.
I have very basic knowledge of bash so you may want to double check it before running it, anyway, what finally worked for me was to understand that I had to wsh(sortedmulti(2,${pub1}/0/*,${pub2}/0/*,${pub3}/0/*))to derive the receive descriptor and wsh(sortedmulti(2,${pub1}/1/*,${pub2}/0/*,${pub3}/0/*))for receiver.
I also found this good converter here:
https://jlopp.github.io/xpub-converter/
#!/bin/sh

wallet=$1
pub1=$2
pub2=$3
pub3=$4
startfrom=$5
range=$6

wallet=&quot;${wallet:=test}&quot;
pub1=&quot;${pub1:=Vpub1...}&quot;
pub2=&quot;${pub2:=Vpub2...}&quot;
pub3=&quot;${pub3:=Vpub3...}&quot;
rescanblockchain=&quot;${startfrom:=1934907}&quot;
range=&quot;${range:=[0,100]}&quot;

p1=$(echo $pub1 | cut -c1-10)
p2=$(echo $pub2 | cut -c1-10)
p3=$(echo $pub3 | cut -c1-10)

printf &quot;\n\nWorking on '${wallet}' from ${p1}... ${p2}... ${p3} starting from ${rescanblockchain}\n\n&quot;

# create wallet if needed
if [[ $(bitcoin-cli listwallets | jq '. | index(&quot;'$wallet'&quot;)' ) == &quot;null&quot; ]]; then
    echo &quot;Making wallet '${wallet}' from ${pub1} ${pub2} ${pub3}&quot;
    bitcoin-cli createwallet $wallet  true
fi

# convert keys format from vpub to tpub https://jlopp.github.io/xpub-converter/
pub1=$(node converter.js ${pub1})
pub2=$(node converter.js ${pub2})
pub3=$(node converter.js ${pub3})

# get descriptor for receive addresses
raw_receive_descriptor=&quot;wsh(sortedmulti(2,${pub1}/0/*,${pub2}/0/*,${pub3}/0/*))&quot;
receive_descriptor=$(bitcoin-cli getdescriptorinfo $raw_receive_descriptor | jq -r '.descriptor')

# get descriptor for change addresses
raw_change_descriptor=&quot;wsh(sortedmulti(2,${pub1}/1/*,${pub2}/0/*,${pub3}/0/*))&quot;
change_descriptor=$(bitcoin-cli getdescriptorinfo $raw_change_descriptor | jq -r '.descriptor')

# import receive addresses
bitcoin-cli -rpcwallet=$wallet importmulti  '[{&quot;desc&quot;: &quot;'$receive_descriptor'&quot;, &quot;internal&quot;: false, &quot;range&quot;: '${range}', &quot;timestamp&quot;: &quot;now&quot;, &quot;keypool&quot;: true, &quot;watchonly&quot;: true}]'  '{&quot;rescan&quot;: false}' | jq .

# import change addresses
bitcoin-cli -rpcwallet=$wallet importmulti  '[{&quot;desc&quot;: &quot;'$change_descriptor'&quot;, &quot;internal&quot;: true, &quot;range&quot;: '${range}', &quot;timestamp&quot;: &quot;now&quot;, &quot;keypool&quot;: true, &quot;watchonly&quot;: true}]'  '{&quot;rescan&quot;: false}' | jq .

# rescan blockchain
bitcoin-cli -rpcwallet=$wallet rescanblockchain &quot;${rescanblockchain}&quot; | jq .

# just print out few receive addresses
bitcoin-cli deriveaddresses  ${receive_descriptor} &quot;${range}&quot; | jq .

# print out balance
bitcoin-cli -rpcwallet=$wallet getbalance