Virtualbox

From Halfface
Jump to navigation Jump to search

list all vmws

for USER in $(awk -F: '/bash/ {print $1}' /etc/passwd) ; do echo $USER ; su $USER -c "VBoxManage list vms" ; done
root
vbox
"ip400-server-template" {917d0887-b512-4f63-9786-33f663b4d5aa}
"ip400-gitlab-server" {6c6adea4-0d3e-473e-ad95-0539c5ecf984}
"ip400-redmine-server" {cec3eef8-6513-497c-85f1-9e920b5be265}
"ip400-artifactory-server" {969efe87-47af-430f-9bc5-bbddffa1e331}
abjorklund

Look at process to see who own vms running.

$ ps uxawww| grep vbox
vbox      1514 56.9  1.0 5149168 260412 ?      Ssl  Nov19 1852:55 /usr/lib/virtualbox/VBoxHeadless -s ip400-gitlab-server
vbox      1597  2.4  0.5 3620484 125116 ?      Ssl  Nov19  79:55 /usr/lib/virtualbox/VBoxHeadless -s ip400-artifactory-server
vbox      1634  2.5  0.3 1754960 92084 ?       Ssl  Nov19  82:33 /usr/lib/virtualbox/VBoxHeadless -s ip400-redmine-server

list running machines

VBoxManage list runningvms