[pve-devel] [PATCH qemu-server] implement is_shared_only check

Dietmar Maurer dietmar at proxmox.com
Fri Dec 2 06:30:51 CET 2016


>  
> +sub is_shared_only {
> +    my ($class, $conf, $scfg) = @_;
> +
> +    my $issharedonly = 1;
> +    PVE::QemuServer::foreach_drive($conf, sub {
> +	my ($ds, $drive) = @_;
> +
> +	# exit early
> +	return if !$issharedonly;
> +
> +	return if $drive->{file} eq 'none'; # cdrom with no file
> +	my $sid = PVE::Storage::parse_volume_id($drive->{file});

I guess this does not work for absolute paths (e.g. /dev/sda5)

> +	my $storage = PVE::Storage::storage_config($scfg, $sid);




More information about the pve-devel mailing list