mirror of
				https://git.proxmox.com/git/qemu-server
				synced 2025-11-04 09:40:34 +00:00 
			
		
		
		
	template_create : check has_feature template
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
		
							parent
							
								
									8b43bc11db
								
							
						
					
					
						commit
						a6f0e83b93
					
				@ -4433,9 +4433,6 @@ sub template_create {
 | 
			
		||||
    my $storecfg = PVE::Storage::config();
 | 
			
		||||
    my $i = 0;
 | 
			
		||||
 | 
			
		||||
    # First check if all disks have feature 'clone'.
 | 
			
		||||
    # Note: there is no feature 'create_base', but we can safely assume
 | 
			
		||||
    # that a storage with feature 'clone' can create base images.
 | 
			
		||||
    foreach_drive($conf, sub {
 | 
			
		||||
	my ($ds, $drive) = @_;
 | 
			
		||||
 | 
			
		||||
@ -4444,7 +4441,7 @@ sub template_create {
 | 
			
		||||
 | 
			
		||||
	my $volid = $drive->{file};
 | 
			
		||||
	die "volume '$volid' does not support template/clone\n" 
 | 
			
		||||
	    if !PVE::Storage::volume_has_feature($storecfg, 'clone', $volid);
 | 
			
		||||
	    if !PVE::Storage::volume_has_feature($storecfg, 'template', $volid);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    foreach_drive($conf, sub {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user