Ask Your Question
0

What happens when nova boot image

asked 2014-10-27 12:52:08 -0500

wojtylacz gravatar image

This question is related to my serious troubles with booting images in https://ask.openstack.org/en/question/51282/how-to-login-to-vm-on-isolated-network/ (question here)

Even if i specify in myfile.txt

#cloud-config
password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True

while

nova boot --flavor 2 --user-data=./myfile.txt --image 03c9ad20-b0a3-4b71-aa08-2728ecb66210 VF19RS

I cannot for God to login to VM via novnc console. It rejects me with login incorrect.

So my question is, what exactly happens when i call nova boot command? Something with cloud-init or something similar? Can i control the process when booting up? May i disable all changes being made for bright new VM instance?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-10-27 14:26:02 -0500

Kapache gravatar image

updated 2014-10-27 14:29:11 -0500

Hi,

By default nova boot will generate an admin password. If your compute nova.conf has the options to allow the injection of a password; however if you are using cloudinit you would use something like this.

#cloud-config hostname: instance-hostname fqdn: instance-hostname manage_etc_hosts: true password: password chpasswd: { expire: False } ssh_pwauth: True

Then for the compute nodes nova.conf make sure you have.

# Inject the admin password at boot time, without an agent. # (boolean value) libvirt_inject_password=True

# Inject the ssh public key at boot time (boolean value) libvirt_inject_key=true

# The partition to inject to : -2 => disable, -1 => inspect # (libguestfs only), 0 => not partitioned, >0 => partition # number (integer value) libvirt_inject_partition=-1

NOTE for the password parameter you put on your cloudinit file will be for the default user you have on cloudinit.cfg, so if your is set to admin and that user doesn't exist' on the image you wont be able to login, so before using cloud-init make sure the image user exist.

edit flag offensive delete link more

Comments

Sorry, but i dont follow you, what do you mean... What should i change in cloudinit.cfg file before creating image in glance and what should i use in customization file when nova boot?

wojtylacz gravatar imagewojtylacz ( 2014-10-29 12:33:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-27 12:52:08 -0500

Seen: 458 times

Last updated: Oct 27 '14