Home

Awesome

knife-kvm

Gem Version

Beta Version - supports Create, Delete and List for VMs

Subcommands

knife kvm vm create

NameDefaultDescription
-h, --hostnamerequiredKVM hostname or IP
-u, --usernamerequiredKVM host username
-p, --passwordrequiredKVM host password
--flavorrequiredOS Flavor (ubuntu or el)
--memory1024 (MB)memory in megabytes
--iso-imagerequiredinstallation ISO filename
--guest-iprequiredguest IP address
--guest-gatewayrequiredguest gateway
--guest-netmaskrequiredguest netmask
--guest-nameserverrequiredguest nameserver
--dhcpfalseuse dhcp?
--networkdirectnetwork name for virt-install
--disk-size10 (GB)hard drive size in gigabytes
--disk-base-path/dev/LVM1Base path of disk
--custom-kickstartfalsepath of custom kickstart file
--vcpus2number of virtual CPUs

Notes

knife kvm vm delete

NameDefaultDescription
-h, --hostnamerequiredKVM hostname or IP
-u, --usernamerequiredKVM host username
-p, --passwordrequiredKVM host password

knife kvm vm list

NameDefaultDescription
-h, --hostnamerequiredKVM hostname or IP
-u, --usernamerequiredKVM host username
-p, --passwordrequiredKVM host password

Using a custom kickstart file

Example:

knife kvm vm create node1 -u root --password use_ssh_key -h 127.0.0.1 --flavor el --root-password 'foobar01' --location '/opt/ISO/CentOS-7-x86_64-Minimal-1511.iso' --main-network-adapter eth0 --disk-size 30 --memory 4096 --disk-base-path /opt/VM_DISKS --custom-kickstart /tmp/my_kickstart.ks --run-list role[foo] --bootstrap-node-ip 192.168.122.77

Contributing

  1. Fork it ( https://github.com/chef/knife-kvm/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

Author:: Scott Hain shain@chef.io

Copyright:: Copyright (c) 2015 Chef Software, Inc.

License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.