i have seen and read the virtualbox manual for clonevm:
unfortunately i can't really find any samples that meet my needs and the method i tried fails. i am trying to clone a vm called "student1" to a new vm called "student2", but also give the clone a unique uuid and register it all in one command. here is what i tried that gives me an error(no other info just "error", and shows the help screen).
VBoxManage clonevm student1 --name student2 --uuid --register
**it says the default behavior of --uuid is to assigne a new uuid so i gave it no arguments(also tried the word default).
also i really need 30 clones. is it possible, once i find out how to do the above, to pass multiple arguments to --name to do this all at once, and give them each unique uuid's. example:
VBoxManage clonevm student1 --name student2 student3 student4 --uuid --register
my intention is to have 30 vm's each for a different student who can ssh in to their own vm. i know after the cloning i will need to change the NAT port forwarding rules for each clone. example.
VBoxManage modifyvm student2 --natpf1 "guestssh,tcp,,60002,,22"
VBoxManage modifyvm student2 --natpf1 "guestssh,tcp,,60003,,22"
etc...
**can they all still listen on port 3389 for vrde. i am not going to remote in using rdp so i figure that doesn't really matter. is that a correct assumption
lastly there is no dhcp on the host or host gateway so when i set up the oiginal vm that will be cloned to create the others should the default gateway be the host or the host's default gateway. the reason i ask is if i give the host as the default gateway for a vm using NAT i was hoping vbox will use dhcp to give them all unique ip's so i don't have to edit /etc/networking/interfaces in all 30 vm's
i know this was alot of questions for one thread but they are all closely related and pertain to getting this one task done. i hope that is ok.
VBoxManage clonevm ?'s[SOLVED]
-
BeafZachland
- Posts: 18
- Joined: 29. May 2013, 05:17
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: ubuntu server12.04
VBoxManage clonevm ?'s[SOLVED]
Last edited by BeafZachland on 29. May 2013, 18:45, edited 1 time in total.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VBoxManage clonevm ?'s
I think it is important you fully grasp the following concept : Virtualbox is only a hardware virtualizator. Even tho it comes with some parts to ease its use, it still use only that.
Anything that is guest OS configuration related should be handled the exact same way you would handle it if you had 30 hardware machines. How would you go about it?
In this precise case tho, you can handle the cloning and the port forwarding with some scripting and variable rather quickly.
For the guest network configuration, DHCP would still be the easiest. If you really cannot do it, you should create a master image with the guest additions installed, and then simply use the guestcontrol option of vboxmanage to configure the IPs.
For the VRDE, you will have to assign different ports for each if they run on the same host. If you have one VM per host, you're fine leaving it by default, if your host doesn't conflict with it (Remote Desktop on Windows Host)
At least that's how I would go about it.
Anything that is guest OS configuration related should be handled the exact same way you would handle it if you had 30 hardware machines. How would you go about it?
In this precise case tho, you can handle the cloning and the port forwarding with some scripting and variable rather quickly.
For the guest network configuration, DHCP would still be the easiest. If you really cannot do it, you should create a master image with the guest additions installed, and then simply use the guestcontrol option of vboxmanage to configure the IPs.
For the VRDE, you will have to assign different ports for each if they run on the same host. If you have one VM per host, you're fine leaving it by default, if your host doesn't conflict with it (Remote Desktop on Windows Host)
At least that's how I would go about it.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
BeafZachland
- Posts: 18
- Joined: 29. May 2013, 05:17
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: ubuntu server12.04
Re: VBoxManage clonevm ?'s
good info, but i did read that vbox's NAT networking uses DHCP to do the forwarding so i assumed it might give out IP's as well. I appreciate the answers to all my questions but you missed the one i really need. how do i use VBoxManage clonevm? i type the following at my ubuntu server 12.04 command line and it fails:
VBoxManage clonevm student1 --name student2 --uuid --register
**remember i need it to get a unique uuid and register it.
VBoxManage clonevm student1 --name student2 --uuid --register
**remember i need it to get a unique uuid and register it.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VBoxManage clonevm ?'s
I cannot answer your question unless you show me the exact verbatim error you're getting, you only tell us the command so far.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
BeafZachland
- Posts: 18
- Joined: 29. May 2013, 05:17
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: ubuntu server12.04
Re: VBoxManage clonevm ?'s
actually i did. here is the quote from my original post: "that gives me an error(no other info just "error", and shows the help screen)."
***there is no error code or explaination, just the word ERROR followed by the command usage screen. this is usually the behavior when the command is malformed which is why i wrote the command i used.
***there is no error code or explaination, just the word ERROR followed by the command usage screen. this is usually the behavior when the command is malformed which is why i wrote the command i used.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VBoxManage clonevm ?'s
I checked the exact syntax, if you use --uuid, you must give the value yourself. Cloning will by default change it, so unless you want to give a specific value, do not use it.
The good command would be :
The good command would be :
Code: Select all
VBoxManage clonevm student1 --name student2 --registerHyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
BeafZachland
- Posts: 18
- Joined: 29. May 2013, 05:17
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: ubuntu server12.04
Re: VBoxManage clonevm ?'s
Awesome, thank you. I thought it meant the default for the --uuid switch because it was written there. i didn't realize it was talking about the default for clonevm. I apreciate the help and quick responses. I will mark this solved at this point.