Don't allow the migration command to be executed if not enabled currently
This commit is contained in:
parent
dfe5a77e0a
commit
a6a610fd82
|
@ -47,6 +47,9 @@ func newMigrateVHDCommand() *cobra.Command {
|
||||||
|
|
||||||
// Run executes the migration command.
|
// Run executes the migration command.
|
||||||
func (m *MigrateVHDCommand) Run(ctx context.Context) error {
|
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() {
|
for _, s := range m.manager.All() {
|
||||||
s.Log().Debug("starting migration of server contents to virtual disk...")
|
s.Log().Debug("starting migration of server contents to virtual disk...")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user