vmware-archive / vagrant-vmware-appcatalyst

Vagrant provider for VMware AppCatalyst®
Apache License 2.0
73 stars 16 forks source link

"Power on was canceled, make sure the VM you're trying to power on does not violate AppCatalyst constraints." #5

Closed tehranian closed 8 years ago

tehranian commented 9 years ago

I first successfully got vagrant-vmware-appcatalyst working with the hashicorp/precise64 box mentioned in the README (Yay!). I then immediately turned my attention to running one of the other vmware_desktop boxes available from https://atlas.hashicorp.com/boxes/search.

When attempting to use some of the VMware-compatible boxes found on Atlas, I get the following error:

$ v up
Bringing machine 'default' up with 'vmware_appcatalyst' provider...
==> default: Checking if box 'chef/centos-7.0' is up to date...
Power on was canceled, make sure the VM you're trying to power on does not violate AppCatalyst constraints.

What are these AppCatalyst constraints that I was not aware of? :)

I looked through the plugin's code and it looks like this exception is coming from a status code Errors::UnattendedCodeError that the appcatalyst-daemon is returning in set_vm_power().

Here's my Vagrantfile:

ENV['VAGRANT_DEFAULT_PROVIDER'] = 'vmware_appcatalyst'

Vagrant.configure('2') do |config|
  config.vm.box = "chef/centos-7.0"

  config.vm.provider 'vmware_appcatalyst' do |v|
    v.vmx['numvcpus'] = '1'
    v.vmx['memsize'] = '512'
  end
end

And a link to the debug logs: https://gist.github.com/tehranian/5385668c196da102dc6c

frapposelli commented 9 years ago

Interesting, AppCatalyst has a few constraints when powering on VMs, the VM must have a VGA controller, be Virtual HW 11 (and both are automatically added by the vagrant plugin) and the last one is that the guest Os must be of the Linux family, so you should be all set.

If you look under the .vagrant folder you'll find the VM files, can you put the vmware.log file in a gist?

tehranian commented 9 years ago

Ah. Good call. From https://gist.github.com/tehranian/011f8dca357457b98257 :

2015-06-25T06:57:44.153-08:00| vmx| I125: DICT                   guestos = "centos-64"
...
2015-06-25T06:57:44.153-08:00| vmx| I125: Msg_Post: Error
2015-06-25T06:57:44.153-08:00| vmx| I125: [msg.vmx.gantry.badOS] Guest operating system 'centos-64' is not supported by VMware AppCatalyst.

I also got this error with an Ubuntu Precise box from Atlas, IIRC.

frapposelli commented 9 years ago

Ok, seems like centos-64 is not recognized as a valid operating system for some reason, you can try to override this by adding:

v.vmx['guestos'] = "other3xlinux-64"

to your provider configuration.

tehranian commented 9 years ago

Thanks. That did the trick!

So by policy I can only use Linux VMs w/AppCatalyst? If so, that is sad for us because our Delphix VMs are not Linux. :disappointed:

$ vagrant up 
Bringing machine 'default' up with 'vmware_appcatalyst' provider...
==> default: Checking if box 'chef/centos-7.0' is up to date...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.24.145:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Mounting shared folders...
    default: /vagrant => /Users/dtehranian/Downloads/boxes/trusty
$
frapposelli commented 9 years ago

Yes, Linux is the only supported operating system for AppCatalyst today.

tehranian commented 9 years ago

Yes, Linux is the only supported operating system for AppCatalyst today.

Darn. I assume the restriction is there to prevent people who want to run Windows on their Mac from having a free edition of Fusion. Any plans to allow other UNIX-like OSes? We're using a fork of Illumos.

/cc @gerty3000

frapposelli commented 9 years ago

@tehranian it's something we're considering.

tehranian commented 9 years ago

@frapposelli Awesome, thanks buddy! :+1:

scottslowe commented 9 years ago

I'm seeing this same behavior trying to boot a Debian 8.1 64-bit VM using AppCatalyst TP2. This VM is based on a Vagrant box I built myself using Packer (I can share the Packer template if that would be helpful). I've already tried setting the guestOS value to "other3xlinux-64" as suggested above, but that didn't work. (I also tried "debian7-64" and "ubuntu-64".) I looked in the .vagrant directory, but it doesn't look like a vmware.log file is being created.

frapposelli commented 8 years ago

AppCatalyst TP2 supports all Linux flavors, *BSD, Solaris and VMware ESXi.