[pve-devel] [PATCH] Add support for Citrix Hypervisor blockdev.

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Mar 6 15:05:20 CET 2019


On 3/6/19 2:35 PM, Wolfgang Link wrote:
> Citrix Hypervisor use as blockdev path /dev/xvd<[a-z]><\d>
> It makes sense for Proxmox Mail Gateway to run on Citrix Hypervisor.
> 
> Citrix Hypervisor recent XenServer.
> ---
>  proxinstall | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/proxinstall b/proxinstall
> index f2414db..f0cc731 100755
> --- a/proxinstall
> +++ b/proxinstall
> @@ -691,7 +691,7 @@ sub get_partition_dev {
>  
>      if ($dev =~ m|^/dev/sd([a-h]?[a-z]\|i[a-v])$|) {
>  	return "${dev}$partnum";
> -    } elsif ($dev =~ m|^/dev/[hxev]d[a-z]$|) {
> +    } elsif ($dev =~ m|^/dev/[hxev]x?d[a-z]$|) {

Are you sure that it's, for example, /dev/xvda0 ? Or is your commit message wrong?
because your regex does not matches that, as you have 'x?' instead of 'v?'...

A safe and easy way would be adding another if branch with just:
|^/dev/xvd[a-z]\d$|

>  	return "${dev}$partnum";
>      } elsif ($dev =~ m|^/dev/[^/]+/c\d+d\d+$|) {
>  	return "${dev}p$partnum";
> 





More information about the pve-devel mailing list