Cloud System Center Virtualization Windows Windows Server
Matt Hansen  

How to move SCVMM VMs into a Cloud

Reading Time: 2 minutes

If you’ve ever added hosts to an SCVMM instance you’ll know that there’s seeminly no easy way to move the newly imported VMs from those hosts into SCVMM clouds. I’ve found the best way to do this is by using the SCVMM command-line interface, which unfortunately has a few quirks.

Set-SCVirtualMachine is the command you’ll need to use, with the flag “-Cloud” like in the example below.

Set-SCVirtualMachine -VM “NewVM1” -Cloud “Cloud1”

Unfortunately, every time I’ve tried this I’ve gotten an error saying it can’t convert the value type correctly like as shown below.

setscvm-failure

 

For whatever reason, I’ve found that the work around here is to set both the VM and the Cloud as variables and run the command again.

$VM = Get-SCVirtualMachine “NewVM1”

$Cloud = Get-SCCloud “Cloud1” 

Set-SCVirtualMachine -VM $VM -Cloud $Cloud

setscvm-success

 

Then we have success!

 

sccloud-success

 

I’ve yet to figure out why this is, but at least it works.

I hope this makes your day at least a little bit easier.

Thanks,

1 Comment

  1. Denver

    Thank you, this was exactly what I was looking for! Somehow it’s been two and a half years, and they still haven’t made this obvious in VMM, and you’d think it would be. :facepalm:

Leave a Reply

Discover more from Hansen Cloud

Subscribe now to keep reading and get access to the full archive.

Continue reading