mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CA-353748: VM imported as an XVA won't start automatically.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
e3e73c8a0a
commit
858ab54950
@ -96,29 +96,12 @@ namespace XenAdmin.Actions
|
||||
#endregion
|
||||
}
|
||||
|
||||
private string GetVmRef(string result)
|
||||
{
|
||||
if (string.IsNullOrEmpty(result))
|
||||
return null;
|
||||
|
||||
string head = "<value><array><data><value>";
|
||||
string tail = "</value></data></array></value>";
|
||||
|
||||
if (!result.StartsWith(head) || !result.EndsWith(tail))
|
||||
return null;
|
||||
|
||||
int start = head.Length;
|
||||
int length = result.IndexOf(tail) - start;
|
||||
|
||||
return result.Substring(start, length);
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
SafeToExit = false;
|
||||
bool isTemplate;
|
||||
|
||||
string vmRef = GetVmRef(applyFile());
|
||||
string vmRef = applyFile();
|
||||
if (string.IsNullOrEmpty(vmRef))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user