-
-
Save timbot/6470011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a VM snapshot | |
nova live-image-create vms-test-vm vms-test-snapshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Boot a VM, passing in the cloud-init-vms.txt file as user-data. | |
# Note: --flavor, --image, and --security_groups should | |
# be set according to your environment. | |
nova boot --flavor windows.medium --image win7-x64-vlk --security_groups windows --poll vms-test-vm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete a VM | |
nova delete vms-test-clone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Discard a live-image | |
nova live-image-delete vms-test-snapshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nova list | |
+--------------------------------------+-------------------+--------+-----------------+ | |
| ID | Name | Status | Networks | | |
+--------------------------------------+-------------------+--------+-----------------+ | |
| a4867099-e979-444c-bafb-6c661eac2278 | vms-test-snapshot | BUILD | | | |
| fac5036a-e899-4251-8c63-979dc0303917 | vms-test-vm | ACTIVE | private=X.X.X.X | | |
+--------------------------------------+-------------------+--------+-----------------+ | |
[...] | |
$ nova list | |
+--------------------------------------+-------------------+---------+-----------------+ | |
| ID | Name | Status | Networks | | |
+--------------------------------------+-------------------+---------+-----------------+ | |
| a4867099-e979-444c-bafb-6c661eac2278 | vms-test-snapshot | BLESSED | | | |
| fac5036a-e899-4251-8c63-979dc0303917 | vms-test-vm | ACTIVE | private=X.X.X.X | | |
+--------------------------------------+-------------------+---------+-----------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nova list | |
+--------------------------------------+-------------------+---------+-----------------+ | |
| ID | Name | Status | Networks | | |
+--------------------------------------+-------------------+---------+-----------------+ | |
| f42bed03-3baa-4bed-92c9-6a15bbb4bc47 | vms-test-clone | BUILD | private=X.X.X.X | | |
| a4867099-e979-444c-bafb-6c661eac2278 | vms-test-snapshot | BLESSED | | | |
| fac5036a-e899-4251-8c63-979dc0303917 | vms-test-vm | ACTIVE | private=X.X.X.X | | |
+--------------------------------------+-------------------+---------+-----------------+ | |
[...] | |
$ nova list | |
+--------------------------------------+-------------------+---------+-----------------+ | |
| ID | Name | Status | Networks | | |
+--------------------------------------+-------------------+---------+-----------------+ | |
| f42bed03-3baa-4bed-92c9-6a15bbb4bc47 | vms-test-clone | ACTIVE | private=X.X.X.X | | |
| a4867099-e979-444c-bafb-6c661eac2278 | vms-test-snapshot | BLESSED | | | |
| fac5036a-e899-4251-8c63-979dc0303917 | vms-test-vm | ACTIVE | private=X.X.X.X | | |
+--------------------------------------+-------------------+---------+-----------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch a VM from a live-image | |
# Note: all parameters are optional. | |
# --target is the memory target for the clone | |
# virtual machine, in megabytes, and defaults | |
# to 0 (no memory target) | |
# --user_data defaults to None (no user data) | |
# --security-groups defaults to the security groups | |
# specified in the original VM | |
# --availability_zone defaults to the availability | |
# zone specified in the original VM | |
# --num-instances defaults to 1 | |
# --key-name defaults to the key name specified | |
# in the original VM | |
# --params defaults to None | |
nova live-image-start --live-image vms-test-snapshot vms-test-clone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch a VM from a live-image, giving a machine name and Active Directory machine account password | |
nova live-image-start --live-image vms-test-snapshot --params name=vms-test-win-01 --params machinepassword=j3n432rjnkjafeeaf vms-test-clone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment