<?xml version="1.0"?>
<rss version="2.0"><channel><title>XenServer SDK Latest Topics</title><link>https://community.citrix.com/forums/forum/1118-xenserver-sdk/</link><description>XenServer SDK Latest Topics</description><language>en</language><item><title>Test post</title><link>https://community.citrix.com/forums/topic/253340-test-post/</link><description><![CDATA[<p>
	test
</p>
]]></description><guid isPermaLink="false">253340</guid><pubDate>Thu, 17 Oct 2024 15:44:38 +0000</pubDate></item><item><title>Change VIFs MAC address with XenServer Powershell</title><link>https://community.citrix.com/forums/topic/253101-change-vifs-mac-address-with-xenserver-powershell/</link><description><![CDATA[<p>
	Hello,
</p>

<p>
	I would like to know how to change the VIFs MAC addresses using XenServer Powershell.
</p>

<p>
	I've tried to use the following:
</p>

<p>
	$vm_ref=Get-XenVM -Name $VMname | Select-Object -ExpandProperty opaque_ref<br />
	New-XenVIF -VM $vm_ref -Network $NETADP -MAC “XX:XX:XX:XX:XX:XX” -Device 0
</p>

<p>
	But it didn't work.
</p>

<p>
	Any ideas.
</p>

<p>
	Thanks!
</p>
]]></description><guid isPermaLink="false">253101</guid><pubDate>Tue, 23 Jul 2024 12:12:04 +0000</pubDate></item><item><title>HVMBootParam</title><link>https://community.citrix.com/forums/topic/252832-hvmbootparam/</link><description><![CDATA[<p>
	Hi Everyone
</p>

<p>
	I would like to change the boot order and the CPU usage alart on 400+ machines.
</p>

<p>
	I'm here, that this should work, but it does not work. What is the command what is actually working?
</p>

<p>
	==================================
</p>

<p>
	$HVMBootParams = @{<br />
	    "firmware," = "uefi"<br />
	    "order," = "n"<br />
	}
</p>

<p>
	<br />
	set-xenvm -name "%VMNAME%" -HVMBootParams $HVMBootParams
</p>

<p>
	==================================
</p>

<p>
	 
</p>

<p>
	I already tried so many different combinations, but so far nothing is working.
</p>

<p>
	Could anyone tell me how to run this?
</p>

<p>
	 
</p>

<p>
	thank you
</p>
]]></description><guid isPermaLink="false">252832</guid><pubDate>Mon, 15 Apr 2024 12:45:46 +0000</pubDate></item><item><title>Extend VM disk on Citrix Hypervisor using powershell</title><link>https://community.citrix.com/forums/topic/250322-extend-vm-disk-on-citrix-hypervisor-using-powershell/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	I'm trying to extend to extend a disk of a VM using the Hypervisor 8.2 powershell SDK. I can't seem to find a way.
</p>

<p>
	 
</p>

<p>
	I have set up a connection and read the VM I want to edit the disk of.
</p>

<p>
	 
</p>

<p>
	$VMs = get-xenvm  | where {$_.name_label.StartsWith("VMName")}
</p>

<p>
	<br>
	foreach($VM in $VMs){
</p>

<p>
	    $VBDrefs = $VM.VBDs<br>
	     <br>
	    foreach($VBDref in $VBDrefs){<br>
	        $VBD = Get-XenVBD -Ref $VBDref<br>
	        $VDI = Get-XenVDI -Ref $VBD.VDI<br>
	        <br>
	        if($VDI.name_label -eq $VM.name_label + " 0"){ <br>
	           <br>
	           $VirtualSize = ($GB * 120)<br>
	           $VirtualSize
</p>

<p>
	           Set-XenVDI -VDI $VDI .... --&gt; there is no option to set the new size of the disk here<br>
	 <br>
	           <br>
	        }
</p>

<p>
	    }
</p>

<p>
	}
</p>
]]></description><guid isPermaLink="false">250322</guid><pubDate>Mon, 21 Nov 2022 16:43:25 +0000</pubDate></item><item><title>PowerShell get vms hosted on a particular pool member</title><link>https://community.citrix.com/forums/topic/251317-powershell-get-vms-hosted-on-a-particular-pool-member/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	is there a way in Powershell SDK to find VMs belonging to a particular pool member? (the affinity to a homeserver)
</p>

<p>
	 
</p>

<p>
	#this returns all VMs from the whole pool:
</p>

<p>
	$vms = get-xenvm | Where-Object {$_.is_a_template -ne "False" -and $_.is_control_domain -ne "False"}
</p>

<p>
	 
</p>

<p>
	How do I return the name of the xenserver pool member the VM actually belongs to... or just filter the list by a pool member name? 
</p>

<p>
	 
</p>

<p>
	Any help is very much appreciated.
</p>

<p>
	 
</p>

<p>
	Stefan
</p>
]]></description><guid isPermaLink="false">251317</guid><pubDate>Thu, 27 Apr 2023 14:40:38 +0000</pubDate></item><item><title>Want to unmount / disconnect a disk from a guest via powershell</title><link>https://community.citrix.com/forums/topic/252589-want-to-unmount-disconnect-a-disk-from-a-guest-via-powershell/</link><description><![CDATA[<p>
	Want to unmount / disconnect a disk from a guest via powershell
</p>

<p>
	remove-vdi deletes it ... how to just remove it ?  
</p>

<p>
	 
</p>

<p>
	using Citrix hypervisor 8.2
</p>
]]></description><guid isPermaLink="false">252589</guid><pubDate>Fri, 02 Feb 2024 01:54:11 +0000</pubDate></item><item><title>how to designate new pool master via powershell</title><link>https://community.citrix.com/forums/topic/252500-how-to-designate-new-pool-master-via-powershell/</link><description><![CDATA[<p>
	I want to designate a new pool master for my xenserver pool via powershell.
</p>

<p>
	I'm using the powershell cmdlet from citrix.
</p>

<p>
	The command I want to use is:
</p>

<p>
	 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">$Xenserver = POOLMASTER
Connect-XenServer -url $("http://"+ $Xenserver) -Creds $creds -SetDefaultSession
$pool = Get-XenPool
Invoke-XenPool -pool $pool -XenAction DesignateNewMaster</span></pre>

<p>
	 
</p>

<p>
	My understanding is that there is another parameter missing that sets the new pool master, but there is no other useful parameter.
</p>

<p>
	Has anyone done this before and can help here?
</p>
]]></description><guid isPermaLink="false">252500</guid><pubDate>Mon, 15 Jan 2024 14:26:17 +0000</pubDate></item><item><title>A XenServer Documentation Script is Now Available</title><link>https://community.citrix.com/forums/topic/251934-a-xenserver-documentation-script-is-now-available/</link><description><![CDATA[<p>
	I never thought I would see this day, but it has arrived. @John Billekens - GUEST and I are proud to release the XenServer documentation script. With the help of Michael B. Smith, @Guy Leech - GUEST, and the XenServer team, V1.00 is now available.
</p>

<p>
	 
</p>

<p>
	No documentation script is ever 100% complete, but with the great help from the XenServer team and the excellent work and coding skills of John Billekens, what I thought would take over a year we accomplished in two months.
</p>

<p>
	 
</p>

<p>
	There is a LOT of data in the V1 output, but there is more to come as John figures out how to add the missing pieces and parts.
</p>

<p>
	 
</p>

<p>
	Please give the script a try and let us know what you think.
</p>

<p>
	 
</p>

<p>
	<a href="https://www.carlwebster.com/downloads/download-info/citrix-xenserver/" rel="external nofollow">https://www.carlwebster.com/downloads/download-info/citrix-xenserver/</a>
</p>
]]></description><guid isPermaLink="false">251934</guid><pubDate>Mon, 04 Sep 2023 15:49:22 +0000</pubDate></item><item><title>Invoke-XenVM-XenAction MigrateSend</title><link>https://community.citrix.com/forums/topic/247744-invoke-xenvm-xenaction-migratesend/</link><description><![CDATA[<p>
	Using PowerShell Commands to CrossPool Migrate VMs
</p>

<p>
	        Invoke-XenVM -VM $vm -XenAction MigrateSend -Live $true -Dest $dest -VifMap $vifmap -VdiMap $vdimap -Options @null -VgpuMap @null -SessionOpaqueRef $session1.opaque_ref -verbose -Async -PassThru 
</p>

<p>
	Whenever the migration is complete, the VM is rebooted with unexpected error 
</p>

<p>
	 
</p>

<p>
	If Use XenCenter migration going  without reboot
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">247744</guid><pubDate>Tue, 21 Dec 2021 12:35:48 +0000</pubDate></item><item><title>Move a VM from one host to another using powershell</title><link>https://community.citrix.com/forums/topic/245520-move-a-vm-from-one-host-to-another-using-powershell/</link><description><![CDATA[<p>
	Hi all,
</p>

<p>
	 
</p>

<p>
	I'm trying to figure out how to move a VM from one host to another with local storage using powershell.
</p>

<p>
	It looks like I need to use invoke-xenvm -xenaction migratesend -name VMNAME -dest @{}
</p>

<p>
	 
</p>

<p>
	The -dest parameter is what I am unable to figure out at this moment. What items are required in this hashtable and how does the formatting look like. 
</p>

<p>
	I am assuming that the destination HOST and SR are required but I am unable to figure it out.
</p>

<p>
	Anyone that can help me out on this?
</p>

<p>
	 
</p>

<p>
	Best regards!
</p>]]></description><guid isPermaLink="false">245520</guid><pubDate>Thu, 01 Apr 2021 13:51:10 +0000</pubDate></item><item><title>Citrix Hypervisor PowerShell cmdlets online help</title><link>https://community.citrix.com/forums/topic/247548-citrix-hypervisor-powershell-cmdlets-online-help/</link><description><![CDATA[<p>
	Hello,
</p>

<p>
	 
</p>

<p>
	Currently all our Citrix Infrastructure and VDA servers run on VMware Hypervisor Technology. My company wants to look at Citrix Hypervisor in an attempt to save money.
</p>

<p>
	 
</p>

<p>
	We have built a POC and now wants to create a PowerShell script so that we can provision new Citrix VDA Images using Microsoft MDT.  (I have done this previously for VMware)
</p>

<p>
	 
</p>

<p>
	Where can I find decent PowerShell cmdlet documentation?  The Get-Help does not tell you much and the other links provided by the existing links are not really as useful as I hoped.
</p>

<p>
	Or should I just use the examples, but then, I have questions and it will be nice to understand some of the details.
</p>

<p>
	 
</p>

<p>
	Thank you in advance.
</p>

<p>
	 
</p>

<p>
	Martin 
</p>]]></description><guid isPermaLink="false">247548</guid><pubDate>Fri, 26 Nov 2021 17:48:09 +0000</pubDate></item><item><title>XenServer - Boot Mode: UEFI Boot - for machines created with Powershell API</title><link>https://community.citrix.com/forums/topic/247424-xenserver-boot-mode-uefi-boot-for-machines-created-with-powershell-api/</link><description><![CDATA[<p>
	Hi !
</p>

<p>
	Went through the forum, and did not stumble upon any detail which will reveal how to be succesfull with creating a VM using the XenServerPSModule where the Boot Options for the VM is UEFI Boot.
</p>

<p>
	There are no problems creating such VM's with GUI, but I'm looking for the way to get the same result with automated way...
</p>

<p>
	The UEFI VM's which are created with GUI works.
</p>

<p>
	 
</p>

<p>
	Stumbled upon those two repos, which are very helpful to get some understanding about the API itself:
</p>

<p>
	<a href="https://github.com/xapi-project/xen-api-sdk/blob/master/powershell/autogen/samples/AutomatedTestCore.ps1" rel="external nofollow">https://github.com/xapi-project/xen-api-sdk/blob/master/powershell/autogen/samples/AutomatedTestCore.ps1</a>
</p>

<p>
	<a href="https://github.com/ZachThurmond/Automated-XenServer-Labs/blob/master/AXL.ps1#L229" rel="external nofollow">https://github.com/ZachThurmond/Automated-XenServer-Labs/blob/master/AXL.ps1</a>
</p>

<p>
	but both of them uses the BIOS way...
</p>

<p>
	 
</p>

<p>
	If someone can assist me I would be a great help !
</p>

<p>
	$ObjSourceTemplate = Get-XenVM -Name 'Windows 10 (64-bit)'
</p>

<p>
	 
</p>

<p>
	$VMName = 'w10TestUEFI'<br>
	$VMRAM = 4*1GB<br>
	$VMCPU = 4
</p>

<p>
	 
</p>

<p>
	New-XenVM -NameLabel $VMName `<br>
	          -MemoryTarget $VMRAM `<br>
	          -MemoryStaticMax $VMRAM `<br>
	          -MemoryDynamicMax $VMRAM `<br>
	          -MemoryDynamicMin $VMRAM `<br>
	          -MemoryStaticMin $VMRAM `<br>
	          -VCPUsMax $VMCPU `<br>
	          -VCPUsAtStartup $VMCPU `<br>
	          -HVMBootPolicy "BIOS order" `<br>
	          -HVMBootParams @{ order = "dc" } `<br>
	          -HVMShadowMultiplier 1 `<br>
	          -UserVersion 1 `<br>
	          -ActionsAfterReboot restart `<br>
	          -ActionsAfterCrash restart `<br>
	          -ReferenceLabel $ObjSourceTemplate.reference_label `<br>
	          -HardwarePlatformVersion 2 `<br>
	          -Platform @{ "cores-per-socket" = "$VMCPU"; hpet = "true"; pae = "true"; vga = "std"; nx = "true"; viridian_time_ref_count = "true"; apic = "true"; viridian_reference_tsc = "true"; viridian = "true"; acpi = "1" } `<br>
	          -OtherConfig @{ base_template_name = $ObjSourceTemplate.reference_label }
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="46004" href="//media.invisioncic.com/m329563/monthly_2021_11/1704736677_2021-11-1420_13_17-Window.png.83b2ec3bc124605a4ca823117b0fc243.png" rel=""><img alt="2021-11-14 20_13_17-Window.png" class="ipsImage ipsImage_thumbnailed" data-fileid="46004" width="400" src="//media.invisioncic.com/m329563/monthly_2021_11/1582483148_2021-11-1420_13_17-Window.thumb.png.5e1abdc3697848e284f33773ebaaba08.png" loading="lazy" height="268"></a>
</p>

<p>
	 
</p>

<p>
	looks like that within the console it can be achieved this way:<br>
	xe vm-list name-label=test<br>
	xe vm-param-set uuid=[UUID] HVM-boot-params:firmware=uefi<br>
	xe vm-param-set uuid=[UUID] platform:secureboot=false
</p>

<p>
	but how to achieve the same with PS from the SD
</p>]]></description><guid isPermaLink="false">247424</guid><pubDate>Sun, 14 Nov 2021 19:14:50 +0000</pubDate></item><item><title>Mounting ISO in VM issue : invoke-XenVBD -XenAction Insert</title><link>https://community.citrix.com/forums/topic/214766-mounting-iso-in-vm-issue-invoke-xenvbd-xenaction-insert/</link><description><![CDATA[
<p>Hi everyone, </p>
<p> </p>
<p>I'm working on a powershell script that required to be able to unmount or mount some ISO in a particular VM.</p>
<p> </p>
<p>No prob for the "unmounting" part with invoke-xenvbd -XenAction Eject but i'm not able to mount an ISO with the same command but with the XenAction Insert.</p>
<p> </p>
<p>Here is my code sample :</p>
<p> </p>
<p>$Master = Get-XenVM -Name $($XD_Master.Xen_MasterName)</p>
<p> </p>
<p>$ISO_library = get-XenSR | Where-Object {($_.type -eq 'iso') -and $_.name_label -notmatch 'XenServer Tools'}</p>
<p> </p>
<p>$CD = ForEach ($ISO in $ISO_Library.VDIs) {Get-XenVDI -Ref $ISO.opaque_ref | Where-Object {$_.name_label -eq 'FinalisationVDI.iso'}}</p>
<p> </p>
<p>$VBD = $Master.VBDs | Get-XenVBD | where {($_.Type -eq 'CD')}</p>
<p> </p>
<p>I try this command to mount the ISO but it fails...</p>
<p> </p>
<p>Invoke-XenVBD -Uuid $VBD.uuid -XenAction Insert $CD.uuid</p>
<p> </p>
<p>Any help please ?</p>
<p> </p>
<p> </p>
]]></description><guid isPermaLink="false">214766</guid><pubDate>Mon, 29 Aug 2016 10:32:38 +0000</pubDate></item><item><title>Could not receive information about quantity of physical processor cores from Xenserver host</title><link>https://community.citrix.com/forums/topic/245936-could-not-receive-information-about-quantity-of-physical-processor-cores-from-xenserver-host/</link><description><![CDATA[<p>
	We have encountered a problem, that we cannot receive information about quantity of physical processor cores from Xenserver host. We have tried two different C# libraries <a href="https://www.nuget.org/packages/CitrixXenServer70SDK/" rel="external nofollow">https://www.nuget.org/packages/CitrixXenServer70SDK/</a> and SDK 8.2 from <a href="https://www.citrix.com/downloads/citrix-hypervisor/," rel="external nofollow">https://www.citrix.com/downloads/citrix-hypervisor/,</a> but the result was the same. 
</p>

<p>
	The command host.get_cpu_info returns the following response:<br>
	{<br>
	    "result": {<br>
	        "cpu_count": "32",<br>
	        "socket_count": "2",<br>
	        "vendor": "GenuineIntel",<br>
	        "speed": "2000.018",<br>
	        "modelname": "Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz",<br>
	        "family": "6",<br>
	        "model": "45",<br>
	        "stepping": "7",<br>
	        "flags": "fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi mmx fxsr sse sse2 ht syscall nx lm constant_tsc arch_perfmon rep_good nopl nonstop_tsc eagerfpu pni pclmulqdq monitor est ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat epb pln pts dtherm xsaveopt",<br>
	        "features": "1fbee3ff-bfebfbff-00000001-2c100800",<br>
	        "features_pv": "17c9cbf5-96b82203-2191cbf5-00000003-00000001-00000000-00000000-00000000-00001000-8c000000-00000000-00000000-00000000-00000000",<br>
	        "features_hvm": "17cbfbff-97ba2223-2d93fbff-00000003-00000001-00000000-00000000-00000000-00001000-9c000000-00000000-00000000-00000000-00000000"<br>
	    },<br>
	    "error": null,<br>
	    "id": 0<br>
	}<br>
	But our host has 2 sockets with 8 cores per socket and 2 threads per core, so we get quantity of logical processor cores in "cpu_count" field. 
</p>

<p>
	The command host.get_cpu_configuration returns empty JSON:<br>
	{"result": {}, "error": null, "id": 0}
</p>

<p>
	We would like to know, if there is a possibility to get quantity of physical processor cores through API? Can we force host.get_cpu_configuration to send us information about threads per core? Can we execute shell command (xl info/lscpu) and get output without connecting via SSH?<br>
	Version of our XenServer is XenServer 7.1 CU1 (LTSR).
</p>]]></description><guid isPermaLink="false">245936</guid><pubDate>Thu, 20 May 2021 15:02:28 +0000</pubDate></item><item><title>Mass Change XenServer Host DNS</title><link>https://community.citrix.com/forums/topic/245642-mass-change-xenserver-host-dns/</link><description><![CDATA[<p>
	I'm looking for a way to do a mass change for each host's dns servers? Anyone know if this is even possible? Haven't had much luck googling around. Just need a better way then manually going one by one to each host.
</p>

<p>
	Thanks.
</p>]]></description><guid isPermaLink="false">245642</guid><pubDate>Fri, 16 Apr 2021 15:35:48 +0000</pubDate></item><item><title>Could not retrieve "CPU utilisatiion" by Citrix XenServer Management API</title><link>https://community.citrix.com/forums/topic/244447-could-not-retrieve-cpu-utilisatiion-by-citrix-xenserver-management-api/</link><description><![CDATA[<p>
	Citrix support staff let me raise question here for asking  Citrix experts and developers' help. I try to describe my problem clearly, thanks in advance.
</p>

<p>
	 
</p>

<p>
	I used the <strong><em>com.xensource.xenapi.HostCpu</em></strong>  which is from<strong> Citrix XenServer Management API</strong> (xenserver-6.0.0.jar) to get XenServer 7.1Cu2 env's CPU related information such as the vendor of the physical CPU(HostCPU.vendor), the speed of the physical CPU(HostCPU.speed) , the model name of the physical CPU(HostCPU.modelname) and also including the current CPU utilisation(HostCPU.utilisation). Most attributes can get the correct values in the following JAVA code, but for CPU utilisation, it's always null.
</p>

<p>
	And I also find many attributes related to memory used/total size , net work in/out throughput etc. could not get the correct values. 
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	A piece of my JAVA code:
</p>

<p>
	-----------------------------------------------------
</p>

<p>
	……
</p>

<p>
	import com.xensource.xenapi.HostCpu;
</p>

<p>
	……
</p>

<p>
	public IAttributeGroupRecord mapRecord(HostCpu.Record record, Connection connection) throws Types.XenAPIException, XmlRpcException {
</p>

<p>
	  ……
</p>

<p>
	   attributeGroupRecord.add(str(record.model));
</p>

<p>
	   attributeGroupRecord.add(str(record.modelname));
</p>

<p>
	   attributeGroupRecord.add(str(record.speed));
</p>

<p>
	   attributeGroupRecord.add(str(record.stepping));
</p>

<p>
	   attributeGroupRecord.add(str(MessageFormat.format("{0,number,###.##}", record.utilisation), (record.utilisation != null) ));
</p>

<p>
	   attributeGroupRecord.add(str(record.vendor));
</p>

<p>
	   ……
</p>

<p>
	   return attributeGroupRecord;
</p>

<p>
	 }
</p>

<p>
	---------------------------------------------------
</p>

<p>
	My env information are:
</p>

<p>
	XenServer version : 7.1 Cu2
</p>

<p>
	XenServer JAVA SDK : xenserver-6.0.0-1.jar along with xmlrpc-client-3.1.3.jar and xmlrpc-common-3.1.3.jar
</p>

<p>
	 
</p>

<p>
	Thanks
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	 
</p>]]></description><guid isPermaLink="false">244447</guid><pubDate>Wed, 16 Dec 2020 06:54:45 +0000</pubDate></item><item><title>How to download Citirx hypervisor root CA certificate?</title><link>https://community.citrix.com/forums/topic/244142-how-to-download-citirx-hypervisor-root-ca-certificate/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	What is the equivalent method on Citirx hypervisor for this operation?
</p>

<p>
	<a href="https://kb.vmware.com/s/article/2108294?lang=en_us" rel="external nofollow">https://kb.vmware.com/s/article/2108294?lang=en_us</a><br>
	How to download and install vCenter Server root certificates to avoid Web Browser certificate warnings (2108294)
</p>

<p>
	 
</p>

<p>
	xe host-get-server-certificate and host-server-certificate-install deal with getting and changing dom0 Web Server certificates.<br>
	Instead, I want self-signed default Citirx hypervisor certificate intact and make XenAPI clients accept the certificate.<br>
	For this, I need to import the CA certificate which generated the server certificate onto clients.<br>
	 
</p>

<p>
	Where on Citrix dom0 filesystem CA certificate is located and how to extract and feed one onto XenAPI clients?
</p>

<p>
	 
</p>

<p>
	Thanks in advance,
</p>

<p>
	Motohiro Kanda
</p>]]></description><guid isPermaLink="false">244142</guid><pubDate>Fri, 20 Nov 2020 05:52:31 +0000</pubDate></item><item><title>Retrieve Guest VM Network Information From XenServer 6.5 with Powershell</title><link>https://community.citrix.com/forums/topic/215463-retrieve-guest-vm-network-information-from-xenserver-65-with-powershell/</link><description><![CDATA[
<p>Greetings,</p>
<p> </p>
<p>I just want to leave this script here that maybe help others. Recently we have to retrieve all the NIC MAC Address from all our guest VM and their guest OS IP. To solve this tedious task I write this simple code that could evolve in something more robust if someone tweak the code.</p>
<p> </p>
<p>As is the code retrieve the following from the VM:</p>
<ol><li>VM UUID</li>	<li>VM Name</li>	<li>VM Description</li>	<li># of CPU</li>	<li>Memory in Bytes</li>	<li>VM Power State</li>	<li>Is Template</li>	<li>NIC ID (The number of the NIC device)</li>	<li>Network Name (Attached to the NIC)</li>	<li>NIC MAC Address</li>	<li>NIC VLAN (From the Network Attached)</li>	<li>NIC IP (From the Guest OS)</li>
</ol><p>I run this code on multiple XenServer 6.5 &amp; 6.0 using the XenServer 6.5 SDK without issues. The only thing that I notice is that on XS6.0 the VLAN data can not be read. Also the XenTools must be installed to retrieve the OS IP address. </p>
<p> </p>
<p>Any suggestions would be appreciated. </p>
<p><strong>-----------Script Start------------------</strong></p>
<p> </p>
<p><span style="color:rgb(0,102,221);">Import-Module</span> <span style="color:rgb(204,85,85);">XenServerPSModule</span><br><span style="color:rgb(0,95,210);">Connect-XenServer</span> <span style="color:rgb(71,119,102);">-Url</span> <span style="color:rgb(204,85,85);"><a href="https://10.20.10.xx" rel="external nofollow">https://10.20.10.xx</a></span> <span style="color:rgb(71,119,102);">-UserName</span> <span style="color:rgb(204,85,85);">serveruser</span> <span style="color:rgb(71,119,102);">-Password</span> <span style="color:rgb(204,85,85);">serverpassword</span><br>$vms <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">get-xenvm</span> <span style="color:rgb(187,121,119);font-weight:bold;">|</span> <span style="color:rgb(0,102,221);">Where-Object</span> <span style="color:rgb(128,128,48);">{</span><span style="color:rgb(0,121,151);">$_</span><span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">is_a_template</span> <span style="color:rgb(68,170,221);">-ne</span> <span style="color:rgb(128,0,0);">"</span><span style="color:rgb(204,85,85);">False</span><span style="color:rgb(128,0,0);">"</span> <span style="color:rgb(68,170,221);">-and</span> <span style="color:rgb(0,121,151);">$_</span><span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">is_control_domain</span> <span style="color:rgb(68,170,221);">-ne</span> <span style="color:rgb(128,0,0);">"</span><span style="color:rgb(204,85,85);">False</span><span style="color:rgb(128,0,0);">"</span><span style="color:rgb(128,128,48);">}</span> <span style="color:rgb(185,105,105);">#get all vms</span><br><br><span style="color:rgb(80,128,80);font-weight:bold;">function</span> <span style="color:rgb(0,95,210);">New-XenVMInfo</span><br><span style="color:rgb(128,128,48);">{</span><br><span style="color:rgb(0,102,221);">New-Object</span> <span style="color:rgb(204,85,85);">PSObject</span> <span style="color:rgb(71,119,102);">-Property</span> <span style="color:rgb(128,128,48);">@{</span><br><span style="color:rgb(71,119,102);">Name</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">UUID</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">CPUCount</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">Description</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">IsTemplate</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">MemoryStaticMax</span> <span style="color:rgb(68,170,221);">=</span><span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">PowerState</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">NICID</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">NICNetworkName</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">NICMAC</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">NICVLAN</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(71,119,102);">NICIP</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(128,0,0);">'</span><br><span style="color:rgb(128,128,48);">}</span><br><br><span style="color:rgb(128,128,48);">}</span><br><br>$xenVMs <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,128,48);">@(</span><span style="color:rgb(128,128,48);">)</span><br><br><br><span style="color:rgb(80,128,80);font-weight:bold;">foreach</span> <span style="color:rgb(128,128,48);">(</span>$vm <span style="color:rgb(80,128,80);font-weight:bold;">in</span> $vms<span style="color:rgb(128,128,48);">)</span><span style="color:rgb(128,128,48);">{</span><br>$gm <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenVMProperty</span> <span style="color:rgb(71,119,102);">-VM</span> $vm <span style="color:rgb(71,119,102);">-XenProperty</span> <span style="color:rgb(204,85,85);">GuestMetrics</span><br><span style="color:rgb(80,128,80);font-weight:bold;">if</span> <span style="color:rgb(128,128,48);">(</span>$vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VIFs</span><span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Count</span> <span style="color:rgb(68,170,221);">-gt</span> <span style="color:rgb(119,140,119);">1</span><span style="color:rgb(128,128,48);">)</span><br><span style="color:rgb(128,128,48);">{</span><br><span style="color:rgb(80,128,80);font-weight:bold;">for</span> <span style="color:rgb(128,128,48);">(</span>$i<span style="color:rgb(68,170,221);">=</span><span style="color:rgb(119,140,119);">0</span><span style="color:rgb(68,170,221);">;</span> $i <span style="color:rgb(68,170,221);">-lt</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VIFs</span><span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Count</span><span style="color:rgb(68,170,221);">;</span>$i<span style="color:rgb(68,170,221);">++</span><span style="color:rgb(128,128,48);">)</span><br><span style="color:rgb(128,128,48);">{</span><br>$xenVM <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">New-XenVMInfo</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Name</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_label</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">PowerState</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">power_state</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">UUID</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">uuid</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Description</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_description</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">IsTemplate</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">is_a_template</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">MemoryStaticMax</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">memory_static_max</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">CPUCount</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">vcpus_max</span><br>$vif <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenVIF</span> <span style="color:rgb(71,119,102);">-Ref</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VIFs</span><span style="color:rgb(128,128,48);">[</span>$i<span style="color:rgb(128,128,48);">]</span><br>$net <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenNetwork</span> <span style="color:rgb(71,119,102);">-Ref</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">network</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICNetworkName</span> <span style="color:rgb(68,170,221);">=</span> $net<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_label</span><br>$pif <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenPIF</span> <span style="color:rgb(71,119,102);">-Ref</span> $net<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">PIFs</span><span style="color:rgb(128,128,48);">[</span><span style="color:rgb(119,140,119);">0</span><span style="color:rgb(128,128,48);">]</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICVLAN</span> <span style="color:rgb(68,170,221);">=</span> $pif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VLAN</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICMAC</span> <span style="color:rgb(68,170,221);">=</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">MAC</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICID</span> <span style="color:rgb(68,170,221);">=</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">device</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICIP</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,128,48);">(</span>$gm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">networks</span><span style="color:rgb(128,128,48);">)</span><span style="color:rgb(128,128,48);">[</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">device</span> <span style="color:rgb(68,170,221);">+</span> <span style="color:rgb(128,0,0);">"</span><span style="color:rgb(204,85,85);">/ip</span><span style="color:rgb(128,0,0);">"</span><span style="color:rgb(128,128,48);">]</span><br>$xenVMs <span style="color:rgb(68,170,221);">+=</span> $xenVM<br><span style="color:rgb(128,128,48);">}</span><br><span style="color:rgb(128,128,48);">}</span><br><span style="color:rgb(80,128,80);font-weight:bold;">elseif</span> <span style="color:rgb(128,128,48);">(</span>$vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VIFs</span><span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Count</span> <span style="color:rgb(68,170,221);">-eq</span> <span style="color:rgb(119,140,119);">1</span><span style="color:rgb(128,128,48);">)</span><br><span style="color:rgb(128,128,48);">{</span><br><br>$xenVM <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">New-XenVMInfo</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Name</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_label</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">PowerState</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">power_state</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">UUID</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">uuid</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Description</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_description</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">IsTemplate</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">is_a_template</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">MemoryStaticMax</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">memory_static_max</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">CPUCount</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">vcpus_max</span><br>$vif <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenVIF</span> <span style="color:rgb(71,119,102);">-Ref</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VIFs</span><span style="color:rgb(128,128,48);">[</span><span style="color:rgb(119,140,119);">0</span><span style="color:rgb(128,128,48);">]</span><br>$net <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenNetwork</span> <span style="color:rgb(71,119,102);">-Ref</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">network</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICNetworkName</span> <span style="color:rgb(68,170,221);">=</span> $net<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_label</span><br>$pif <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">Get-XenPIF</span> <span style="color:rgb(71,119,102);">-Ref</span> $net<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">PIFs</span><span style="color:rgb(128,128,48);">[</span><span style="color:rgb(119,140,119);">0</span><span style="color:rgb(128,128,48);">]</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICVLAN</span> <span style="color:rgb(68,170,221);">=</span> $pif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">VLAN</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICMAC</span> <span style="color:rgb(68,170,221);">=</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">MAC</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICID</span> <span style="color:rgb(68,170,221);">=</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">device</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICIP</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,128,48);">(</span>$gm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">networks</span><span style="color:rgb(128,128,48);">)</span><span style="color:rgb(128,128,48);">[</span> $vif<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">device</span> <span style="color:rgb(68,170,221);">+</span> <span style="color:rgb(128,0,0);">"</span><span style="color:rgb(204,85,85);">/ip</span><span style="color:rgb(128,0,0);">"</span><span style="color:rgb(128,128,48);">]</span><br>$xenVMs <span style="color:rgb(68,170,221);">+=</span> $xenVM<br><br><span style="color:rgb(128,128,48);">}</span><br><span style="color:rgb(80,128,80);font-weight:bold;">else</span><br><span style="color:rgb(128,128,48);">{</span><br>$xenVM <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(0,95,210);">New-XenVMInfo</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Name</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_label</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">PowerState</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">power_state</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">UUID</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">uuid</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">Description</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">name_description</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">IsTemplate</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">is_a_template</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">MemoryStaticMax</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">memory_static_max</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">CPUCount</span> <span style="color:rgb(68,170,221);">=</span> $vm<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">vcpus_max</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICID</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(204,85,85);">No NIC Attached</span><span style="color:rgb(128,0,0);">'</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICNetworkName</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(204,85,85);">No NIC Attached</span><span style="color:rgb(128,0,0);">'</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICVLAN</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(204,85,85);">No NIC Attached</span><span style="color:rgb(128,0,0);">'</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICMAC</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(204,85,85);">No NIC Attached</span><span style="color:rgb(128,0,0);">'</span><br>$xenVM<span style="color:rgb(68,170,221);">.</span><span style="color:rgb(0,95,210);">NICIP</span> <span style="color:rgb(68,170,221);">=</span> <span style="color:rgb(128,0,0);">'</span><span style="color:rgb(204,85,85);">No IP Available</span><span style="color:rgb(128,0,0);">'</span><br>$xenVMs <span style="color:rgb(68,170,221);">+=</span> $xenVM<br><span style="color:rgb(128,128,48);">}</span><br><span style="color:rgb(128,128,48);">}</span><br><br>$xenVMs <span style="color:rgb(187,121,119);font-weight:bold;">|</span> <span style="color:rgb(0,102,221);">Export-Csv</span> <span style="color:rgb(71,119,102);">-Path</span> <span style="color:rgb(204,85,85);">c:\NetworkInfo.csv</span><br><br><span style="color:rgb(0,95,210);">Disconnect-XenServer</span></p>
<p> </p>
]]></description><guid isPermaLink="false">215463</guid><pubDate>Tue, 27 Sep 2016 03:12:01 +0000</pubDate></item><item><title>Host hardware info via xe or Xen API</title><link>https://community.citrix.com/forums/topic/242935-host-hardware-info-via-xe-or-xen-api/</link><description><![CDATA[
<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	We want following hardware information on servers running Citrix Hypervisor.<br>
	Are these available via xe or Xen API? Vmware vCenter provides these via SDK API as well as web browser GUI.<br>
	Ssh connections are sometimes prohibited on production environment. So, we prefer xmlrpc/json API.<br>
	We know some CPU and memory information is available via host-cpu-info and host-param-list but not enough.
</p>

<p>
	 
</p>

<p>
	1 Server model name and serial number
</p>

<p>
	 
</p>

<p>
	example:<br>
	# dmidecode -t system<br>
	Handle 0x008D, DMI type 1, 27 bytes<br>
	System Information<br>
	        Manufacturer: HITACHI<br>
	        Product Name: HA8000V/DL360 Gen10<br>
	        Serial Number: SGH002V38J
</p>

<p>
	 
</p>

<p>
	Customers want this in order to locate physical machines running there guest VMs.
</p>

<p>
	 
</p>

<p>
	2 Server NIC model, harddisk model, storage controller model and PCI locations.
</p>

<p>
	 
</p>

<p>
	example:<br>
	# lspci<br>
	02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)<br>
	5c:00.0 Serial Attached SCSI controller: Adaptec Smart Storage PQI 12G SAS/PCIe 3 (rev 01)
</p>

<p>
	 
</p>

<p>
	# sginfo /dev/sdb<br>
	INQUIRY response (cmd: 0x12)<br>
	----------------------------<br>
	Device Type                        0<br>
	Vendor:                    HP<br>
	Product:                   MO000800JWUFU<br>
	Revision level:            HPD1
</p>

<p>
	 
</p>

<p>
	We want these for diagnostics purpose and PCI pass through settings.<br>
	 
</p>

<p>
	Thanks in advance.
</p>

<p>
	Motohiro
</p>
]]></description><guid isPermaLink="false">242935</guid><pubDate>Fri, 21 Aug 2020 06:17:08 +0000</pubDate></item><item><title>Citrix Hypervisor Powershell SDK 8.2 for New-XenPVSCacheStorage fails</title><link>https://community.citrix.com/forums/topic/243288-citrix-hypervisor-powershell-sdk-82-for-new-xenpvscachestorage-fails/</link><description><![CDATA[<p>
	I am able to create PVS Accelerator Site, MemorySR, but unable to create PVSCacheStorage to get allotted in side PVS Accelerator Site - please help me out. One thing I noticed is that the each time in loop, XENSR is picking up previously created 'tmpfs' as well:
</p>

<p>
	 
</p>

<p>
	# Create PVS Accelerator Cache" <a href="https://support.citrix.com/article/CTX220735" rel="external nofollow">https://support.citrix.com/article/CTX220735</a><br>
	 $NewPVSSite = Invoke-XenPVSSite -Name Test1 -XenAction Introduce -NameLabel Test1PVS<br>
	 $PVSSite = (Get-XenPVSSite).opaque_ref<br>
	 $PVSSite<br>
	 Start-Sleep -Seconds 20<br>
	 Get-XenHost | % { <br>
	 $HName = $_.opaque_ref<br>
	 $HName2 = $_.name_label<br>
	 $MemSR = New-XenSR -PassThru -XenHost $HName -DeviceConfig @{uri=""} -PhysicalSize 8589934592 -NameLabel MemorySR -Type tmpfs<br>
	 $MemSRy = (Get-XenSR | ? { $_.type -eq "tmpfs" }).uuid<br>
	 $HName2<br>
	 $MemSRy<br>
	 New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site $PVSSite -Size 8589934592<br>
	 Start-Sleep -Seconds 20<br>
	  } 
</p>

<p>
	 
</p>

<p>
	Below errors shows up:
</p>

<p>
	 
</p>

<p>
	OpaqueRef:6aef75b7-8f3f-4290-8133-c23768523901<br>
	XenTest1<br>
	1406cfd4-4afc-f894-6370-75c57082f57b<br>
	New-XenPVSCacheStorage : Object has been deleted.SR:1406cfd4-4afc-f894-6370-75c57082f57b<br>
	At 01.ps1:249 char:2<br>
	+  New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site  ...<br>
	+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
	    + CategoryInfo          : NotSpecified: (:) [New-XenPVSCacheStorage], Failure<br>
	    + FullyQualifiedErrorId : XenAPI.Failure,Citrix.XenServer.Commands.NewXenPVSCacheStorageCommand<br>
	 <br>
	XenTest2<br>
	cee6fad4-68f1-86ae-214a-5137495cd4aa<br>
	1406cfd4-4afc-f894-6370-75c57082f57b<br>
	New-XenPVSCacheStorage : Cannot convert 'System.Object[]' to the type 'XenAPI.XenRef`1[XenAPI.SR]' required by parameter 'SR'. Specified method is not <br>
	supported.<br>
	At 01.ps1:249 char:56<br>
	+ ... New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site $ ...<br>
	+                                                           ~~~~~~~<br>
	    + CategoryInfo          : InvalidArgument: (:) [New-XenPVSCacheStorage], ParameterBindingException<br>
	    + FullyQualifiedErrorId : CannotConvertArgument,Citrix.XenServer.Commands.NewXenPVSCacheStorageCommand<br>
	 <br>
	XenTest3<br>
	c9b05bbd-6603-ff00-fbb7-0bd1aaa5c0c2<br>
	cee6fad4-68f1-86ae-214a-5137495cd4aa<br>
	1406cfd4-4afc-f894-6370-75c57082f57b<br>
	New-XenPVSCacheStorage : Cannot convert 'System.Object[]' to the type 'XenAPI.XenRef`1[XenAPI.SR]' required by parameter 'SR'. Specified method is not <br>
	supported.<br>
	At 01.ps1:249 char:56<br>
	+ ... New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site $ ...<br>
	+                                                           ~~~~~~~<br>
	    + CategoryInfo          : InvalidArgument: (:) [New-XenPVSCacheStorage], ParameterBindingException<br>
	    + FullyQualifiedErrorId : CannotConvertArgument,Citrix.XenServer.Commands.NewXenPVSCacheStorageCommand
</p>

<p>
	 
</p>]]></description><guid isPermaLink="false">243288</guid><pubDate>Wed, 16 Sep 2020 22:07:32 +0000</pubDate></item><item><title>Citrix Hypervisor Powershell SDK 8.2 for New-Xenbond fails</title><link>https://community.citrix.com/forums/topic/243250-citrix-hypervisor-powershell-sdk-82-for-new-xenbond-fails/</link><description><![CDATA[<p>
	How can I create new VLAN and Corresponding bond?
</p>

<p>
	 $infoNetwork = New-XenNetwork -NameLabel "VLAN XXXX Tagged" -NameDescription "Management Network on VLAN XXXX" -OtherConfig @{VLAN='XXXX';automatic='false'} -PassThru
</p>

<p>
	 
</p>

<p>
	Above creates new network, but doesn't add VLAN Tag and I have to assign same bond for 2 additional VLANs as well.
</p>

<p>
	<br>
	  $Pifs_3 = Get-XenPIF | ?{$_.device -eq "eth2"}<br>
	  $Pifs_4 = Get-XenPIF | ?{$_.device -eq "eth3"}
</p>

<p>
	<br>
	  New-XenBond -PassThru -Network $infoNetwork -Members $Pifs_3,$Pifs_4 -Mode active_backup -Properties @{automatic='false'} -Async
</p>

<p>
	Below error message appears:<br>
	New-XenBond : Cannot convert 'System.Object[]' to the type 'XenAPI.XenRef`1[XenAPI.PIF]' required by parameter 'Members'. Specified method is not supported.
</p>]]></description><guid isPermaLink="false">243250</guid><pubDate>Tue, 15 Sep 2020 16:11:00 +0000</pubDate></item><item><title>Is it possible to pin VM memory so that host will never page out?</title><link>https://community.citrix.com/forums/topic/242992-is-it-possible-to-pin-vm-memory-so-that-host-will-never-page-out/</link><description><![CDATA[
<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	Is it possible to pin, page fix,  VM memory so that host will never page out any part of the memory used by an specific VM?
</p>

<p>
	Kvm has "Locked" memory specification. <a href="https://libvirt.org/formatdomain.html#memory-backing" rel="external nofollow">https://libvirt.org/formatdomain.html#memory-backing</a> 
</p>

<p>
	Our customer runs kinda real-time application and cannot tolerate paging delays on VM and host.
</p>

<p>
	 
</p>

<p>
	It looks vm-memory-static-range-set does not help.
</p>

<p>
	 
</p>

<p>
	Thanks in advance.
</p>
]]></description><guid isPermaLink="false">242992</guid><pubDate>Wed, 26 Aug 2020 04:33:21 +0000</pubDate></item><item><title>dot '.' not allowed in xenstore key?</title><link>https://community.citrix.com/forums/topic/242845-dot-not-allowed-in-xenstore-key/</link><description><![CDATA[
<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	When I include dot '.' in xenstore key, the entry I have created gets removed when VM starts.
</p>

<p>
	Is dot character not allowed in xenstore key? Any restrictions on character sets used in xenstore key?
</p>

<p>
	 
</p>

<p>
	How to reproduce:
</p>

<p>
	This is the initial value.<br>
	$ xe vm-param-get uuid=snip param-name=xenstore-data<br>
	vm-data: ; vm-data/mmio-hole-size: 268435456
</p>

<p>
	 
</p>

<p>
	Add foo and aaa-bbb entries.
</p>

<p>
	$ xe vm-param-set uuid=snip xenstore-data:vm-data/foo=bar<br>
	$ xe vm-param-set uuid=snip xenstore-data:vm-data/aaa-bbb=ccc
</p>

<p>
	<br>
	$ xe vm-param-get uuid=snip param-name=xenstore-data<br>
	vm-data/aaa-bbb: ccc; vm-data/foo: bar; vm-data: ; vm-data/mmio-hole-size: 268435456
</p>

<p>
	 
</p>

<p>
	Boot VM and see they are there. Good.
</p>

<p>
	# xenstore list vm-data<br>
	aaa-bbb<br>
	foo<br>
	mmio-hole-size
</p>

<p>
	# xenstore read vm-data/aaa-bbb<br>
	ccc
</p>

<p>
	 
</p>

<p>
	Shutdown the VM.
</p>

<p>
	Now add a key ddd.eee<br>
	$ xe vm-param-set uuid=snip xenstore-data:vm-data/ddd.eee=fff
</p>

<p>
	 
</p>

<p>
	Looks good.<br>
	$ xe vm-param-get uuid=snip param-name=xenstore-data<br>
	vm-data/ddd.eee: fff; vm-data: ; vm-data/aaa-bbb: ccc; vm-data/foo: bar; vm-data/mmio-hole-size: 268435456
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	Boot VM
</p>

<p>
	$ xe vm-param-get uuid=snip param-name=xenstore-data<br>
	vm-data: ; vm-data/mmio-hole-size: 268435456
</p>

<p>
	 
</p>

<p>
	# xenstore list vm-data<br>
	mmio-hole-size
</p>

<p>
	 
</p>

<p>
	Wow! All entries I have added are gone.
</p>

<p>
	 
</p>

<p>
	I use CitrixHypervisor-8.2.0
</p>

<p>
	$ xe host-param-list
</p>

<p>
	software-version (MRO): product_version: 8.2.0;
</p>

<p>
	 
</p>

<p>
	Thanks in advance.
</p>

<p>
	Motohiro
</p>
]]></description><guid isPermaLink="false">242845</guid><pubDate>Thu, 13 Aug 2020 03:23:57 +0000</pubDate></item><item><title>Deploy VM from a template to other host and storage</title><link>https://community.citrix.com/forums/topic/235116-deploy-vm-from-a-template-to-other-host-and-storage/</link><description><![CDATA[
<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	I have a XenServer Pool with two XenServer Host and one Template.
</p>

<p>
	All hosts have local storage. The Template has it' VHD stored on Host1.
</p>

<p>
	 
</p>

<p>
	When I create VM from the Template and using the XenCenter I'm able to choose the destination host and the destination local storage.
</p>

<p>
	How do I this, when I use the PowerShell.
</p>

<p>
	 
</p>

<p>
	With this command the VM were created on the host, where the template hast its VHD in the local storage.
</p>

<p>
	 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">Invoke-XenVM $Template -XenAction Copy -NewName $VMname -Verbose
Invoke-XenVM $VMname -XenAction Provision -Verbose</span></pre>

<p>
	Many thanks for help.
</p>
]]></description><guid isPermaLink="false">235116</guid><pubDate>Wed, 20 Mar 2019 11:29:39 +0000</pubDate></item><item><title>Citrix and Unikernel.</title><link>https://community.citrix.com/forums/topic/242796-citrix-and-unikernel/</link><description><![CDATA[
<p>
	Hello,
</p>

<p>
	Xen Project is the biggest supporter of Unikernel but how about Citrix?
</p>

<p>
	Any plan?
</p>

<p>
	 
</p>

<p>
	Thanks.
</p>
]]></description><guid isPermaLink="false">242796</guid><pubDate>Fri, 07 Aug 2020 12:28:19 +0000</pubDate></item></channel></rss>
