我创建了一个Azure file share
并连接到它,我在azure
控制台中给出了一个脚本,如下所示
sudo mkdir /mnt/Totalvm
if [ ! -d "/etc/smbcredentials" ]; then
sudo mkdir /etc/smbcredentials
fi
if [ ! -f "/etc/smbcredentials/Totalcontainerstorage.cred" ]; then
sudo bash -c 'echo "username=Totalcontainerstorage" >> /etc/smbcredentials/Totalcontainerstorage.cred'
sudo bash -c 'echo "password=WPt39LGSSagFVeWbsNJ8HuhTaoPa1aiAZsOR3pBXnrOGjXFWVZj2BqooibIXvqbtjwbn4TLC4j+gJhOAk798pQ==" >> /etc/smbcredentials/Totalcontainerstorage.cred'
fi
sudo chmod 600 /etc/smbcredentials/Totalcontainerstorage.cred
sudo bash -c 'echo "//Totalcontainerstorage.file.core.windows.net/Totalvm /mnt/Totalvm cifs nofail,vers=3.0,credentials=/etc/smbcredentials/Totalcontainerstorage.cred,dir_mode=0777,file_mode=0777,serverino" >> /etc/fstab'
sudo mount -t cifs //Totalcontainerstorage.file.core.windows.net/Totalvm /mnt/Totalvm -o vers=3.0,credentials=/etc/smbcredentials/Totalcontainerstorage.cred,dir_mode=0777,file_mode=0777,serverino
我想在中使用这个cloudinit
脚本azure
。我该怎么做,对此的任何帮助将不胜感激。