Setup
For testing purposes, I installed MAAS in a VirtualBox VM and I want it to PXE boot a second VM.
Both VMs are connected to a VirtualBox internal network.
The MAAS VM is a Ubuntu Server 14.04.2 and I installed version 1.7.5+bzr3369-0ubuntu1~trusty1 of the following packages:
maas
maas-region-controller
maas-cluster-controller
maas-dhcp
maas-dns
In the "Images" section of the MAAS GUI, I added the 14.04 LTS image from the default archive (http://archive.ubuntu.com/ubuntu). The default cluster ("Cluster master") was then able to succesfully sync.
On the MAAS VM I also generated ssh keys with ssh-keygen and saved them in the default location (~/.ssh/). Then in the user preferences section of the GUI, I added the SSH public key.
In the "Clusters" section of the GUI, I added an interface (eth2) to "Cluster Master" and configured it to manage dhcp and dns. Interface eth2 is connected to the other VM (through VirtualBox internal network).
In the GUI, I added a node to "default cluster" and left the "Power type" blank since Wake On Lan doesn't work with VirtualBox.
Questions
After manually starting up the client VM, it acquires an ip address and successfully begins the boot up process. However at some point it hangs for a full 120s with the following message repeated several times:
url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [70/120s]: request error [HTTPConnectionPool(host='169.254.269.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by : [Errno 101] Network is unreachable)]
After reading about this online I found out that since this is a cloud image of Ubuntu it is trying to retrieve instance metadata.
1) How would I go about disabling this behavior?
2) How would I go about running a metadata (cloud-init?) service (and where? on the MAAS VM?) to supply the instance metadata?
I'm not sure if this is related to the first issue. After the 120s, the boot up process resumes and I'm presented with a login prompt. After reading online I found out that I cannot login locally. Instead I must connect via ssh with publickey authentication. As mentioned above I have generated ssh keys and added them to MAAS, yet my ssh connection is refused.
test@ubuntuServer1404:~$ ssh ubuntu@192.168.7.101 -v
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.7.101 [192.168.7.101] port 22.
debug1: Connection established.
debug1: identity file /home/test/.ssh/id_rsa type 1
debug1: identity file /home/test/.ssh/id_rsa-cert type -1
debug1: identity file /home/test/.ssh/id_dsa type -1
debug1: identity file /home/test/.ssh/id_dsa-cert type -1
debug1: identity file /home/test/.ssh/id_ecdsa type -1
debug1: identity file /home/test/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/test/.ssh/id_ed25519 type -1
debug1: identity file /home/test/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 06:16:8e:d2:22:3a:0b:67:64:3d:7b:17:69:fb:ee:29
debug1: Host '192.168.7.101' is known and matches the ECDSA host key.
debug1: Found key in /home/test/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/test/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/test/.ssh/id_dsa
debug1: Trying private key: /home/test/.ssh/id_ecdsa
debug1: Trying private key: /home/test/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
Any help is appreciated. Thanks.