Skip to main content

Makes VSS snapshot disks bootable in Google Cloud

Project description

SnapManager

A tool for managing VSS-enabled snapshots in Google Cloud Platform. Currently supports restoring VSS snapshots and creating bootable VM instances from them.

Features

  • Restore VSS-enabled snapshots to bootable VM instances
  • Handles all the complexity of making Windows disks bootable
  • Clean and user-friendly command-line interface
  • Detailed progress tracking and error reporting

Prerequisites

  • Python 3.8 or higher
  • Google Cloud SDK
  • Google Cloud Service Account with the following permissions:
    • roles/compute.instanceAdmin.v1
    • roles/compute.networkAdmin
    • roles/compute.securityAdmin

Authentication

SnapManager uses Google Cloud Application Default Credentials for authentication. You can set this up in one of two ways:

  1. Service Account Key File (Recommended for production):

    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
    
  2. User Credentials (Good for development):

    gcloud auth application-default login
    

Installation

pip install snapmanager

Usage

# Show help
snapmanager restore --help

# Restore a VSS snapshot
snapmanager restore \
  --project YOUR_PROJECT_ID \
  --zone ZONE \
  --vpc-network NETWORK_NAME \
  --subnet SUBNET_NAME \
  --snapshot SNAPSHOT_NAME

Command Arguments

  • --project: Google Cloud project ID where the snapshot and new VM will be created
  • --zone: Google Cloud zone where the new VM will be created
  • --vpc-network: VPC network to attach the new VM to
  • --subnet: Subnet within the VPC network for the new VM
  • --snapshot: Name of the VSS-enabled snapshot to restore from
  • --verbose: Show detailed progress information for each step

How It Works

  1. Creates a temporary Windows Server VM in the specified VPC network and subnet
  2. Creates a firewall rule to allow WinRM (port 5986) access to the temporary VM
  3. Attaches the disk created from the VSS snapshot to the temporary VM
  4. Configures Windows boot configuration using the temporary VM
  5. Detaches the disk from the temporary VM
  6. Deletes the temporary VM

Example

snapmanager restore \
  --project my-project \
  --zone europe-west1-b \
  --vpc-network default \
  --subnet default \
  --snapshot my-windows-vss-snapshot

This will:

  1. Create a new disk from the VSS snapshot
  2. Create a temporary VM to make the disk bootable
  3. Run necessary Windows boot configuration commands
  4. Create a final VM with the bootable disk
  5. Clean up temporary resources

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapmanager-0.2.9.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapmanager-0.2.9-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file snapmanager-0.2.9.tar.gz.

File metadata

  • Download URL: snapmanager-0.2.9.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for snapmanager-0.2.9.tar.gz
Algorithm Hash digest
SHA256 f0ae2fb809494e61596f7f2eaaaf4cbba0c26ccb3ccdef61d96055e42fdf7a9f
MD5 2d880ca3dbec6d71b5f869cb2f0d41e8
BLAKE2b-256 ef3e3ea51bf1fea614c9a593317c8bc3d6f5595e6fe7d4e37b20ff3409942e35

See more details on using hashes here.

File details

Details for the file snapmanager-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: snapmanager-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for snapmanager-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 1afee1c706561843f3d2f9c73c577a3b012fd0204cb2f1d06c9d288f566e7c90
MD5 2d7a37f6f1ffda5536950adb0599a1b8
BLAKE2b-256 1d815397e8287b1ff053fe90ab8bfa27bd88c40a4524b2093f2d0f45377283f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page