Skip to content
avanzzzi edited this page Jul 5, 2018 · 4 revisions

How to use

Commands avaiable

list

Hypy will create a cache with indexes for each machine. These indexes are used by other hypy commands to interact with the virtual machines. If your cache is older than the duration specified in sync_interval, a new cache will be created, so the machine's states will be updated. To force an cache update use the sync parameter.

hypy list --help
Usage: hypy list [OPTIONS]

  List virtual machines and its indexes

Options:
  -s, --sync       Syncronize with server updating local cache
  -n, --name TEXT  Filter virtual machines by name
  -r, --rem        Remove old cache before sync
  --help           Show this message and exit.

A machine listing would look like this:

-- Hyper-V Virtual Machine Listing --
Index State   Name                           Uptime
[  0] saved   MACHINE 001                    0:00:00
[  1] saved   MACHINE 002                    0:00:00
[  2] running MACHINE 003                    1:23:46
[  3] running MACHINE 004                    9:01:33
[  4] paused  MACHINE 005                    34 days, 17:58:52
[  5] off     MACHINE 006                    0:00:00
[  6] running MACHINE 007                    23 days, 0:46:56
[  7] running MACHINE 008                    0:18:43
[  8] running MACHINE 009                    4 days, 2:16:29
[  9] off     MACHINE 010                    0:00:00
[ 10] off     MACHINE 011                    0:00:00

ls

The hypy command ls is a shortcut to list -s

connect

Hypy will check the vm state before connecting, starting it if necessary.

hypy connect --help
Usage: hypy.py connect [OPTIONS] IDENT

  Connect to virtual machine identified by index

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

create

hypy create --help
Usage: hypy.py create [OPTIONS] IDENT SNAP_NAME

  Create a new snapshot with vm's current state

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

delete

hypy delete --help
Usage: hypy.py delete [OPTIONS] IDENT SNAP_NAME

  Delete a machine's snapshot by name

Options:
  -n, --name  Use vm name instead of index
  -r          Remove snapshot's children as well
  --help      Show this message and exit.

restore

hypy restore --help
Usage: hypy.py restore [OPTIONS] IDENT SNAP_NAME

  Restore virtual machine snapshot

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

snaps / status

hypy snaps --help
Usage: hypy.py snaps [OPTIONS] IDENT

  List virtual machine snapshots

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

A snap listing would look like this, the * marks the current snapshot.

hypy snaps -n "MACHINE 001"
Index State   Name                           Uptime
[ 99] off     MACHINE 001                    0:01:00
-- Virtual Machine Snapshots --
MACHINE 001
 +-- snap_0* (01/01/2000 00:01:00)
     +-- snap_1 (05/02/2010 00:03:00)

start

hypy start --help
Usage: hypy.py start [OPTIONS] IDENT

  Start virtual machine identified by index

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

stop

hypy stop --help
Usage: hypy.py stop [OPTIONS] IDENT

  Stop virtual machine identified by index

Options:
  -f, --force  Hyper-V gives the guest five minutes to save data, then forces
               a shutdown
  -n, --name   Use vm name instead of index
  --help       Show this message and exit.

pause

hypy pause --help
Usage: hypy.py pause [OPTIONS] IDENT

  Pause virtual machine identified by index

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

resume

hypy resume --help
Usage: hypy.py resume [OPTIONS] IDENT

  Resume (paused) virtual machine identified by index

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.

save

hypy save --help
Usage: hypy.py save [OPTIONS] IDENT

  Save virtual machine identified by index

Options:
  -n, --name  Use vm name instead of index
  --help      Show this message and exit.
Clone this wiki locally