Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
misc:qnap:kvm [2018/12/08 16:20] – created jsmisc:qnap:kvm [2018/12/08 16:25] (current) js
Line 1: Line 1:
 ====== KVM commands ====== ====== KVM commands ======
  
-virsh list --all+<code bash> 
 +/QVS/usr/bin/virsh list --all 
 +/QVS/usr/bin/virsh shutdown <number> 
 +/QVS/usr/bin/virsh destroy <number> 
 +ps -ef | grep -i qemu 
 + 
 + 
 +echo "NAS Model:      \$(getsysinfo model)" 
 +echo "Firmware:       \$(getcfg system version) Build \$(getcfg system 'Build Number')" 
 +echo "System Name:    \$(/bin/hostname)" 
 +echo "Workgroup:      \$(getcfg system workgroup)" 
 +echo "Base Directory: \$(dirname \$(getcfg -f /etc/config/smb.conf Public path))" 
 +echo "NAS IP address: \$(ifconfig \$(getcfg network 'Default GW Device') | grep addr: | awk '{ print \$2 }' | cut -d: -f2)" 
 + 
 +echo "Default Gateway Device: \$(getcfg network 'Default GW Device')"  
 +ifconfig \$(getcfg network 'Default GW Device') | grep -v HWaddr 
 + 
 +echo -n "DNS Nameserver(s):"  
 +cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2 
 + 
 + 
 +alpha='abcdefghijklmnopqrstuvwxyz' 
 +drives=\$(getcfg Storage 'Disk Drive Number'
 +for ((i=1;i<=drives;++i)) ; do 
 +   echo -n "HDD\$i -" 
 +   if [ ! -b /dev/sd\${alpha:\$i-1:1} ] ; then 
 +      echo "Drive absent" 
 +   else 
 +      hdparm -i /dev/sd\${alpha:\$i-1:1} | grep "Model" 
 +      echo " " 
 +      parted /dev/sd\${alpha:\$i-1:1} print 
 +      echo " " 
 +      /sbin/get_hd_smartinfo -d \$i 
 +      echo " " 
 +   fi 
 +done 
 + 
 +mdadm -D /dev/md0 /dev/md1 
 +cat /proc/mdstat 
 + 
 +ls -al /mnt/HDA_ROOT/usr/bin |grep -v busybox  
 + 
 + 
 +</code>