KULLANARAK BMM sorunlarını giderme az networkcloud baremetalmachine run-read-command
Bir kullanıcının şirket içi çıplak makine (BMM) ile ilgili sorunları araştırması ve çözmesi gereken durumlar olabilir. İşleç Nexus, kullanıcıların BMM'den bilgi almak için salt okunur komutların seçilmiş bir listesini çalıştırabilmesini sağlar az networkcloud baremetalmachine run-read-command
.
komutu, run-read komut yürütmesinin sonuçlarını içeren bir çıkış dosyası oluşturur. Varsayılan olarak, veriler Küme Yöneticisi depolama hesabına gönderilir. Ayrıca kullanıcıların küme kaynağını, çıkışı almak için depolama hesabına erişimi olan bir depolama hesabı ve kimliğiyle yapılandırabileceği bir önizleme yöntemi de vardır.
Önkoşullar
- Uygun CLI uzantılarının en son sürümünü yükleme
- Hedef BMM'nin olarak ve
On
olarak ayarlanmış olması gerektiğindenpoweredState
readyState
emin olunTrue
- Kaynak için
Cluster
oluşturduğunuz Yönetilen Kaynak grubu adını (cluster_MRG) alma
Komut çıkışını kullanıcı tarafından belirtilen depolama hesabına gönderme
Yönetilen kimlikler ve kullanıcı tarafından sağlanan kaynaklar için bkz . Azure Operatör Nexus Kümesi desteği
Kümenin CommandOutputSettings'ini temizleyin
Kümeyi kullanıcı tarafından atanan kimlikten sistem tarafından atanan kimliğe değiştirmek için, CommandOutputSettings'in önce sonraki bölümdeki komutu kullanılarak temizlenmesi, ardından bu komutu kullanarak ayarlanması gerekir.
CommandOutputSettings temizlenebilir ve run-data-extract çıkışı küme yöneticisinin depolama alanına geri yönlendirilir. Ancak, daha az güvenli olduğundan önerilmez ve seçenek gelecekteki bir sürümde kaldırılacaktır.
Ancak kullanıcı tarafından atanan kimlikten sistem tarafından atanan kimliğe geçiş yapılırsa CommandOutputSettings'in temizlenmesi gerekir.
CommandOutputSettings'i temizlemek için bu komutu kullanın:
az rest --method patch \
--url "https://management.azure.com/subscriptions/<subscription>/resourceGroups/<cluster-resource-group>/providers/Microsoft.NetworkCloud/clusters/<cluster-name>?api-version=2024-08-01-preview" \
--body '{"properties": {"commandOutputSettings":null}}'
KULLANIMDAN KALKMIŞ YÖNTEM: Küme Yöneticisi depolama hesabına erişimi doğrulama
Önemli
Küme Yöneticisi depolama hesabı en geç Nisan 2025'te kaldırılması hedeflenmiştir. Bugün komut çıktısı için bu yöntemi kullanıyorsanız, kullanıcı tarafından sağlanan bir depolama hesabını kullanmaya dönüştürmeyi göz önünde bulundurun.
Küme Yöneticisi depolama yöntemini kullanıyorsanız, Küme Yöneticisi'nin depolama hesabına erişiminiz olduğunu doğrulayın:
- Azure portalından Küme Yöneticisi'nin Depolama hesabına gidin.
- Depolama hesabı ayrıntıları'nda, sol taraftaki gezinti menüsünden Depolama tarayıcısı'nı seçin.
- Depolama tarayıcısı ayrıntılarında Blob kapsayıcıları'nı seçin.
- Depolama hesabına erişirken bir
403 This request is not authorized to perform this operation.
süre karşılaşırsanız, depolama hesabının güvenlik duvarı ayarlarının genel IP adresini içerecek şekilde güncelleştirilmiş olması gerekir. - Küme Yöneticisi kaynağındaki Portal aracılığıyla bir destek bileti oluşturarak erişim isteyin. Erişim gerektiren genel IP adresini sağlayın.
Run-read komutunu yürütme
Run-read komutu, BMM'de hiçbir şeyi değiştirmeyen bir komut çalıştırmanıza olanak tanır. Bazı komutların birden fazla sözcüğü vardır veya çalışması için bir bağımsız değişken gerekir. Bu komutlar, öğeleri değiştirebilecek komutlardan ayırmak için bu şekilde yapılır. Örneğin run-read-command komutunu kullanabilir ancak kubectl apply
kullanamazkubectl get
. Bu komutları kullandığınızda, tüm sözcükleri "komut" alanına yerleştirmeniz gerekir. Örneğin, {command:'kubectl get',arguments:[nodes]}
doğru {command:kubectl,arguments:[get,nodes]}
; yanlıştır.
Ayrıca bazı komutların ile nc-toolbox nc-toolbox-runread
başladığına ve gösterildiği gibi girilmesi gerektiğine dikkat edin.
nc-toolbox-runread
ve gibi ipmitool
racadm
çıplak konakta yüklü olmayan daha fazla araç içeren özel bir kapsayıcı görüntüsüdür.
Okuma çalıştırma komutlarından bazıları, komutların salt okunur özelliklerini zorlamak için belirli bağımsız değişkenlerin sağlanmasını gerektirir.
Belirli bağımsız değişkenler gerektiren çalıştırma okuma komutlarına örnek olarak, salt okunuru zorlamak için bağımsız değişkenin query
sağlanmasını gerektiren izin verilen Mellanox komutu mstconfig
gösterilebilir.
Uyarı
Microsoft, düz metin kullanıcı adı ve/veya parolanın sağlanmasını bekleyen Operatör Nexus API çağrılarını sağlamaz veya desteklemez. Gönderilen tüm değerlerin günlüğe kaydedildiği ve döndürülmesi ve iptal edilmesi gereken kullanıma açık gizli diziler olarak kabul edildiğine dikkat edin. Gizli dizileri güvenli bir şekilde kullanmak için Microsoft tarafından belgelenen yöntem, bunları bir Azure Key Vault'ta depolamaktır. Belirli sorularınız veya endişeleriniz varsa Azure portalı aracılığıyla bir istek gönderin.
Bu listede kullanabileceğiniz komutlar gösterilir. içindeki *italics*
komutların olamaz arguments
; geri kalanı olabilir.
arp
brctl show
dmidecode
fdisk -l
host
hostname
ifconfig -a
ifconfig -s
ip address show
ip link show
ip maddress show
ip route show
journalctl
kubectl api-resources
kubectl api-versions
kubectl describe
kubectl get
kubectl logs
mount
ping
ss
tcpdump
traceroute
uname
ulimit -a
uptime
timedatectl status
hostnamectl status
nc-toolbox nc-toolbox-runread ipmitool channel authcap
nc-toolbox nc-toolbox-runread ipmitool channel info
nc-toolbox nc-toolbox-runread ipmitool chassis status
nc-toolbox nc-toolbox-runread ipmitool chassis power status
nc-toolbox nc-toolbox-runread ipmitool chassis restart cause
nc-toolbox nc-toolbox-runread ipmitool chassis poh
nc-toolbox nc-toolbox-runread ipmitool dcmi power get_limit
nc-toolbox nc-toolbox-runread ipmitool dcmi sensors
nc-toolbox nc-toolbox-runread ipmitool dcmi asset_tag
nc-toolbox nc-toolbox-runread ipmitool dcmi get_mc_id_string
nc-toolbox nc-toolbox-runread ipmitool dcmi thermalpolicy get
nc-toolbox nc-toolbox-runread ipmitool dcmi get_temp_reading
nc-toolbox nc-toolbox-runread ipmitool dcmi get_conf_param
nc-toolbox nc-toolbox-runread ipmitool delloem lcd info
nc-toolbox nc-toolbox-runread ipmitool delloem lcd status
nc-toolbox nc-toolbox-runread ipmitool delloem mac list
nc-toolbox nc-toolbox-runread ipmitool delloem mac get
nc-toolbox nc-toolbox-runread ipmitool delloem lan get
nc-toolbox nc-toolbox-runread ipmitool delloem powermonitor powerconsumption
nc-toolbox nc-toolbox-runread ipmitool delloem powermonitor powerconsumptionhistory
nc-toolbox nc-toolbox-runread ipmitool delloem powermonitor getpowerbudget
nc-toolbox nc-toolbox-runread ipmitool delloem vflash info card
nc-toolbox nc-toolbox-runread ipmitool echo
nc-toolbox nc-toolbox-runread ipmitool ekanalyzer print
nc-toolbox nc-toolbox-runread ipmitool ekanalyzer summary
nc-toolbox nc-toolbox-runread ipmitool fru print
nc-toolbox nc-toolbox-runread ipmitool fwum info
nc-toolbox nc-toolbox-runread ipmitool fwum status
nc-toolbox nc-toolbox-runread ipmitool fwum tracelog
nc-toolbox nc-toolbox-runread ipmitool gendev list
nc-toolbox nc-toolbox-runread ipmitool hpm rollbackstatus
nc-toolbox nc-toolbox-runread ipmitool hpm selftestresult
nc-toolbox nc-toolbox-runread ipmitool ime help
nc-toolbox nc-toolbox-runread ipmitool ime info
nc-toolbox nc-toolbox-runread ipmitool isol info
nc-toolbox nc-toolbox-runread ipmitool lan print
nc-toolbox nc-toolbox-runread ipmitool lan alert print
nc-toolbox nc-toolbox-runread ipmitool lan stats get
nc-toolbox nc-toolbox-runread ipmitool mc bootparam get
nc-toolbox nc-toolbox-runread ipmitool mc chassis poh
nc-toolbox nc-toolbox-runread ipmitool mc chassis policy list
nc-toolbox nc-toolbox-runread ipmitool mc chassis power status
nc-toolbox nc-toolbox-runread ipmitool mc chassis status
nc-toolbox nc-toolbox-runread ipmitool mc getenables
nc-toolbox nc-toolbox-runread ipmitool mc getsysinfo
nc-toolbox nc-toolbox-runread ipmitool mc guid
nc-toolbox nc-toolbox-runread ipmitool mc info
nc-toolbox nc-toolbox-runread ipmitool mc restart cause
nc-toolbox nc-toolbox-runread ipmitool mc watchdog get
nc-toolbox nc-toolbox-runread ipmitool bmc bootparam get
nc-toolbox nc-toolbox-runread ipmitool bmc chassis poh
nc-toolbox nc-toolbox-runread ipmitool bmc chassis policy list
nc-toolbox nc-toolbox-runread ipmitool bmc chassis power status
nc-toolbox nc-toolbox-runread ipmitool bmc chassis status
nc-toolbox nc-toolbox-runread ipmitool bmc getenables
nc-toolbox nc-toolbox-runread ipmitool bmc getsysinfo
nc-toolbox nc-toolbox-runread ipmitool bmc guid
nc-toolbox nc-toolbox-runread ipmitool bmc info
nc-toolbox nc-toolbox-runread ipmitool bmc restart cause
nc-toolbox nc-toolbox-runread ipmitool bmc watchdog get
nc-toolbox nc-toolbox-runread ipmitool nm alert get
nc-toolbox nc-toolbox-runread ipmitool nm capability
nc-toolbox nc-toolbox-runread ipmitool nm discover
nc-toolbox nc-toolbox-runread ipmitool nm policy get policy_id
nc-toolbox nc-toolbox-runread ipmitool nm policy limiting
nc-toolbox nc-toolbox-runread ipmitool nm statistics
nc-toolbox nc-toolbox-runread ipmitool nm suspend get
nc-toolbox nc-toolbox-runread ipmitool nm threshold get
nc-toolbox nc-toolbox-runread ipmitool pef
nc-toolbox nc-toolbox-runread ipmitool picmg addrinfo
nc-toolbox nc-toolbox-runread ipmitool picmg policy get
nc-toolbox nc-toolbox-runread ipmitool power status
nc-toolbox nc-toolbox-runread ipmitool sdr elist
nc-toolbox nc-toolbox-runread ipmitool sdr get
nc-toolbox nc-toolbox-runread ipmitool sdr info
nc-toolbox nc-toolbox-runread ipmitool sdr list
nc-toolbox nc-toolbox-runread ipmitool sdr type
nc-toolbox nc-toolbox-runread ipmitool sel elist
nc-toolbox nc-toolbox-runread ipmitool sel get
nc-toolbox nc-toolbox-runread ipmitool sel info
nc-toolbox nc-toolbox-runread ipmitool sel list
nc-toolbox nc-toolbox-runread ipmitool sel time get
nc-toolbox nc-toolbox-runread ipmitool sensor get
nc-toolbox nc-toolbox-runread ipmitool sensor list
nc-toolbox nc-toolbox-runread ipmitool session info
nc-toolbox nc-toolbox-runread ipmitool sol info
nc-toolbox nc-toolbox-runread ipmitool sol payload status
nc-toolbox nc-toolbox-runread ipmitool user list
nc-toolbox nc-toolbox-runread ipmitool user summary
nc-toolbox nc-toolbox-runread racadm arp
nc-toolbox nc-toolbox-runread racadm coredump
nc-toolbox nc-toolbox-runread racadm diagnostics
nc-toolbox nc-toolbox-runread racadm eventfilters get
nc-toolbox nc-toolbox-runread racadm fcstatistics
nc-toolbox nc-toolbox-runread racadm get
nc-toolbox nc-toolbox-runread racadm getconfig
nc-toolbox nc-toolbox-runread racadm gethostnetworkinterfaces
nc-toolbox nc-toolbox-runread racadm getled
nc-toolbox nc-toolbox-runread racadm getniccfg
nc-toolbox nc-toolbox-runread racadm getraclog
nc-toolbox nc-toolbox-runread racadm getractime
nc-toolbox nc-toolbox-runread racadm getsel
nc-toolbox nc-toolbox-runread racadm getsensorinfo
nc-toolbox nc-toolbox-runread racadm getssninfo
nc-toolbox nc-toolbox-runread racadm getsvctag
nc-toolbox nc-toolbox-runread racadm getsysinfo
nc-toolbox nc-toolbox-runread racadm gettracelog
nc-toolbox nc-toolbox-runread racadm getversion
nc-toolbox nc-toolbox-runread racadm hwinventory
nc-toolbox nc-toolbox-runread racadm ifconfig
nc-toolbox nc-toolbox-runread racadm inlettemphistory get
nc-toolbox nc-toolbox-runread racadm jobqueue view
nc-toolbox nc-toolbox-runread racadm lclog view
nc-toolbox nc-toolbox-runread racadm lclog viewconfigresult
nc-toolbox nc-toolbox-runread racadm license view
nc-toolbox nc-toolbox-runread racadm netstat
nc-toolbox nc-toolbox-runread racadm nicstatistics
nc-toolbox nc-toolbox-runread racadm ping
nc-toolbox nc-toolbox-runread racadm ping6
nc-toolbox nc-toolbox-runread racadm racdump
nc-toolbox nc-toolbox-runread racadm sslcertview
nc-toolbox nc-toolbox-runread racadm swinventory
nc-toolbox nc-toolbox-runread racadm systemconfig getbackupscheduler
-
nc-toolbox nc-toolbox-runread racadm systemperfstatistics
(PeakReset bağımsız değişkenine izin verilmiyor) nc-toolbox nc-toolbox-runread racadm techsupreport getupdatetime
nc-toolbox nc-toolbox-runread racadm traceroute
nc-toolbox nc-toolbox-runread racadm traceroute6
nc-toolbox nc-toolbox-runread racadm usercertview
nc-toolbox nc-toolbox-runread racadm vflashsd status
nc-toolbox nc-toolbox-runread racadm vflashpartition list
nc-toolbox nc-toolbox-runread racadm vflashpartition status -a
nc-toolbox nc-toolbox-runread mstregdump
-
nc-toolbox nc-toolbox-runread mstconfig
(arg gerektirirquery
) -
nc-toolbox nc-toolbox-runread mstflint
(arg gerektirirquery
) -
nc-toolbox nc-toolbox-runread mstlink
(arg gerektirirquery
) -
nc-toolbox nc-toolbox-runread mstfwmanager
(arg gerektirirquery
) nc-toolbox nc-toolbox-runread mlx_temp
Bağımsız değişken içermeyen tek bir komutun komut söz dizimi aşağıdaki gibidir ve örnek olarak kullanılır hostname
:
az networkcloud baremetalmachine run-read-command --name "<machine-name>"
--limit-time-seconds "<timeout>" \
--commands "[{command:hostname}]" \
--resource-group "<cluster_MRG>" \
--subscription "<subscription>"
-
--commands
parametresi her zaman tek bir komut olsa bile komutların listesini alır. - Azure CLI Shorthand gösterimi kullanılarak json biçiminde birden çok komut sağlanabilir.
- Herhangi bir boşluk tek tırnak içine alınmalıdır.
- Aşağıdaki örneklerde gösterildiği gibi, her komutun bağımsız değişkenleri de liste olarak sağlanmalıdır.
--commands "[{command:hostname},{command:'nc-toolbox nc-toolbox-runread racadm ifconfig'}]"
--commands "[{command:hostname},{command:'nc-toolbox nc-toolbox-runread racadm getsysinfo',arguments:[-c]}]"
--commands "[{command:ping,arguments:[198.51.102.1,-c,3]}]"
Bu komutlar uzun süre çalıştırılabilir, bu nedenle öneri en az 600 saniyeye (10 dakika) ayarlanır --limit-time-seconds
. Birden çok komutu çalıştırmak 10 dakikadan uzun sürebilir.
Bu komut zaman uyumlu olarak çalışır. Komutun tamamlanmasını beklemeyi atlamak istiyorsanız seçenekleri belirtin --no-wait --debug
. Daha fazla bilgi için bkz . Zaman uyumsuz işlemleri izleme.
İsteğe bağlı bir bağımsız değişken --output-directory
sağlandığında, çıkış sonucu indirilir ve yerel dizine ayıklanır.
Uyarı
bağımsız değişkeninin --output-directory
kullanılması, yerel dizinde oluşturulan yeni dosyalarla aynı ada sahip tüm dosyaların üzerine yazar.
Bu örnek bir 'kubectl get pods' yürütür
az networkcloud baremetalmachine run-read-command --name "<bareMetalMachineName>" \
--limit-time-seconds 60 \
--commands "[{command:'kubectl get',arguments:[pods,-n,nc-system]}]" \
--resource-group "<cluster_MRG>" \
--subscription "<subscription>"
Bu örnek, komutu ve komutu ping
yürütür hostname
az networkcloud baremetalmachine run-read-command --name "<bareMetalMachineName>" \
--limit-time-seconds 60 \
--commands "[{command:hostname},{command:ping,arguments:[198.51.102.1,-c,3]}]" \
--resource-group "<cluster_MRG>" \
--subscription "<subscription>"
Bu örnek komutunu yürütür racadm getsysinfo -c
az networkcloud baremetalmachine run-read-command --name "<bareMetalMachineName>" \
--limit-time-seconds 60 \
--commands "[{command:'nc-toolbox nc-toolbox-runread racadm getsysinfo',arguments:[-c]}]" \
--resource-group "<cluster_MRG>" \
--subscription "<subscription>"
Komut durumunu denetleyin ve kullanıcı tarafından belirtilen depolama hesabında çıkışı görüntüleyin
Örnek çıkış gösterilir. Kolaylık sağlamak için sonucun ilk 4.000 karakterini ekrana yazdırır ve komut yürütme sonucunu içeren depolama blobu için kısa süreli bir bağlantı sağlar. Sıkıştırılmış çıkış dosyasını (tar.gz) indirmek için bağlantıyı kullanabilirsiniz. Çıkışa erişmek için kullanıcıların depolama blobu için uygun erişime sahip olması gerekir. Depolama hesaplarına rol atama hakkında bilgi için bkz . Blob verilerine erişim için Azure rolü atama.
====Action Command Output====
+ hostname
rack1compute01
+ ping 198.51.102.1 -c 3
PING 198.51.102.1 (198.51.102.1) 56(84) bytes of data.
--- 198.51.102.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2049ms
================================
Script execution result can be found in storage account:
https://<storage_account_name>.blob.core.windows.net/bmm-run-command-output/a8e0a5fe-3279-46a8-b995-51f2f98a18dd-action-bmmrunreadcmd.tar.gz?se=2023-04-14T06%3A37%3A00Z&sig=XXX&sp=r&spr=https&sr=b&st=2023-04-14T02%3A37%3A00Z&sv=2019-12-12
KULLANIMDAN KALDıRILDI: Küme Yöneticisi Depolama hesabında bir az networkcloud baremetalmachine run-read-command
çıktısını görüntüleme
Bu kılavuz, bir sunucuda yürütürken az networkcloud baremetalmachine run-read-command
Küme Yöneticisi Depolama hesabında oluşturulan çıkış dosyasına erişme konusunda size yol gösterir. Dosyanın adı durum çıkışında az rest
tanımlanır.
Sunucunun barındırıldığı Küme için Küme Yöneticisi Yönetilen Kaynak Grubu'nu açın ve depolama hesabını seçin.
Depolama hesabı ayrıntıları'nda, sol taraftaki gezinti menüsünden Depolama tarayıcısı'nı seçin.
Depolama tarayıcısı ayrıntılarında Blob kapsayıcıları'nı seçin.
baremetal-run-command-output blob kapsayıcısını seçin.
Ağ veya güvenlik duvarı kısıtlamaları nedeniyle Depolama Hesabı kilitlenebilir
403 This request is not authorized to perform this operation.
. Erişimi doğrulama yordamları için küme yöneticisi depolama alanına veya müşteri tarafından yönetilen depolama bölümlerine bakın.Run-read komutundan çıkış dosyasını seçin. Dosya adı komutundan
az rest --method get
tanımlanabilir. Ayrıca, Son değiştirilen zaman damgası komutun yürütülürkenkiyle hizalanır.Genel Bakış açılır menüsünden çıkış dosyasını yönetebilir ve indirebilirsiniz.