There were times when "HasUpgradeSupportInManagementAgent" was needed, but not anymore, so this commit is changing code to use only VirtualisationStatus.MANAGEMENT_INSTALLED again.
VM.IsWindows will try to use guest_metrics referenced by the last_booted_record when the guest_metrics on the VM is not available.
This gives some extra chance to detect a Non-Windows VM.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This changeset implements the followings:
On creation of a new VM,
* XenCenter will use licensed state of the host to determine whether it should obey/apply the template-recommendation regarding the vendor device.
* If the host is licensed, and the selected template's recommendations suggest that has_vendor_device can be set/should be set to true, as part of VM creation, XenCenter will set the vm's has_vendor_device based on the recommendation using set_has_vendor_device API call (after it has cloned the template and before calling vm.provision).
* XenCenter will not expose details whether 1G or 2G VM is going to be created.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
VM.IsWindows flag is getting clever
As this property is used on the General tab and on the SSH Console, HVM Linux VMs with the viridian flag turned on will no longer be treated as Windows VMs (as long as they have the Linux Guest Agent running)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Revert "Merge pull request #708 from GaborApatiNagy/master_windows_update"
This reverts commit fe03f1382f, reversing
changes made to 423065a2c8.
Conflicts:
XenAdminTests/TabsAndMenus/MainMenuGeorge.cs
Implementing Upgrading VMs to Windows Update
New screen features:
-Create skeleton of the Upgrade VM dialog
-Implement a Go To Console link (just a link that opens a vm console)
-Implement logic to show the right status for a VM (includes rules to
get the states). Includes updating the dialog whenever the status changes.
-Add status texts to Messages, proper text on the UI
-Add stub methods to VM class in XenAPI-Extensions to r/w states from
Guest Agent
-UI: Implement rules what vms to display, checkbox rules, read only vms,
and when to enable the Upgrade button
-Implement Upgrade button (writes state for GA, mounts ISO) + maximum
parallel executions/actions
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Moving GetVirtualisationWarningMessages back to VM
Also added EVACUATE_HOST_INSTALL_MGMNT_PROMPT what is shown on the EvacuateHostDialog when a 'new' VM is given and Management Agent can be installed
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Removed PV_DRIVERS_NOT_INSTALLED=0 from the VirtualisationStatus [Flags]enum - 0 will mean the same (to avoid bugs with enum.HasFlag(0) is always true)
Extracted common code to VMLifeCycleCommand.GetCantExecuteNoToolsOrDriversReasonCore() method (instead of defining overridden GetCantExecuteReasonCore() method at this level, because not all child classes need this...)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Removed Optimized state and using I/O & Management instead (even for old VMs)
Changed messages to be different for old and new VMs instead of saying Tools or I/O drivers for instance
Removed the extra enum property from the VM class that had been added for search
Fixed code in GroupingTypes class (possible KeyNotFoundException)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Extended the enum, aimed for minimal changes, also using Flags on the enum now
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Returns true if this VM is Windows.
Ignore PV guests, then check if viridian platform property is set.
This is based on the assumption that the viridian flag is always true for a windows VM.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- modified the VMCopyCommand to launch a cross pool copy if permitted
- added the CrossPoolCopyVMCommand which opens the Cross pool migration wizard in "copy" mode
- modified the cross pool migrate action with an extra "copy" parameter, which will add a copy option to the vm.migrate_send function call
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- With these changes, a stopped or suspended VM can be moved across pools; this is performed as a vm migrate operation.
- The intra pool move will continue to be a vdi.copy + destroy operation for stopped VMs, but for suspended VMs we need to do it a as vm migrate operation.
- We use the Cross Pool migrate wizard for both intra and cross pool move operations, but introduced a wizard mode parameter in order to adapt the wizard to the specific operation we want to perform (migrate, move or copy)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- Show a “Read Caching” section on the General Tab of a VM when the VM is running on a Cream or greater host
- When the Read Caching is enabled, the “Read Caching” section will contain two entries: Status and Disks (list of disks with RC enabled)
- When the Read Caching is disabled, the “Read Caching” section will contain two entries: Status and Reason
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- The cloud config parameters page is only visible on a VM that already has a config drive.
- The cloud config parameters can only be changed when the VM is halted.
- In the New VM wizard, if a template is selected that already has a config drive, them the wizard will display the existing configuration, not the default one.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- A VM can have vGPU if it is HVM and the the allow-vgpu restriction is absent or is non-zero
- allow-vgpu is 0 for HVM Linux VMs
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
New Page: Enlightenment on VM Properties Dialog, visible only for:
- VMs on Cream Or Greater hosts
- that can be enlightened, regardless of their power state
A VM can be enlightened if the key "xscontainer-monitor" exists in other_config.
A VM is enlightened if other_config:xscontainer-monitor if true.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
1.Add xapi version check in cream since Cream and Creedence have the same platform version
2.Check feature-ts2 to see if turn on RDP feature can use on specific VM PV tool
Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
Changes following code review:
- Added VM.CanHaveVGpu function (at the moment just returns CanHaveGpu, but it will change in the future)
- Added vGPU_type.IsPassthrough function and used it everywhere we needed to test for passthrough (max-heads==0)
- Simplified code in Helpers.GpuCapability, Helpers.VGpuCapability, NewVMWizard (gpuCapability), MainWindow and GpuRow
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
New properties:
- Pool.HasGpu = Pool has at least one PGPU
- Pool.HasVGpu = Pool has at least one PGPU that HasVGpu
- PGPU.HasVGpu = PGPU has at least one supported_VGPU_type that is not pass-through
New or modified helper functions:
- Helpers.GpuCapability = GPU feature not restricted (by licensing) and Pool.HasGpu
- Helpers.VGpuCapability = vGPU feature not restricted (by licensing) and Pool.HasVGpu
- Helpers.ClearwaterSp1OrGreater = API version is 2.1 or greater
The GPU dialogs are displayed as follows:
- GPU page on VM properties dialog: Visible only if VM.CanHaveGpu and the GPU feature not restricted (by licensing)
- GPU page on New VM Wizard: Visible only if VM.CanHaveGpu and the pool has GPU capability (Helpers.GpuCapability)
- GPU page on Pool properties dialog: Visible only if the pool has vGPU capability (Helpers.VGpuCapability)
- GPU tab: Visible only if the pool has GPU capability (Helpers.GpuCapability) and is Clearwater SP1 or greater
- On the GPU tab, the "Placement policy" panel: Visible only if the pool has vGPU capability (Helpers.VGpuCapability)
- On the GPU tab, the "Edit" button on the "vGPU types" panel: Visible only if the PGPU.HasVGpu and vGPU feature not restricted (by licensing)
Also:
- VM.CanHaveVGpu function renamed to CanHaveGpu
- On the GPU tab, renamed "Allowed vGPU types" to "vGPU types
Instead of showing just the name, this code is showing name with location information in title for all objects that appear in the tree view.
(A new property (NameWithLocation) with a getter accessor defined in IXenObject and has been implemented as virtual in XenObject and overridden at several child classes.)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>