Comments (9)
Hey @b-long , can you be a bit more specific as to what exactly is not working for you, or at what point you get which errors?
from vagrant-cloudstack.
@bheuvel Sure thing, sorry for the vague description earlier. Also, per time restrictions, I dont' think I'll be able to learn Ruby and this plugin's source code to submit a PR.
Assuming it may have something to do with the root cause, note that I'm on Windows. Also, for context, I'm using this provision.sh
script I wrote to aid in debugging:
echo "*******"
echo "Kernel information"
uname -a
echo "*******"
echo "OS information"
cat /etc/*release
echo "*******"
echo "Disk information"
df -h
echo "*******"
echo "Memory information"
free -m
echo "*******"
echo "My hostname: "
hostname
I think I may actually be having 2 separate issues. So, let's start with the first: Username and password prompt issues. Note that the first time a prompt is given it shows hdfs1: Username: hdfs2: Username:
. Upon running vagrant up
with the latter configuration, I receive the following output :
C:\work\CS-MULTI>vagrant up
Bringing machine 'hdfs1' up with 'cloudstack' provider...
Bringing machine 'hdfs2' up with 'cloudstack' provider...
==> hdfs1: Preparing SMB shared folders...
==> hdfs2: Preparing SMB shared folders...
hdfs1: You will be asked for the username and password to use for the SMB
hdfs1: folders shortly. Please use the proper username/password of your
hdfs1: Windows account.
hdfs1:
hdfs2: You will be asked for the username and password to use for the SMB
hdfs2: folders shortly. Please use the proper username/password of your
hdfs2: Windows account.
hdfs2:
hdfs1: Username: hdfs2: Username:
The prompts for hdfs1
and hdfs2
seem to get accidentally interleaved. I've determined that from multiple executions. Next, I type my CloudStack username (my input displays to the right of hdfs1: Username: hdfs2: Username:
:
(continued from earlier)
hdfs1: Username: hdfs2: Username: blong
hdfs1: Password (will be hidden):
I don't think the interleaving is consistent. For example, on this execution I'm prompted for my password next (I can tell because the input is hidden). However, in other executions, I believe the prompt asks for a password next, but doesn't hide the input (presumably filling in the username to hdfs1
or hdfs2
after filling in the first prompt).
Since I've played with this a good bit, I'm fairly certain the prompt is actually asking for my CloudStack credentials, not credentials to log into the VM created by template foo
. That said, I'd suggest you reword the prompt as a new user might assume they should enter in credentials for the VM.
Next, I type my CloudStack password and another prompt is given :
(continued from earlier)
hdfs2:
hdfs1: Username: hdfs2: Username: blong
hdfs1: Password (will be hidden): hdfs2: Password (will be hidden):
Notice that this new prompt is to the right of the prompt labeled "hdfs1: Password". After I input that value, Vagrant begins to do the real work (note I replaced my host IP address with <>) :
hdfs1: Username: hdfs2: Username: blong
hdfs1: Password (will be hidden): hdfs2: Password (will be hidden):
==> hdfs1: Warning! The Cloudstack provider doesn't support any of the Vagrant
==> hdfs1: high-level network configurations (`config.vm.network`). They
==> hdfs1: will be silently ignored.
==> hdfs1: Fetching UUID for network with name 'DevNetwork'
==> hdfs1: Fetching UUID for zone with name 'WORK-Zone'
==> hdfs1: Fetching UUID for service_offering with name 'Large_Instance'
==> hdfs1: Fetching name for template with UUID 'bca478ea-7ae9-445f-b0f3-6605ed68add3'
==> hdfs1: Warning! You didn't specify a keypair to launch your instance with.
==> hdfs1: This can sometimes result in not being able to access your instance.
==> hdfs1: Launching an instance with the following settings...
==> hdfs1: -- Display Name: blong_CS-MULTI_1437141831
==> hdfs1: -- Service offering: Large_Instance (64ad10d0-9aa6-44b6-823f-62b4483d4eb7)
==> hdfs1: -- Template: CentOS-6.6-x86_64-template (bca478ea-7ae9-445f-b0f3-6605ed68add3)
==> hdfs1: -- Zone: WORK-Zone (2b0bc220-f5df-4f7d-b2c1-0c27bce23821)
==> hdfs1: -- Network: DevNetwork (eefb363e-41b3-49d6-b0b8-6fefebd78f0a)
==> hdfs1: Waiting for instance to become "ready"...
==> hdfs1: Waiting for SSH to become available...
hdfs1:
hdfs1: Inserting generated public key within guest...
hdfs1: Removing insecure key from the guest if its present...
hdfs1: Key inserted! Disconnecting and reconnecting using new SSH key...
==> hdfs1: Machine is booted and ready for use!
==> hdfs1: Mounting SMB shared folders...
hdfs1: C:/work/CS-MULTI => /vagrant
==> hdfs1: Running provisioner: shell...
hdfs1: Running: C:/Users/BLONG/AppData/Local/Temp/vagrant-shell20150717-6728-1y3eaoe.sh
==> hdfs1: *******
==> hdfs1: Kernel information
==> hdfs1: Linux VM-492d3049-0275-4f4f-b55e-4b876596107c 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_
64 x86_64 GNU/Linux
==> hdfs1: *******
==> hdfs1: OS information
==> hdfs1: CentOS release 6.6 (Final)
==> hdfs1: CentOS release 6.6 (Final)
==> hdfs1: CentOS release 6.6 (Final)
==> hdfs1: *******
==> hdfs1: Disk information
==> hdfs1: Filesystem Size Used Avail Use% Mounted on
==> hdfs1: /dev/mapper/VolGroup-lv_root
==> hdfs1: 3.9G 824M 2.9G 23% /
==> hdfs1: tmpfs 1.9G 0 1.9G 0% /dev/shm
==> hdfs1: /dev/sda1 477M 48M 405M 11% /boot
==> hdfs1: //<<HOSTIP>>/4c5e231858f4ab0ccfcb572fd85c3b55
==> hdfs1: 150G 119G 31G 80% /vagrant
==> hdfs1: *******
==> hdfs1: Memory information
==> hdfs1: total used free shared buffers cached
==> hdfs1: Mem: 3825 168 3656 0 6 39
==> hdfs1: -/+ buffers/cache: 122 3702
==> hdfs1: Swap: 511 0 511
==> hdfs1: *******
==> hdfs1: My hostname:
==> hdfs1: VM-492d3049-0275-4f4f-b55e-4b876596107c
At this point, everything just hangs, until I hit return. Then, Vagrant continues to do work :
==> hdfs2: Warning! The Cloudstack provider doesn't support any of the Vagrant
==> hdfs2: high-level network configurations (`config.vm.network`). They
==> hdfs2: will be silently ignored.
==> hdfs2: Fetching UUID for network with name 'DevNetwork'
==> hdfs2: Fetching UUID for zone with name 'WORK-Zone'
==> hdfs2: Fetching UUID for service_offering with name 'Large_Instance'
==> hdfs2: Fetching name for template with UUID 'bca478ea-7ae9-445f-b0f3-6605ed68add3'
==> hdfs2: Warning! You didn't specify a keypair to launch your instance with.
==> hdfs2: This can sometimes result in not being able to access your instance.
==> hdfs2: Launching an instance with the following settings...
==> hdfs2: -- Display Name: blong_CS-MULTI_1437142537
==> hdfs2: -- Service offering: Large_Instance (64ad10d0-9aa6-44b6-823f-62b4483d4eb7)
==> hdfs2: -- Template: CentOS-6.6-x86_64-template (bca478ea-7ae9-445f-b0f3-6605ed68add3)
==> hdfs2: -- Zone: WORK-Zone (2b0bc220-f5df-4f7d-b2c1-0c27bce23821)
==> hdfs2: -- Network: DevNetwork (eefb363e-41b3-49d6-b0b8-6fefebd78f0a)
==> hdfs2: Waiting for instance to become "ready"...
==> hdfs2: Waiting for SSH to become available...
hdfs2:
hdfs2: Inserting generated public key within guest...
hdfs2: Removing insecure key from the guest if its present...
hdfs2: Key inserted! Disconnecting and reconnecting using new SSH key...
==> hdfs2: Machine is booted and ready for use!
==> hdfs2: Mounting SMB shared folders...
hdfs2: C:/work/CS-MULTI => /vagrant
==> hdfs2: An error occurred. The error will be shown after all tasks complete.
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.
An error occurred while executing the action on the 'hdfs2'
machine. Please handle this error then try again:
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t cifs -o uid=`id -u root`,gid=`getent group root | cut -d: -f3`,sec=ntlm,username=<<CLOUDSTACK-PASSWORD>>,pass=PASSWORDHIDDEN //<<HOSTIP>>/4c5e231858f4ab0ccfcb572fd85c3b55 /vagrant
mount -t cifs -o uid=`id -u root`,gid=`id -g root`,sec=ntlm,username=<<CLOUDSTACK-PASSWORD>>,pass=PASSWORDHIDDEN //<<HOSTIP>>/4c5e231858f4ab0ccfcb572fd85c3b55 /vagrant
The error output from the last command was:
mount: block device //<<HOSTIP>>/4c5e231858f4ab0ccfcb572fd85c3b55 is write-protected, mounting read-only
mount: cannot mount block device //<<HOSTIP>>/4c5e231858f4ab0ccfcb572fd85c3b55 read-only
Towards the end, something to do with the prompt interleaving seems to have caused my password to be used as my username. So, at the bottom I've replaced my CloudStack password with <>
Interestingly, the first node was properly provisioned and I can confirm that by ssh-ing to it and seeing the mounted /vagrant
directory. However, the second was not (there is no /vagrant
directory when I ssh to the machine.
As much as I'd like a username and password prompt to work, it would make a bad user experience if someone were intending to stand up many more nodes. Instead, is there some way that I can set my CloudStack username and password once in a configuration file (or Vagrantfile) and skip the prompting all together?
from vagrant-cloudstack.
@b-long basically Windows, either host and/or guest, is not fully implemented in this plugin.
As a few weeks ago I started using/working on this plugin, also from Windows, and had similar/more issues.
One thing that is probably different between our setups, is that your guest/vm (hdfs1/2) can access your Windows machine right? In my case not, which is why I abandoned cifs in the first place.
Some thoughts on your errors (sorry, back next week);
- Surely your cloudstack-username/password is NOT(?) the same as your (local/domain) windows account, right 😉 ?
As vagrant knows you're running from Windows it default to cifs/smb, which creates local shares on your local machine/laptop (which looking at the permissions I'm personally not so fond off : ). Your VMs need credentials to access them. You can specify the username/password in your Vagrant file according to the docs (link to docs)
- The plugin doesn't seem thread-safe to me, or at least (or more?) on Windows; so up one at a time gives more predictable (better) results.
As said, I'm not (or cannot) using SMB, but let me know if this helps/works.
As I'm trying to get Windows host/guest more in, curious if/when you have other Windows-related problems.
from vagrant-cloudstack.
@b-long the WinRM support implementation made by @bheuvel has been merged to master.
I will make a PR soon with some additional (small) changes. But it basically works how it is now.
from vagrant-cloudstack.
@bheuvel @miguelaferreira Thank you both so much!
@bheuvel Even though I haven't yet had a chance to dig into Ruby more, you did teach me something; your mention of CIFS had me look it up and come to learn more about the relationship between SMB, CIFS and Samba. I'll say no comment regarding your question about my Windows account 😄
@miguelaferreira Thanks for your efforts! Are you saying that the WinRM support ( #96 ) will help resolves trouble I was having with my Windows host provisioning Linux (CloudStack) VMs ? If so, I'm happy to help test 😄
from vagrant-cloudstack.
@b-long not really. The windows support is about supporting windows guests.
By the way, I've seen the behaviour you are describing (or close to it) also on Macs. However, I was never able to reproduce it. The colleagues that did have that behaviour managed to get rid of it by using a clean ruby and vagrant installations.
Are you familiar with bundle?
Bundle would allow you to run the plugin straight from source and not using the gems that are currently installed in your vagrant tool. I would be interested in seeing if the issue still occurs using bundle.
Let me know if I can help you set things up.
from vagrant-cloudstack.
@b-long Did you try to specify the username/password in your Vagrant file according to the docs (link to docs)?
from vagrant-cloudstack.
@b-long I'm fairly certain that configuring the credentials for SMB will solve your problem, so closing this issue for now.
Should you still have a problem, feel more then welcome to re-open this isssue!
from vagrant-cloudstack.
I appreciate that @bheuvel , thanks for your efforts in trying to help me work through this. Per deadlines & such, I ended up having to use a Linux VM (and on other days Linux on bare metal) to control CloudStack. The good news is, I am using vagrant-cloudstack and it's working quite well for me (on Linux) 😄
from vagrant-cloudstack.
Related Issues (20)
- pf_open_firewall should not be combined/related with pf_trusted_networks
- Generate SSH keys within ACS, specific to a VM, for the lifetime of that VM
- Can't provision instance with Basic Networking in v1.2.0 - works on 1.1.0 and 1.0.0 HOT 3
- network_ids should be ignored when network_type is set to Basic HOT 3
- allow nfs mounting HOT 3
- Travis build is failing HOT 1
- Public port is not used by communicator
- When provisioning extra disk, it should be removed when destroying VM
- New release? HOT 3
- Deduplicate code in read_[ssh|winrm|rdp]_info
- Option to use affinity groups for dedicated clusters missing HOT 1
- When destroying VM, inspect (non-) successful job return
- When destroying VM, don't break if additional disk cannot be found HOT 1
- Make vagrant-cloudstack able to run in (Docker) container
- Provide human readable error when `sync_resource` cannot sync name->id
- Write Short and Simple Units of Code
- Write Code Once
- size in deployVirtualMachine is not supported
- "Can't specify network Ids in Basic zone" without any network id given
- unable to list networks unless projectid is also sent.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vagrant-cloudstack.