Skip to content

Instantly share code, notes, and snippets.

$ sudo vmsctl -m connection_url=qemu:///system bless vms-test vms-live-image
<11761> [INFO] vmsrun.py:601 vmsrun [exec False]: vmsd save hypervisor=kvm memsrv=file:///var/gridcentric/vms-live-image.gc memtap=null:// id=11731 pages=262144 vcpus=1 generation=0e210d2c-534b4e32-4e32-b43e-c828abb6bf7d fd=4 dir.cache=/dev/shm/vms control.filepattern=/dev/shm/vms/control/ dir.store=/var/gridcentric log.prefix=<save.11731> module.path=/usr/lib64/vms:/usr/lib/vms debugfd=2 kvm.mem_path=/proc/11731/fd/7 kvm.qmp_path=/tmp/qmp_vms_mon-rkk5P8.sock file.sparse=1 kvm.hmp_path=/tmp/hmp_vms_mon-3zPG4G.sock replace.spec=
<11761> [INFO] image.py:63 Running command /usr/bin/qemu-img-vms convert -O qcow2 /var/lib/libvirt/images/vms-test.img /var/gridcentric/vms-live-image.0.disk
<11761> [WARNING] management.py:212 Unable to change the ownership of the vms file /dev/shm/vms/prefetch.0e210d2c-534b4e32-4e32-b43e-c828abb6bf7d.
<11761> [WARNING] management.py:212 Unable to change the ownership of the vms file /dev/shm/vms/share.0e210
@gcgists
gcgists / gc_install_repos.sh
Last active December 31, 2015 01:59
Installation of VMS for Libvirt/KVM
# Put your download key here:
export GC_KEY=xxxxxxxxxxxxxxxxxxxxxx
# Install Gridcentric signing key
wget -O - http://downloads.gridcentric.com/packages/gridcentric.key | sudo apt-key add -
# Add Gridcentric repositories
echo deb http://downloads.gridcentric.com/packages/$GC_KEY/vms/ubuntu/ gridcentric multiverse | sudo tee -a /etc/apt/sources.list.d/gridcentric.list
# Update apt
$ nova backup-schedule-add test 1h 1d
+------------+------------------+-------------------+--------+
| ID | Frequency | Retention | Active |
+------------+------------------+-------------------+--------+
| b-s64bz49p | Every 10 minutes | For the last hour | True |
| b-0eseoaea | Every hour | For the last day | True |
+------------+------------------+-------------------+--------+
echo | sudo tee -a /etc/nova/nova.conf <<EOF
osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
osapi_compute_extension=veta.extension.Veta_extension
EOF
sudo restart nova-api
@gcgists
gcgists / vms_suppack_xs62.sh
Last active December 24, 2015 14:49
Download and install the Gridcentric VMS Supplemental Pack to a XenServer 6.2 host.
wget http://downloads.gridcentriclabs.com/packages/$GCKEY/vms.zip
unzip vms.zip
# Ensure checksums match
cat vms.iso.md5
md5sum vms.iso
xe-install-supplemental-pack $PWD/vms.iso
# Follow prompts. Reboot after a successfull install
[ $? ] && reboot
@gcgists
gcgists / install_vms_xs62_suppack.sh
Created October 2, 2013 14:26
Installing the VMS Supplemental Pack for XenServer 6.2 from a host root shell
xe-install-supplemental-pack /root/vms.iso
# Follow prompts. Reboot after a successfull install
[ $? ] && reboot
@gcgists
gcgists / download_vms_supplemental_pack_xs62.sh
Created October 2, 2013 14:20
Download and verify the VMS Supplemental Pack for XenServer 6.2
wget http://downloads.gridcentriclabs.com/packages/$GCKEY/dist/vms.iso
md5sum vms.iso
wget --quiet -O - http://downloads.gridcentriclabs.com/packages/$GCKEY/dist/vms.iso.md5
# Compare both md5 outputs
@gcgists
gcgists / quickstart_single_step.sh
Last active December 23, 2015 20:59 — forked from andreslagarcavilla/setup.sh
wget setup to the right file
# Put your download key here:
export GC_KEY=xxxxxxxxxxxxxxxxxxxxxx
wget -O setup.sh https://gist.github.com/gcgists/6693644/raw/setup.sh
chmod a+x setup.sh
sudo ./setup.sh $GC_KEY
@gcgists
gcgists / gc_example_migrate_during.sh
Last active December 22, 2015 18:39
OpenStack live migration with Cobalt and VMS
$ nova list
+--------------------------------------+---------------------+-----------+-----------------------+
| ID | Name | Status | Networks |
+--------------------------------------+---------------------+-----------+-----------------------+
| 76c9f4eb-0111-409a-8e88-e5eb2d5c850e | lm-test | MIGRATING | internal=X.X.X.X |
+--------------------------------------+---------------------+-----------+-----------------------+
<#
.SYNOPSIS
Generates a new machine account with the given password.
.DESCRIPTION
Generates a new machine account in active directory with the given password.
This cmdlet is useful for creating machine accounts for Gridcentric Live Images.
.PARAMETER Name
Name for the machine account to create. Must be exactly 15 characters.
.PARAMETER Password
The plain-text password to set for the machine account.