[SOLVED] LXC Enter Command

matthew

Renowned Member
Jul 28, 2011
210
5
83
With openvz you could do:

vzctl enter 101

Then you could manage that container. How do you accomplish that with LXC?
 
Last edited:
Is there a list of common lxc commands and syntax?

Type:

lxc --> TAB TAB
lxc-attach lxc-checkconfig lxc-config lxc-destroy lxc-freeze lxc-ls lxc-start lxc-unfreeze lxc-wait
lxc-autostart lxc-checkpoint lxc-console lxc-device lxcfs lxc-monitor lxc-stop lxc-unshare
lxc-cgroup lxc-clone lxc-create lxc-execute lxc-info lxc-snapshot lxc-top lxc-usernsexec

man XXX

but use "pct" instead of

Best Reards
 
sorry, but I have question about lxc.
How can I set restrict to iops and network devices in lxc?
 
When an LXC container is stopped can we use pct enter <VMID> to perform say a "wget ...." since lxc does not have a real mounted state? If not, is there a way to navigate into a stopped lxc container and if not, will there ever be one made for it?

A wiki page on the limitations of LXC as available in Proxmox currently would be useful for end users to make the choice to migrate from OpenVZ.

In Proxmox v4.0, what is the way to allow OpenVZ containers to exist in native mode without migration? If not, how is OpenVZ installed in Proxmox v4.0 to allow it to co-exist with LXC?

There is a HOWTO on installing and using Proxmox v4 on Jessie.
Is there a similar one for using Proxmox v3.4 that will allow for continued use of OpenVZ after wheezy's EOL.

Are there any issues in using the HOWTO for a Wheezy Install for installing Proxmox v3.4 on Jessie?
 
Last edited:
I have some problem, to shutdown VM:
root@up-page-h1:~# pct stop 207
VM is locked (backup)

How can I kill this VM?
 
I have some problem on lxc.
I made backup every day at 03:00. Backup normaly take around ~40 minuts, but now on some VM he still progress ~5h later and crash some VM. How can I fix it?

Mode is: Snapshot
Compression: Gzip

INFO: sent 1,067,231 bytes received 4,118 bytes 714,232.67 bytes/sec
INFO: total size is 1,332,472,411 speedup is 1,243.73
INFO: final sync finished (1 seconds)
INFO: resume vm
INFO: vm is online again after 1 seconds
INFO: creating archive '/home/storage/dump/vzdump-lxc-203-2016_02_03-03_03_31.tar.gz'
INFO: Total bytes written: 1403514880 (1.4GiB, 25MiB/s)
INFO: archive file size: 545MB
INFO: delete old backup '/home/storage/dump/vzdump-lxc-203-2016_01_13-03_03_16.tar.gz'
INFO: Finished Backup of VM 203 (00:01:45)
INFO: Starting Backup of VM 208 (lxc)
INFO: status = running
INFO: mode failure - some volumes does not support snapshots
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend
INFO: ionice priority: 7
INFO: starting first sync /proc/4842/root// to /home/storage/dump/vzdump-lxc-208-2016_02_03-03_05_16.tmp
INFO: Number of files: 45,401 (reg: 35,127, dir: 3,239, link: 6,999, dev: 2, special: 34)
INFO: Number of created files: 45,400 (reg: 35,127, dir: 3,238, link: 6,999, dev: 2, special: 34)
INFO: Number of deleted files: 0
INFO: Number of regular files transferred: 35,117
INFO: Total file size: 1,486,035,110 bytes
INFO: Total transferred file size: 1,481,019,846 bytes
INFO: Literal data: 1,481,020,293 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 1,769,277
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 1,484,134,891
INFO: Total bytes received: 708,623
INFO: sent 1,484,134,891 bytes received 708,623 bytes 17,782,557.05 bytes/sec
INFO: total size is 1,486,035,110 speedup is 1.00
INFO: first sync finished (83 seconds)
INFO: suspend vm


... and still progress going...
I killed process, unlock VM, restart and VM work, but the backup isn't done other VM.

Where I can find more log? Where can be problem?
 
Note that you are not using snapshot mode, because your storage does not support snapshots:

Code:
INFO: mode failure - some volumes does not support snapshots
INFO: trying 'suspend' mode instead

It seems you are affected by the issue described in https://forum.proxmox.com/threads/lxc-backup-randomly-hangs-at-suspend.25345
If you could provide information about the processes running in the container when this issue occurs, as well as the container's full config and the output of pveversion -v it might be possible to find the cause...
 
  • Like
Reactions: soban

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!