Hi!
I would like to install Ubuntu as a GuestOS with VBoxManage unattended installation. I have managed to create vm, hdd, network adapter (including NAT port forwarding), etc. and I have also successfully installed the Ubuntu Server 16.04.5 LTS from DVD ISO file. The problem is, that SSH server is not installed by default and I can not connect to the VM with SSH (through port forwarding).
How can I tell the VBoxManage to install the Ubuntu OpenSSH Server package (which can be easily selected, when installation is driven by the user interactively)?
Thank you for your help!
Marko
Enabling SSH with Unattended Installation
-
- Posts: 5
- Joined: 1. Sep 2009, 23:09
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: Ubuntu, RedHat, CentOS, Windows 10, Windows 7
-
- Site Moderator
- Posts: 27330
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Enabling SSH with Unattended Installation
As far as I know, it's called "Unattended installation", not "Unattended configuration". VirtualBox can help you get it installed, not configured. You can configure some aspects, but not the user's background picture for example.markokrajnc wrote:How can I tell the VBoxManage to install the Ubuntu OpenSSH Server package
Take a look at ch. 8.42. VBoxManage unattended to see what you can or can't do.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 5
- Joined: 1. Sep 2009, 23:09
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: Ubuntu, RedHat, CentOS, Windows 10, Windows 7
Re: Enabling SSH with Unattended Installation
Thank you for your answer! I understand that the main purpose is installation and not configuration. SSH server however is so basic for VMs that it is very often part of installation (since configuration is made later over SSH connection).
According to "unattended templates" the Debian is installed with OpenSSL Server (see UnattendedTemplates/debian_preseed.cfg), but Ubuntu is installed without (see UnattendedTemplates/ubuntu_preseed.cfg).
It looks like I will copy and modify ubuntu_preseed.cfg to meet my needs...
Thank you!
Marko
According to "unattended templates" the Debian is installed with OpenSSL Server (see UnattendedTemplates/debian_preseed.cfg), but Ubuntu is installed without (see UnattendedTemplates/ubuntu_preseed.cfg).
It looks like I will copy and modify ubuntu_preseed.cfg to meet my needs...
Thank you!
Marko
-
- Site Moderator
- Posts: 27330
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Enabling SSH with Unattended Installation
Oh, that's interesting! Really interesting. Thank you Marko for "opening my eyes", I'll have to check out how these things work. I've seen the unattended option, I didn't realize that there were templates that came along with it.markokrajnc wrote:According to "unattended templates" ...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 5
- Joined: 1. Sep 2009, 23:09
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: Ubuntu, RedHat, CentOS, Windows 10, Windows 7
Re: Enabling SSH with Unattended Installation
I am proposing a new parameter for VBoxManage unattended install (https://www.virtualbox.org/manual/ch08. ... unattended):socratis wrote:I'll have to check out how these things work...
--install-ssh-server, --no-install-ssh-server
Whether to install the SSH server. Not all guest OSes support this. (default: --no-install-ssh-server)
This would be very useful and could be implemented uniformly for all OSes which support SSH.
Regards,
Marko
-
- Site Moderator
- Posts: 27330
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Enabling SSH with Unattended Installation
Since you already have the template, do you want to have individual command line switches for individual packages? What if the unattended is a Windows install? Then what?
No, that's what the templates are for, methinks...
No, that's what the templates are for, methinks...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 5
- Joined: 1. Sep 2009, 23:09
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: Ubuntu, RedHat, CentOS, Windows 10, Windows 7
Re: Enabling SSH with Unattended Installation
I agree that having a switch for each individual package is a bad idea. I claim that SSH is different, because often the configuration is done over SSH connection, so SSH must be installed before configuration - this means during installation.
For unattended Windows install the Windows Remote Shell could be enabled (so maybe the naming --install-remote-shell, --no-install-remote-shell would be more appropriate).
For OSes which don't have remote shell nothing would happen - therefore I wrote "Not all guest OSes support this." - and a similar phrase is used in VirtualBox manual on Unattended Installation (https://www.virtualbox.org/manual/ch08. ... unattended), because there are already other parameters which are not supported by all OSes...
Anyway: I have solved my issues with templates, but I can imagine this feature would be nice to have on a generic level (for all supported OSes), so users don't need to mess with templates for each OS they use...
And there is another issue: for some OSes the SSH is currently installed (like Debian) and for some it is not installed (like Ubuntu). And this new switch would eliminate such things...
Regards,
Marko
For unattended Windows install the Windows Remote Shell could be enabled (so maybe the naming --install-remote-shell, --no-install-remote-shell would be more appropriate).
For OSes which don't have remote shell nothing would happen - therefore I wrote "Not all guest OSes support this." - and a similar phrase is used in VirtualBox manual on Unattended Installation (https://www.virtualbox.org/manual/ch08. ... unattended), because there are already other parameters which are not supported by all OSes...
Anyway: I have solved my issues with templates, but I can imagine this feature would be nice to have on a generic level (for all supported OSes), so users don't need to mess with templates for each OS they use...
And there is another issue: for some OSes the SSH is currently installed (like Debian) and for some it is not installed (like Ubuntu). And this new switch would eliminate such things...
Regards,
Marko
-
- Site Moderator
- Posts: 27330
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Enabling SSH with Unattended Installation
Thanks Marko for the summary. Moving to "Suggestions" from "Using VirtualBox".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 5
- Joined: 1. Sep 2009, 23:09
- Primary OS: MS Windows 10
- VBox Version: OSE other
- Guest OSses: Ubuntu, RedHat, CentOS, Windows 10, Windows 7
Re: Enabling SSH with Unattended Installation
And Windows Server 2019 will come with OpenSSH Server and Client - info just released:
https://blogs.windows.com/buildingapps/ ... s-openssh/
Regards,
Marko
https://blogs.windows.com/buildingapps/ ... s-openssh/
Regards,
Marko