Ask Your Question

put local file in a Openstack VM instance

asked 2014-08-27 04:37:27 -0500

sjmmone gravatar image

updated 2014-08-27 04:43:50 -0500

hi to all

I want to put a local file in a VM openstack instance, but i don't have idea how to do that. I try with the command --file, the VM is created but when i go to see if there is the file in the VM, i saw that it there isn't. please help me

thanks Carunchio

edit retag flag offensive close merge delete


nova boot --flavor m1.medium --image debian --nic net-id=6e0ea971-122d-4af5-b311-211679bc3e77 --security-group default --file /home=/root/new/Profilo-Hardware.html demo-instance1

this is the command that I use

sjmmone gravatar imagesjmmone ( 2014-08-27 04:40:33 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-08-27 06:14:28 -0500

dbaxps gravatar image

updated 2014-08-28 05:09:29 -0500

Before running nova boot .... Please learn first How to create nova instance with ssh keypair
Say default user on VM is Ubuntu, floating IP is, sshkey is oskey25.pem. On Controller :-

[root@icehouse1 Downloads(keystone_admin)]# adduser ubuntu
[root@icehouse1 Downloads(keystone_admin)]# cp oskey25.pem /home/ubuntu
[root@icehouse1 Downloads(keystone_admin)]# cd /home/ubuntu
[root@icehouse1 ubuntu(keystone_admin)]# ls -l
total 4
-rw-------. 1 root root 1679 Aug 27 15:06 oskey25.pem
[root@icehouse1 ubuntu(keystone_admin)]# chown ubuntu:ubuntu *.pem
[root@icehouse1 ubuntu(keystone_admin)]# su - ubuntu
Last login: Wed Aug 27 15:04:42 MSK 2014 on pts/0
[ubuntu@icehouse1 ~]$ ls -l
total 4
-rw-------. 1 ubuntu ubuntu 1679 Aug 27 15:06 oskey25.pem
[ubuntu@icehouse1 ~]$ vi test.1
[ubuntu@icehouse1 ~]$ scp -i oskey25.pem test.1
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is 47:82:0b:48:d8:75:3d:5c:f4:f2:84:e6:13:09:5c:3a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (ECDSA) to the list of known hosts.
test.1                                                                 100%   31     0.0KB/s   00:00
edit flag offensive delete link more


??? I don't understand what you are write

sjmmone gravatar imagesjmmone ( 2014-08-27 06:37:05 -0500 )edit

I mean , that creating user exactly as default ( or any other user) on VM , you may run utility of remote copying files between hosts - scp . When you connect via ssh to floating IP you need instance ssh-keypair like ssh -i key25.pem ubuntu@FLOATING-IP, same ssh-keypair may be used by scp.

dbaxps gravatar imagedbaxps ( 2014-08-27 06:56:53 -0500 )edit

but i have a problem with ssh and i can't connect i don't know why, do you know some procedure that i can use without ssh, for give a data to VM istance

sjmmone gravatar imagesjmmone ( 2014-08-27 07:07:24 -0500 )edit

Please, scroll down to "Boot an instance and attach Floating IP" and see how you are supposed to manage when launching ( booting ) your VM.

dbaxps gravatar imagedbaxps ( 2014-08-27 07:25:40 -0500 )edit

answered 2014-08-28 04:37:24 -0500

sjmmone gravatar image

Now i have an other problem when i put this command i have the following error:

nova boot --flavor m1.large --image debian --nic net-id=6e0ea971-122d-4af5-b311-211679bc3e77 --security-group default --user-data /home/test_openstack.tar.gz demo-instance1

ERROR: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte

nova boot --flavor m1.large --image debian --nic net-id=6e0ea971-122d-4af5-b311-211679bc3e77 --security-group default --file /home=/home/test_openstack.tar.gz demo-instance1

ERROR: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)

edit flag offensive delete link more

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


Asked: 2014-08-27 04:37:27 -0500

Seen: 1,703 times

Last updated: Aug 28 '14