From a6a610fd82e0b0cda489a27e091094275951e200 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 4 Jul 2021 12:37:08 -0700 Subject: [PATCH] Don't allow the migration command to be executed if not enabled currently --- cmd/migrate_vhd.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/migrate_vhd.go b/cmd/migrate_vhd.go index d519152..b0cab55 100644 --- a/cmd/migrate_vhd.go +++ b/cmd/migrate_vhd.go @@ -47,6 +47,9 @@ func newMigrateVHDCommand() *cobra.Command { // Run executes the migration command. func (m *MigrateVHDCommand) Run(ctx context.Context) error { + if !config.Get().System.UseVirtualDisks { + return errors.New("cannot migrate to vhd: configuration file \"system.use_virtual_disks\" value is set to \"false\"") + } for _, s := range m.manager.All() { s.Log().Debug("starting migration of server contents to virtual disk...")