The objective is that after importing, SLES 9 VM will be used in headless mode and connected to by SSH but most importantly without any manual intervention i.e. opening the VM UI console and manually modifying network interface settings or similar.
Therefore I have thought about:
1. Changing preconfigured network interface from Bridged mode to Host-only mode
2. Adding second interface in Bridged mode (this one is to be configured)
3. Adding host only adapter
4. Turning on build in VirtualBox built-in DHCP server, using limited range of addresses to be assigned (1 possible address)
5. Turning on guest VM and establishing connection to the one possible IP address
6. There I would be running some bash scripts that would configure second interface to use static IP address that could be used for any further connections
7. (Optional) remove first DHCP interface
Commands I have run after the import are:
Code: Select all
# 1. Changing preconfigured network interface from Bridged mode to Host-only mode
VBoxManage modifyvm "sles9vm" –nic1 hostonly
VBoxManage modifyvm "sles9vm" –hostonlyadapter1 "vboxnet0"
# 2. Adding second interface in Bridged mode (this one is to be configured)
VBoxManage modifyvm "sles9vm" --nic2 bridged --bridgeadapter2 eth0
# 3. Adding host only adapter
VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
# 4. Turning on build in VirtualBox built-in DHCP server, using limited range of addresses to be assigned (1 possible address)
VBoxManage dhcpserver add --ifname "vboxnet0" --ip 192.168.56.2 --netmask 255.255.255.0 --lowerip 192.168.56.5 --upperip 192.168.56.5 –enable
# 5. Turning on guest VM and establishing connection to the one possible IP address
VBoxManage startvm "sles9vm" --type headlessTherefore I would like to know if anybody has experience with similar setup and maybe knows that I am missing. I have read documentation on Virtual Box and lots of forums but this does not seems to be common problem.