]> git.proxmox.com Git - pve-container.git/log
pve-container.git
9 years agomountpoint_mount: disallow symlinks in bind mounts
Wolfgang Bumiller [Thu, 17 Sep 2015 11:06:59 +0000 (13:06 +0200)]
mountpoint_mount: disallow symlinks in bind mounts

symlinks in mount paths can cause security issues
assume the following setup:
mp1: local:X,mp=/disk2
mp2: /mnt/shared,mp=/shared
Now the container boots and executes this sequence:
ct:# ln -s /var/lib/lxc/$VMID/etc /disk2/shared
ct:# umount /disk2
ct:# ln -s /mnt /disk2
ct:# umount /shared
ct:# rmdir /shared
ct:# ln -s /etc /shared
ct:# poweroff
Now the owner waits for a stop-mode backup of the container
to be created:
mp1 will be mounted to the host's /mnt because the
container's /disk2 is a symlink to /mnt.
mp2 will now access the replaced /mnt/shared, which is a
symlink to the container's /etc, and mount that over the
container's /shared, which is a symlink to the host's /etc.
Now until the backup is finished the container's owner could
log into the host via ssh using his container's user
credentials.

We'll also unshare the mount namespace when performing such
backups, but it's still a bad idea to allow symlinks
modifying mount container paths.

9 years agouse sanitize_mountpoint in foreach_mountpoint
Wolfgang Bumiller [Thu, 17 Sep 2015 11:06:58 +0000 (13:06 +0200)]
use sanitize_mountpoint in foreach_mountpoint

This is for consistency as well as it's a minor security
improvement.

If the source is a path we also want to sanitize it in order
to not get broken behavior when using paths like
/dev/../something etc.

9 years agolxc: use new disk option names in permission check
Wolfgang Bumiller [Thu, 17 Sep 2015 11:06:57 +0000 (13:06 +0200)]
lxc: use new disk option names in permission check

made check_ct_modify_config_perm check VM.Config.Disk for
'rootfs' and 'mp\d+' instead of the old 'disk' option.

9 years agofix previous commit (s/snapshot/suspend/)
Dietmar Maurer [Thu, 17 Sep 2015 09:59:06 +0000 (11:59 +0200)]
fix previous commit (s/snapshot/suspend/)

9 years agorsync cleanup
Wolfgang Bumiller [Wed, 16 Sep 2015 14:42:04 +0000 (16:42 +0200)]
rsync cleanup

It's only one command now, renamed $base to $rsync.

9 years agovzdump: suspend mode fixes
Wolfgang Bumiller [Wed, 16 Sep 2015 14:42:03 +0000 (16:42 +0200)]
vzdump: suspend mode fixes

-) '-x' is '--one-file-system' (the longer version is easier
to spot.)
-) Use --relative's special handling of `/./` in paths in
order to make --one-file-system and --exclude options work
together the way they should.

Here's the issue:
Say you have thse files in your container:
  /the-file
  /mp0/the-file
And assume /mp0 is a mountpoint.
Naturally you want `-exclude-path /the-file` to only exclude
the first of the two files. This is hard when rsyncing each
mountpoint separately, as the rsync command for mp0 would
see files relative to /mp0, and thus both files would be
excluded unless we modify exclude paths accordingly - which
we can't as they can be arbitrary glob patterns.
Now with rsync's --relative option - assume the container is
mounted at /temp (iow: /temp/ and /temp/mp0). Passing
/temp/mp0/ to rsync would copy the contents of the mp0
mountpoint into the root directory of the destination
(essentially doing the equivalent of `mv mp0/* /` in the
container's backup.). However, rsync's special treatment of
/./ with the --relative option allows us to pass
/temp/./mp0/ which tells rsync that `/mp0` is supposed to be
included in the path, iow. we're actually copying from
/temp/, but we want only its mp0/ directory.
See rsync(1)'s section about --relative for a detailed
description.

9 years agocleanup
Wolfgang Bumiller [Wed, 16 Sep 2015 14:42:02 +0000 (16:42 +0200)]
cleanup

9 years agovzdump: don't unmount filesystems with -mode suspend
Dietmar Maurer [Thu, 17 Sep 2015 06:10:43 +0000 (08:10 +0200)]
vzdump: don't unmount filesystems with -mode suspend

9 years agodrop mkdirs flag on mount_all
Wolfgang Bumiller [Wed, 16 Sep 2015 09:12:52 +0000 (11:12 +0200)]
drop mkdirs flag on mount_all

It was only used in update_pct_config and isn't required
as mountpoint_mount already creates the directory anyway.

9 years agobump version to 0.9-21
Dietmar Maurer [Wed, 16 Sep 2015 09:42:55 +0000 (11:42 +0200)]
bump version to 0.9-21

9 years agovzdump: use the new run_command variant
Wolfgang Bumiller [Tue, 15 Sep 2015 08:07:22 +0000 (10:07 +0200)]
vzdump: use the new run_command variant

Use the array-of-array version of run_command to build the
pipe, this should deal with most quoting issues.
Note that tar handles glob patterns in --exclude itself, so
quoting patterns instead of letting the shell resolve them
is also actually more correct.

9 years agovzdump: lxc find/mp update 2: archive
Wolfgang Bumiller [Tue, 15 Sep 2015 08:07:21 +0000 (10:07 +0200)]
vzdump: lxc find/mp update 2: archive

To void at least some weird quoting issues, and since tar
has a --one-file-system option, always skips sockets and
also supports exclusion by pattern we now simply use tar
directly instead of passing files listed by 'find'.

9 years agovzdump: lxc find/mp update 1: rsync
Wolfgang Bumiller [Tue, 15 Sep 2015 08:07:20 +0000 (10:07 +0200)]
vzdump: lxc find/mp update 1: rsync

change rsync_vm to use the new exclude pattern method and
deal with mountpoints

9 years agovzdump: replace diskinfo with disks array
Wolfgang Bumiller [Tue, 15 Sep 2015 08:07:19 +0000 (10:07 +0200)]
vzdump: replace diskinfo with disks array

replace the diskinfo data coming only from the rootfs with
a disks array and sanitize mountpoints

9 years agocleanup
Wolfgang Bumiller [Tue, 15 Sep 2015 08:07:18 +0000 (10:07 +0200)]
cleanup

-) whitespace fixup
-) remember storecfg hash value in a variable

9 years agorename some $mountpoint vars to $rootdir
Wolfgang Bumiller [Tue, 15 Sep 2015 08:07:17 +0000 (10:07 +0200)]
rename some $mountpoint vars to $rootdir

disambiguate the two terms

9 years agobump version to 0.9-20
Dietmar Maurer [Mon, 14 Sep 2015 07:30:22 +0000 (09:30 +0200)]
bump version to 0.9-20

9 years agofix bug #712: fix stop mode backups when container is running
Dietmar Maurer [Mon, 14 Sep 2015 07:26:48 +0000 (09:26 +0200)]
fix bug #712: fix stop mode backups when container is running

9 years agoadd support for LVM
Dietmar Maurer [Fri, 11 Sep 2015 10:43:05 +0000 (12:43 +0200)]
add support for LVM

9 years agoadd changelog
Dietmar Maurer [Fri, 11 Sep 2015 09:49:18 +0000 (11:49 +0200)]
add changelog

9 years agomountpoint_mount: return info if mount uses loop device
Dietmar Maurer [Fri, 11 Sep 2015 09:44:56 +0000 (11:44 +0200)]
mountpoint_mount: return info if mount uses loop device

This simplifies code inside update_lxc_config().

9 years agovzdump: remove debug statement
Dietmar Maurer [Fri, 11 Sep 2015 08:32:23 +0000 (10:32 +0200)]
vzdump: remove debug statement

9 years agobump version to 4.0-19
Dietmar Maurer [Fri, 11 Sep 2015 07:19:33 +0000 (09:19 +0200)]
bump version to 4.0-19

9 years agoallow older debian versions (>= 4 (etch))
Dietmar Maurer [Fri, 11 Sep 2015 07:17:20 +0000 (09:17 +0200)]
allow older debian versions (>= 4 (etch))

9 years agoupdate changelog
Dietmar Maurer [Thu, 10 Sep 2015 09:16:38 +0000 (11:16 +0200)]
update changelog

9 years agoformat_disk: call activate_volume()
Dietmar Maurer [Thu, 10 Sep 2015 09:14:45 +0000 (11:14 +0200)]
format_disk: call activate_volume()

9 years agobump version to 0.9-18
Dietmar Maurer [Thu, 10 Sep 2015 08:14:03 +0000 (10:14 +0200)]
bump version to 0.9-18

9 years agocleanup mp size parameter (add units, same code as QemuServer)
Dietmar Maurer [Thu, 10 Sep 2015 08:03:46 +0000 (10:03 +0200)]
cleanup mp size parameter (add units, same code as QemuServer)

9 years agobump version to 0.9-17
Dietmar Maurer [Thu, 10 Sep 2015 05:05:06 +0000 (07:05 +0200)]
bump version to 0.9-17

9 years agomount_all: make sure rootfs exists
Dietmar Maurer [Thu, 10 Sep 2015 05:02:19 +0000 (07:02 +0200)]
mount_all: make sure rootfs exists

9 years agoavoid warning about undefined value
Dietmar Maurer [Thu, 10 Sep 2015 04:54:42 +0000 (06:54 +0200)]
avoid warning about undefined value

9 years agobump version to 0.9-16
Dietmar Maurer [Wed, 9 Sep 2015 15:23:24 +0000 (17:23 +0200)]
bump version to 0.9-16

9 years agoDon't die in vm_shutdown when we have no errors
Emmanuel Kasper [Wed, 9 Sep 2015 13:41:00 +0000 (15:41 +0200)]
Don't die in vm_shutdown when we have no errors

This fixes bugzilla entry: https://bugzilla.proxmox.com/show_bug.cgi?id=707

9 years agoCT protection mode added
Alen Grizonic [Thu, 3 Sep 2015 14:59:29 +0000 (16:59 +0200)]
CT protection mode added

9 years agobump version to 0.9-15
Dietmar Maurer [Tue, 8 Sep 2015 05:29:01 +0000 (07:29 +0200)]
bump version to 0.9-15

9 years agoresize: add bash completion support
Dietmar Maurer [Mon, 7 Sep 2015 14:57:38 +0000 (16:57 +0200)]
resize: add bash completion support

9 years agosupport resizing of owned container disks
Wolfgang Bumiller [Mon, 7 Sep 2015 11:40:59 +0000 (13:40 +0200)]
support resizing of owned container disks

9 years agofix block device access
Wolfgang Bumiller [Mon, 7 Sep 2015 11:40:58 +0000 (13:40 +0200)]
fix block device access

-) The condition was apparently to ignore /dev/ paths while
   that's actually what it was supposed to handle... (other
   paths aren't devices...).
-) Get rid of the blockdevices_list heuristics, it doesn't
   work reliably for all types of devices.
-) Check whether a device is a block device via S_ISBLK on
   the device file.
-) Don't try to follow symlinks as the name we provide in
   the mp config is the name we want in the container.
-) Blacklisted loop devices as they pose a security risk.

9 years agoget rid of most of the loop-devices code
Wolfgang Bumiller [Mon, 7 Sep 2015 11:40:57 +0000 (13:40 +0200)]
get rid of most of the loop-devices code

-) loop devices are now attached in mountpoint_mount, and
immediately detached in order to set the auto-clear flag

Keeping track of loop-devices is otherweise next to
impossible and a security concern.
We mount the filesystems for the container. We do not
support full loop device access for containers for a simple
reason: once a container detached a loop device, the
startup of another container might reuse it, exposing its
devices to the first container, generating unwatned cross
container access permissions.

Loop devices are also set to auto-clear, so that we do not
need to worry about detaching them when stopping the
container.

9 years agofix unlock handling after migration.
Wolfgang Link [Fri, 4 Sep 2015 10:01:08 +0000 (12:01 +0200)]
fix unlock handling after migration.

this will handle if the migration was successful or not.
this is important, because this determines where the config is.

9 years agotry to generate files atomic (all or nothing)
Dietmar Maurer [Mon, 7 Sep 2015 05:34:47 +0000 (07:34 +0200)]
try to generate files atomic (all or nothing)

9 years agouse complete_migration_target from PVE::Cluster
Dietmar Maurer [Mon, 7 Sep 2015 05:31:28 +0000 (07:31 +0200)]
use complete_migration_target from PVE::Cluster

9 years agoadd the capability to unlock a Container if it is locked
Wolfgang Link [Fri, 4 Sep 2015 09:57:45 +0000 (11:57 +0200)]
add the capability to unlock a Container if it is locked

9 years agocheck is mounted before try to unmount disk.
Wolfgang Link [Fri, 4 Sep 2015 12:29:13 +0000 (14:29 +0200)]
check is mounted before try to unmount disk.

this is neccessay because otherwise when a storage is not mounted, like when it is offline, the migration crash.

9 years agocreate_disk: correctly pass nomp parameter to print_ct_mountpoint
Dietmar Maurer [Sat, 5 Sep 2015 09:20:33 +0000 (11:20 +0200)]
create_disk: correctly pass nomp parameter to  print_ct_mountpoint

9 years agopct exec: fix bash completion
Dietmar Maurer [Sat, 5 Sep 2015 09:14:23 +0000 (11:14 +0200)]
pct exec: fix bash completion

9 years agomove create_disks to PVE::LXC to avoid cyclic dependency
Dietmar Maurer [Sat, 5 Sep 2015 09:08:38 +0000 (11:08 +0200)]
move create_disks to PVE::LXC to avoid cyclic dependency

9 years agoadd support to add mountpoints with pct set
Wolfgang Bumiller [Thu, 3 Sep 2015 13:45:52 +0000 (15:45 +0200)]
add support to add mountpoints with pct set

made create_disk non-private
made print_ct_mountpoint include 'mp=' unless 'nomp' is set
added an mkdirs flag to mount_all
create mount directories for now mountpoints simply by
  calling mount_all followed by umount_all

9 years agocreate_rootfs: revert previous change and always call umount_all
Dietmar Maurer [Sat, 5 Sep 2015 08:47:30 +0000 (10:47 +0200)]
create_rootfs: revert previous change and always call umount_all

Because we also want to unmount mounts which do not use loop devices,
for example bind mounts, subvols, /dev/xyz, ...

9 years agocleanup coding style
Dietmar Maurer [Sat, 5 Sep 2015 08:44:13 +0000 (10:44 +0200)]
cleanup coding style

9 years agoformat_disk: cleanups, never try to format subvolumes
Dietmar Maurer [Sat, 5 Sep 2015 08:39:27 +0000 (10:39 +0200)]
format_disk: cleanups, never try to format subvolumes

9 years agofix coding style
Dietmar Maurer [Sat, 5 Sep 2015 08:35:10 +0000 (10:35 +0200)]
fix coding style

9 years agodisk formatting and mounting changed
Wolfgang Bumiller [Thu, 3 Sep 2015 13:45:51 +0000 (15:45 +0200)]
disk formatting and mounting changed

-) format disks after vdisk_alloc instead of in mount_all
-) make mount_all return the loop device list so it can be
   passed to umount_all optionally
-) umount_all takes an optional loopdevs list to avoid
   listing loopdevs when not necessary

9 years agouse run_cli instead of run (name changed in pve-common)
Dietmar Maurer [Fri, 4 Sep 2015 09:14:24 +0000 (11:14 +0200)]
use run_cli instead of run (name changed in pve-common)

9 years agouse PVE::Cluster::complete_next_vmid
Dietmar Maurer [Fri, 4 Sep 2015 07:15:07 +0000 (09:15 +0200)]
use PVE::Cluster::complete_next_vmid

9 years agoauto-generate bash completion config
Dietmar Maurer [Fri, 4 Sep 2015 04:20:15 +0000 (06:20 +0200)]
auto-generate bash completion config

9 years agopct: use separate class for CLIHandler (src/PVE/CLI/pct.pm)
Dietmar Maurer [Thu, 3 Sep 2015 17:03:02 +0000 (19:03 +0200)]
pct: use separate class for CLIHandler (src/PVE/CLI/pct.pm)

do not generate pod files for lxc hooks

9 years agoadded pct exec
Wolfgang Bumiller [Tue, 1 Sep 2015 07:16:49 +0000 (09:16 +0200)]
added pct exec

Using the new 'extra-args' options for command arguments.

Examples:
 # pct exec 100 ls /
 # pct exec 100 -- ls -l /

9 years agoConvert to disksize to GB after reading the config file
Emmanuel Kasper [Wed, 2 Sep 2015 14:18:00 +0000 (16:18 +0200)]
Convert to disksize to GB after reading the config file

This fixes a bug when calling pct restore a vzdump backup:
we store the rootfs size in KB, but create_disks expects that a GB parameter.
So the restore was failing trying to create something of a Petabyte image.

Formatting '/var/lib/vz/images/110/vm-110-disk-1.raw', fmt=raw size=4503599627370496
unable to create image: qemu-img: /var/lib/vz/images/110/vm-110-disk-1.raw: The image size is too large for file format 'raw'

9 years agoEnhance pct man page with DESCRIPTION, EXAMPLES, FILES, SEE ALSO sections
Emmanuel Kasper [Tue, 1 Sep 2015 11:35:05 +0000 (13:35 +0200)]
Enhance pct man page with DESCRIPTION, EXAMPLES, FILES, SEE ALSO sections

9 years agotypo fixup: dettach -> detach
Dietmar Maurer [Thu, 3 Sep 2015 09:44:14 +0000 (11:44 +0200)]
typo fixup: dettach -> detach

9 years agoadd missing archlinux ostype confdesc enum entry
Wolfgang Bumiller [Wed, 2 Sep 2015 06:36:38 +0000 (08:36 +0200)]
add missing archlinux ostype confdesc enum entry

9 years agofix some warnings shown during 'make dinstall'
Wolfgang Bumiller [Wed, 2 Sep 2015 06:10:46 +0000 (08:10 +0200)]
fix some warnings shown during 'make dinstall'

9 years agodestroy owned mountpoints on pct destroy
Wolfgang Bumiller [Tue, 1 Sep 2015 14:33:54 +0000 (16:33 +0200)]
destroy owned mountpoints on pct destroy

9 years agolxc-stop fails when 'kill' and 'timeout' options are used together
Thomas Lamprecht [Wed, 2 Sep 2015 12:54:07 +0000 (14:54 +0200)]
lxc-stop fails when 'kill' and 'timeout' options are used together

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 years agoadd bash completion support
Dietmar Maurer [Wed, 2 Sep 2015 13:27:43 +0000 (15:27 +0200)]
add bash completion support

9 years agouse multiple mount protection (mmp)
Dietmar Maurer [Tue, 1 Sep 2015 11:01:41 +0000 (13:01 +0200)]
use multiple mount protection (mmp)

9 years agonormalize mount path
Dietmar Maurer [Tue, 1 Sep 2015 10:06:06 +0000 (12:06 +0200)]
normalize mount path

9 years agomount_all: unly call umount on error
Dietmar Maurer [Tue, 1 Sep 2015 10:04:50 +0000 (12:04 +0200)]
mount_all: unly call umount on error

9 years agofixed call for cfg file and error when CT is running and on local storage
Thomas Lamprecht [Tue, 1 Sep 2015 07:59:55 +0000 (09:59 +0200)]
fixed call for cfg file and error when CT is running and on local storage

When trying to migrate only throw an error when the CT is on an non
shared storage AND running.
Also fixed an remaining PVE::OpenVZ call to LXC.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 years agoRemoving dead code from CT stop call and fixing typo
Thomas Lamprecht [Tue, 1 Sep 2015 07:59:54 +0000 (09:59 +0200)]
Removing dead code from CT stop call and fixing typo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 years agocreate_rootfs: correctly deactivate volumes (fix previous commit)
Dietmar Maurer [Tue, 1 Sep 2015 06:16:05 +0000 (08:16 +0200)]
create_rootfs: correctly deactivate volumes (fix previous commit)

9 years agoumount_all: fix previous commit
Dietmar Maurer [Tue, 1 Sep 2015 06:12:10 +0000 (08:12 +0200)]
umount_all: fix previous commit

9 years agoadd offline migration code
Dietmar Maurer [Tue, 1 Sep 2015 06:08:06 +0000 (08:08 +0200)]
add offline migration code

9 years agoskip lxc hooks on non-PVE containers
Wolfgang Bumiller [Mon, 31 Aug 2015 14:21:41 +0000 (16:21 +0200)]
skip lxc hooks on non-PVE containers

Our containers all only have a number as name. If any other
character appears in a container name, skip our hooks in
order to allow lxc to be used manually without interference
from PVE.

9 years agouse loop device for all 'raw' formated disks on directory based storage
Dietmar Maurer [Mon, 31 Aug 2015 14:42:34 +0000 (16:42 +0200)]
use loop device for all 'raw' formated disks on directory based storage

9 years agolxc detect error message changed
Alen Grizonic [Mon, 31 Aug 2015 13:37:47 +0000 (15:37 +0200)]
lxc detect error message changed

9 years agounderscore is a valid lxc config key character
Wolfgang Bumiller [Mon, 31 Aug 2015 13:03:25 +0000 (15:03 +0200)]
underscore is a valid lxc config key character

9 years agoimplement mount_all/umount_all
Dietmar Maurer [Mon, 31 Aug 2015 13:59:55 +0000 (15:59 +0200)]
implement mount_all/umount_all

9 years agoparse_ct_mountpoint: allow to parse "--rootfs 0"
Dietmar Maurer [Mon, 31 Aug 2015 04:16:11 +0000 (06:16 +0200)]
parse_ct_mountpoint: allow to parse "--rootfs 0"

9 years agocleanup error message
Dietmar Maurer [Fri, 28 Aug 2015 16:18:44 +0000 (18:18 +0200)]
cleanup error message

9 years agoHA resources check before destroying lxc
Alen Grizonic [Fri, 28 Aug 2015 13:18:52 +0000 (15:18 +0200)]
HA resources check before destroying lxc

9 years agobump version to 0.9-14
Dietmar Maurer [Fri, 28 Aug 2015 09:47:53 +0000 (11:47 +0200)]
bump version to 0.9-14

9 years agorun spiceterm and return spiceproxy config only if CT is running
Thomas Lamprecht [Thu, 27 Aug 2015 14:42:44 +0000 (16:42 +0200)]
run spiceterm and return spiceproxy config only if CT is running

This mirrors the behavior of qemu VMs, if the container is not
running, return an error when trying to launch the spiceproxy
API call.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 years agovzdump: correctly implement snapshot backup
Dietmar Maurer [Fri, 28 Aug 2015 08:00:01 +0000 (10:00 +0200)]
vzdump: correctly implement snapshot backup

use normal snapshot code to generate snapshots.

9 years agomerge volid_path into mountpount_mount
Dietmar Maurer [Fri, 28 Aug 2015 06:35:19 +0000 (08:35 +0200)]
merge volid_path into mountpount_mount

It is easier to handle special cases like zfs subvol mounts this way.
Also pass snapshot names to enable mounting of snapshots (required
by vzdump)

9 years agolock_aquire: fix reference counting and lock name
Dietmar Maurer [Thu, 27 Aug 2015 12:02:11 +0000 (14:02 +0200)]
lock_aquire: fix reference counting and lock name

9 years agovzdump: use correct pid to access container root
Dietmar Maurer [Thu, 27 Aug 2015 08:32:32 +0000 (10:32 +0200)]
vzdump: use correct pid to access container root

9 years agohas_feature: skip further tests if we already detected an error
Dietmar Maurer [Thu, 27 Aug 2015 08:10:02 +0000 (10:10 +0200)]
has_feature: skip further tests if we already detected an error

9 years agohas_feature: check all mountpoints
Dietmar Maurer [Thu, 27 Aug 2015 08:05:59 +0000 (10:05 +0200)]
has_feature: check all mountpoints

9 years agocleanup: remove useless PVE::LXC prefix
Dietmar Maurer [Thu, 27 Aug 2015 07:07:39 +0000 (09:07 +0200)]
cleanup: remove useless PVE::LXC prefix

9 years agocreate_rootfs: force rootfs mp to '/'
Dietmar Maurer [Thu, 27 Aug 2015 06:58:43 +0000 (08:58 +0200)]
create_rootfs: force rootfs mp to '/'

9 years agorestore: do not restore mpX, arch and ostype options from previous config
Dietmar Maurer [Thu, 27 Aug 2015 06:54:48 +0000 (08:54 +0200)]
restore: do not restore mpX, arch and ostype options from previous config

9 years agocreate_disks: removed default_storage parameter
Dietmar Maurer [Thu, 27 Aug 2015 06:48:32 +0000 (08:48 +0200)]
create_disks: removed default_storage parameter

9 years agocreate: do not pass mointpoints to update_pct_config, simplify restore logic
Dietmar Maurer [Thu, 27 Aug 2015 06:24:50 +0000 (08:24 +0200)]
create: do not pass mointpoints to update_pct_config, simplify restore logic

9 years agocreate_disks: correctly protect code with eval
Dietmar Maurer [Thu, 27 Aug 2015 05:20:23 +0000 (07:20 +0200)]
create_disks: correctly protect code with eval

The previous code simply ignores errors.

9 years agovm_create : add support for mountpoints
Alexandre Derumier [Mon, 24 Aug 2015 13:01:16 +0000 (15:01 +0200)]
vm_create : add support for mountpoints

rename alloc_roofs with create_disks,
to handle multiple disks.

$size param is removed, and must be provide like for qemuserver:

example:
pct create vmid template -rootfs local:5 -mp0 local:10

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
9 years agoCorrect package name in sub update_ipconfig()
Emmanuel Kasper [Wed, 26 Aug 2015 14:12:57 +0000 (16:12 +0200)]
Correct package name in sub update_ipconfig()

9 years agoallow to load configs from CTs located on other nodes
Thomas Lamprecht [Wed, 26 Aug 2015 13:36:28 +0000 (15:36 +0200)]
allow to load configs from CTs located on other nodes

This allows load_config to load also configs from LXC container
which arent't located on the same node.

This is needed to fix the bug that doesn't let view the noVNC
console from an CT located on another node, whereas viewing it on
the same node as the container is located works fine.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 years agoremove tests for /dev/xxx and use get_vm_volumes
Alexandre Derumier [Mon, 24 Aug 2015 08:13:21 +0000 (10:13 +0200)]
remove tests for /dev/xxx and use get_vm_volumes

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>