[SOLVED] How to move root disk of container to another storage?

Alibek

Well-Known Member
Jan 13, 2017
102
15
58
45
Summary:
I have container with root disk stored on storage 'local':



I want to move the root disk to another storage: local -> my-other-storage

How to do this?
Why this action I can't make by WebUI?
When this action will be can make by WebUI?
 
e.g. by backup/restore
 
to expand a bit: such a feature (like the "move disk" we have for VMs) is planned for containers (and a WIP patch set exists), but it will only work offline.
 
Hello,
When i click on the button "Volume action / Move storage", I cannot select other nodes in the cluster!
How to migrate containers to other nodes (into their local storages)?
Even offline this is not possible! Why?
 
it's only possible as part of a migration by passing --target-storage
 
Hello,
When i click on the button "Volume action / Move storage", I cannot select other nodes in the cluster!
How to migrate containers to other nodes (into their local storages)?
Even offline this is not possible! Why?
If you could move it to the local storage of another node then you would 'rip apart' the VM, since at that point the VM is on one node and its hard disk on another.

As fabian has said, you need to migrate the VM to another node. In the migration prompt you can choose the new storage to which the disks should be moved to.
 
OK, but the problem is that I have containers, not VMs.
Another problem is that when i try to migrate container, it gives me errors and does NOT migrate:
ERROR: migration aborted (duration 00:00:00): storage 'ssdpool2' is not available on node 'proxmox1'
 
please give the full migrate command and log output, the storage.cfg and the container config
 
it's only possible as part of a migration by passing --target-storage
Hello, I cannot find this option in GUI dialogs. Is it only in CLI?
Your documentation lacks examples.
For example, in
https://pve.proxmox.com/wiki/Linux_Container#pct_migration
i see
# pct migrate <ctid> <target>
Well, ctid i can guess, it must be the name of the container as shown in GUI.
But what is the target? How it should be specified without syntax errors?
It would be nice also to have this (target storage) key explained in the documentation.
Thanks
 
yes, target storage for containers is CLI only at the moment (it's a recent addition). the parameters are described in the man page and/or help output:

Code:
$ pct help migrate
USAGE: pct migrate <vmid> <target> [OPTIONS]

  Migrate the container to another node. Creates a new migration task.

  <vmid>     <integer> (1 - N)

             The (unique) ID of the VM.

  <target>   <string>

             Target node.

  -bwlimit   <number> (0 - N)   (default=migrate limit from datacenter or
             storage config)

             Override I/O bandwidth limit (in KiB/s).

  -online    <boolean>

             Use online/live migration.

  -restart   <boolean>

             Use restart migration

  -target-storage <string>

             Mapping from source to target storages. Providing only a
             single storage ID maps all source storages to that storage.
             Providing the special value '1' will map each source storage
             to itself.

  -timeout   <integer>   (default=180)

             Timeout in seconds for shutdown for restart migration

the mapping works like this: SOURCE_STORAGE:TARGET_STORAGE,ANOTHER_SOURCE_STORAGE:ANOTHER_TARGET_STORAGE,DEFAULT_TARGET_STORAGE, you don't need provide both a default and explicit mappings though ;)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!