Skip to main content

Virtual Machine Status 상태 확인

Virtual Machine Status 상태 확인 

#!/bin/bash

export _SDATE=$(date +"%Y%m%d%H")

echo "============== Show info VM  ============="
echo ">> VMNAME : $1"
echo ">> DATE : $_SDATE"

# VM Pweroff 
VmPause()
{
  vm=$1
  /usr/bin/VBoxManage showvminfo $vm  
  echo "Running ? "
  /usr/bin/VBoxManage showvminfo $vm | grep State:
}

echo "##### VM Name = " $1 "#####"
VmPause $1

echo "============== Show info  END   ! ==========="

실행 % 결과 

[hyunsu@joang BackUpCenter]$ ./003-showvminfoVm.sh 1-RockyKubeMaster
============== Show info VM  =============
>> VMNAME : 1-RockyKubeMaster
>> DATE : 2024101022
##### VM Name =  1-RockyKubeMaster #####
Name:                        1-RockyKubeMaster
Encryption:                  disabled
Groups:                      /Kubernetes-Hyunsu
Platform Architecture:       x86
Guest OS:                    Red Hat (64-bit)
UUID:                        d416ace7-184b-4c22-bc26-a9afb3808039
Config file:                 /home/hyunsu/VirtualBox VMs/Kubernetes-Hyunsu/1-RockyKubeMaster/1-RockyKubeMaster.vbox
Snapshot folder:             /data/ext/4TB/backup/Snapshots/1-RockyKubeMaster
Log folder:                  /home/hyunsu/VirtualBox VMs/Kubernetes-Hyunsu/1-RockyKubeMaster/Logs
Hardware UUID:               d416ace7-184b-4c22-bc26-a9afb3808039
Memory size:                 30048MB
Page Fusion:                 disabled
VRAM size:                   16MB
CPU exec cap:                100%
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              40
HPET:                        disabled
PAE:                         enabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           disabled
CPUID overrides:             None
Hardware Virtualization:     enabled
Nested Paging:               enabled
Large Pages:                 enabled
VT-x VPID:                   enabled
VT-x Unrestricted Exec.:     enabled
AMD-V Virt. Vmsave/Vmload:   enabled
CPUID Portability Level:     0
Boot menu mode:              message and menu
Boot Device 1:               HardDisk
Boot Device 2:               DVD
Boot Device 3:               Not Assigned
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
BIOS NVRAM File:             /home/hyunsu/VirtualBox VMs/Kubernetes-Hyunsu/1-RockyKubeMaster/1-RockyKubeMaster.nvram
RTC:                         UTC
IOMMU:                       None
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   KVM
State:                       running (since 2024-10-09T22:39:41.958000000)
Graphics Controller:         VMSVGA
Monitor count:               1
3D Acceleration:             disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:
Teleporter Password:
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:
VM process priority:         default
Storage Controllers:
#0: 'IDE', Type: PIIX4, Instance: 0, Ports: 2 (max 2), Bootable
  Port 1, Unit 0: Empty
#1: 'SATA', Type: IntelAhci, Instance: 0, Ports: 1 (max 30), Bootable
  Port 0, Unit 0: UUID: 0c33d809-198c-426b-bf17-b8556a91d066
    Location: "/home/hyunsu/VirtualBox VMs/Kubernetes-Hyunsu/1-RockyKubeMaster/1-RockyKubeMaster-2024100500-disk001.vdi"
NIC 1:                       MAC: 08002773BA2F, Attachment: Bridged Interface 'enp3s0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all, Bandwidth group: none
NIC 2:                       disabled
NIC 3:                       disabled
NIC 4:                       disabled
NIC 5:                       disabled
NIC 6:                       disabled
NIC 7:                       disabled
NIC 8:                       disabled
Pointing Device:             PS/2 Mouse
Keyboard Device:             PS/2 Keyboard
UART 1:                      disabled
UART 2:                      disabled
UART 3:                      disabled
UART 4:                      disabled
LPT 1:                       disabled
LPT 2:                       disabled
Audio:                       enabled (Driver: Default, Controller: AC97, Codec: AD1980)
Audio playback:              enabled
Audio capture:               disabled
Clipboard Mode:              disabled
Clipboard file transfers:    disabled
Drag and drop Mode:          disabled
Session name:                headless
Video mode:                  720x400x0 at 0,0 enabled
VRDE:                        disabled
OHCI USB:                    enabled
EHCI USB:                    enabled
xHCI USB:                    disabled
USB Device Filters:          <none>
Available remote USB devices: <none>
Currently attached USB devices: <none>
Bandwidth groups:            <none>
Shared folders:              <none>
VRDE Connection:             not active
Clients so far:              0
Recording status:            stopped
Recording enabled:           no
Recording screens:           1
 Screen 0:
    Enabled:                 yes
    ID:                      0
    Record video:            yes
    Destination:             File
    File:                    /home/hyunsu/VirtualBox VMs/Kubernetes-Hyunsu/1-RockyKubeMaster/1-RockyKubeMaster-screen0.webm
    Options:                 vc_enabled=true,ac_enabled=false,ac_profile=med
    Video dimensions:        1024x768
    Video rate:              512kbps
    Video FPS:               25fps
* Guest:
Configured memory balloon:   0MB
OS type:                     Linux26_64
Additions run level:         2
Additions version:           7.0.10 r158379
Guest Facilities:
Facility "VirtualBox Base Driver": active/running (last update: 2024/10/09 22:39:52 UTC)
Facility "VirtualBox System Service": active/running (last update: 2024/10/09 22:40:00 UTC)
Facility "Seamless Mode": not active (last update: 2024/10/09 22:39:52 UTC)
Facility "Graphics Mode": not active (last update: 2024/10/09 22:39:52 UTC)

Running ?
State:                       running (since 2024-10-09T22:39:41.958000000)
============== Show info  END   ! ===========