Page 1 of 1
How to run command line moving VMs between groups?
Posted: 23. Jun 2020, 17:42
by satimis
Hi all,
1.9. Using VM Groups
https://www.virtualbox.org/manual/UserM ... i-vmgroups
explaining to use command line creating new group.
I expect to learn how to move VMs between groups with command lines?
Please refers to attached photo
There are 3 groups on the VM Manager. I have no idea how they were created? They were created accidentally when I used drag-n-drop moving VMs inside the group. Before I had only one group.
Now;
New group 2
Code: Select all
phgallery5
phgallery5a
wordpresspc1a00
New group 3
I suppose the rest VMs being in New group 1
Please advise how to run command line;
1)
Move ub2004pciessd-01 from "New group 3 to "New group 2" and delete "New Group 3" afterwards?
2)
Move VMs from "New group 1" to "New group 2"
Thanks in advance
Regards
Re: How to run command line moving VMs between groups?
Posted: 24. Jun 2020, 01:07
by scottgus1
Your previous list on the subject
viewtopic.php?f=7&t=98673&p=478431#p478431 says you were drag-n-dropping the guests, accidentally or intentionally. That is one way the groups can be created, by dragging one guest on top of another.
Your link to the manual gives the commands you want. Did you try them?
the Manual wrote:Detach a VM from the group, and delete the group if empty. For example:
VBoxManage modifyvm "vm01" --groups ""
This will move guest 'phgallery5' out of 'New Group 2' and into the main list with the 'Quantum' guests:
VBoxManage modifyvm "phgallery5" --groups ""
This will move guest 'phgallery5' into 'New Group 3'
VBoxManage modifyvm "phgallery5" --groups "/New Group 3"
'phgallery5' needs to be shut down for these moves.
Re: How to run command line moving VMs between groups?
Posted: 24. Jun 2020, 06:44
by satimis
Thanks for your advice.
scottgus1 wrote: - snip -
This will move guest 'phgallery5' into 'New Group 3'
VBoxManage modifyvm "phgallery5" --groups "/New Group 3"
'phgallery5' needs to be shut down for these moves.
It is very strange. Running this command another "new group 3" will be created instead of moving 'phgallery5' to the existing "new group 3" ?
Besides after running "VBoxManage modifyvm ....." I need to retart "VM Manager" to take effect.
Regards
Re: How to run command line moving VMs between groups?
Posted: 24. Jun 2020, 15:12
by scottgus1
I haven't played around with creating groups via command-line, so I don't know if the main Virtualbox window needs re-opening or not. I usually just drag-n-drop them, a la
viewtopic.php?f=7&t=98673&p=478456#p478456
I made a mistake in my suggested command line, it should have been:
VBoxManage modifyvm "phgallery5" --groups "/New group 3"
per your screenshot. Vboxmanage commands are case-sensitive, and 'New Group 3' != 'New group 3'.
Re: How to run command line moving VMs between groups?
Posted: 25. Jun 2020, 07:02
by satimis
scottgus1 wrote:I haven't played around with creating groups via command-line, so I don't know if the main Virtualbox window needs re-opening or not. I usually just drag-n-drop them, a la
viewtopic.php?f=7&t=98673&p=478456#p478456
I made a mistake in my suggested command line, it should have been:
VBoxManage modifyvm "phgallery5" --groups "/New group 3"
per your screenshot. Vboxmanage commands are case-sensitive, and 'New Group 3' != 'New group 3'.
Thanks for your advice.
You're right. It is case sensitive. Also it needs restarting VM Manage to take effect.
I have 5 groups created on VM Manager with totally about 50 VMs running. My 1TB PCIe SSD is having sufficient storage space for them. In case running short of storage space, I'll move some of them to the WD 4TB HD which is solely for storage.
Before, I ran Graphic-Interface operation "drag-n-drop" moving VMs around and creating groups as well. For unknown reasons it created 3 groups therefore I resume the idea of running command line doing the job.
I love running command lines operation on Terminal. The operation is exact without problem.
Do you have idea running command line;
1) Move VMs around in the same group?
2) Move VM to the storage WD 4TB HD ?
Thanks
Regards
Re: How to run command line moving VMs between groups?
Posted: 26. Jun 2020, 19:51
by scottgus1