Using virt-install to install Windows Server 2008 in qcow2 format

When installing Server 2008 on Qemu, for the creation of an OpenStack Windows Server 2008 template; I found it easiest to use virt-install.

Below is the code that I use to kick off that virt-install.

virt-install --virt-type kvm --name win2008 --ram 2048 --cdrom=/path/to/cd-iso/server-2008.iso --disk path=/path/to/disk/file/location/2008.qcow2 --network network=default,model=virtio --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=windows --os-variant=win2k8

 

Huge LACP Changes in ESX 5.5u1 from ESX 5.1

In vSphere 5.1, Link Aggregation Configuration Protocol (LACP) on the vSphere Distributed Switch (vDS) was configured on the Uplink Porgroup. There were basic options of enabled/disabled and active/passive.

These options were configured like below:

LACP Enabled
LACP Enabled

Continue reading “Huge LACP Changes in ESX 5.5u1 from ESX 5.1”

Monitoring vSAN replication tasks using RVC

First, SSH to the vCenter appliance:

Then, run the following commands:

 rvc root@localhost
password:
0 /
1 localhost/
> cd localhost/vsandc/computers/
/localhost/vsandc/computers> vsan.resync_dashboard vsan
2014-06-12 14:36:47 +0000: Querying all VMs on VSAN ...
2014-06-12 14:36:47 +0000: Querying all objects in the system from r1b41g.domain.local ...
2014-06-12 14:36:48 +0000: Got all the info, computing table ...
+-----------+-----------------+---------------+
| VM/Object | Syncing objects | Bytes to sync |
+-----------+-----------------+---------------+
+-----------+-----------------+---------------+
| Total | 0 | 0.00 GB |
+-----------+-----------------+---------------+
/localhost/vsandc/computers>

Here is some more output:

/localhost/vsandc/computers> vsan.resync_dashboard vsan
2014-06-12 15:53:49 +0000: Querying all VMs on VSAN ...
2014-06-12 15:53:49 +0000: Querying all objects in the system from r1b41g.domain.local ...
2014-06-12 15:53:50 +0000: Got all the info, computing table ...
+--------------------------------------------------------------------------------------+-----------------+---------------+
| VM/Object | Syncing objects | Bytes to sync |
+--------------------------------------------------------------------------------------+-----------------+---------------+
| VMware vCAC Appliance | 1 | |
| [vsanDatastore] 60535e53-6cc3-77e0-c02b-089e01abfcd0/VMware vCAC Appliance_1.vmdk | | 0.00 GB |
| splunksearch01 | 1 | |
| [vsanDatastore] 72a84553-702c-243a-415f-089e01abfc9e/splunksearch01.vmdk | | 0.01 GB |
| vSAN VC | 1 | |
| [vsanDatastore] 86d58c52-4e23-874d-5fb2-089e01abfc9e/vSAN VC-000001.vmdk | | 0.02 GB |
| hadoopsql | 8 | |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_1-000001.vmdk | | 0.10 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_1.vmdk | | 0.04 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_2-000001.vmdk | | 0.11 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_2-000002.vmdk | | 0.02 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_2.vmdk | | 0.01 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_3-000002.vmdk | | 0.35 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_3-000001.vmdk | | 0.00 GB |
| [vsanDatastore] bb7db452-b8a8-01a2-bf15-089e01abfc9e/hadoopsql_4-000001.vmdk | | 0.01 GB |
+--------------------------------------------------------------------------------------+-----------------+---------------+
| Total | 11 | 0.67 GB |
+--------------------------------------------------------------------------------------+-----------------+---------------+

Finding orphaned VMDK’s using PowerCLI

Here is a PowerCLI script I use to find all orphaned VMDK’s in my vCenter environment.

$arrayVC = "virtualcenter2"
Foreach ($strVC in $arrayVC)
{
 Connect-VIServer $strVC 
 $arrUsedDisks = Get-VM | Get-HardDisk | %{$_.filename}
 $arrUsedDisks += get-template | Get-HardDisk | %{$_.filename}
 $arrDS = Get-Datastore
 Foreach ($strDatastore in $arrDS)
 {
 $strDatastoreName = $strDatastore.name
 $ds = Get-Datastore -Name $strDatastoreName | %{Get-View $_.Id}
 $fileQueryFlags = New-Object VMware.Vim.FileQueryFlags
 $fileQueryFlags.FileSize = $true
 $fileQueryFlags.FileType = $true
 $fileQueryFlags.Modification = $true
 $searchSpec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec
 $searchSpec.details = $fileQueryFlags
 $searchSpec.sortFoldersFirst = $true
 $dsBrowser = Get-View $ds.browser
 $rootPath = "["+$ds.summary.Name+"]"
 $searchResult = $dsBrowser.SearchDatastoreSubFolders($rootPath, $searchSpec)
 $myCol = @()
 foreach ($folder in $searchResult)
 {
 foreach ($fileResult in $folder.File)
 {
 $file = "" | select Name, FullPath 
 $file.Name = $fileResult.Path
 $strFilename = $file.Name
 IF ($strFilename)
 {
 IF ($strFilename.Contains(".vmdk")) 
 {
 IF (!$strFilename.Contains("-flat.vmdk"))
 {
 IF (!$strFilename.Contains("delta.vmdk")) 
 {
 $strCheckfile = "*"+$file.Name+"*"
 IF ($arrUsedDisks -Like $strCheckfile){}
 ELSE 
 { 
 $strOutput = $strDatastoreName + " Orphaned VMDK Found: " + $strFilename
 $strOutput
 } 
 }
 } 
 }
 }
 }
 } 
 } 
}

I wrote this a long time ago, hopefully it still works