SetLinuxVM


Support - FAQ


How to install SetLinuxVM?

  • 1. You should allow signed Powershell scripts: Set-ExecutionPolicy AllSigned
  • 2. Extract file and move “SetLinuxVM” directory under to "C:\Windows\System32\WindowsPowerShell\v1.0\Modules"
  • 3. Import as a module: Import-Module SetLinuxVM
  • 4. That’s it. To see how to use it: Get-help Set-LinuxVM -full

How to start SetLinuxVM Web Access?

  • 1. You can just use: Start-SetLinuxVMWA
  • 2. If you need to start with different hostname and port: Start-SetLinuxVM -Hostname "localhost" -Port "8080"
  • 3. Go to Task Scheduler and end PoSHServer task. Change run as account with a domain admin account. Start the task again.

Does it possible to deploy Linux VM with SetLinuxVM?

  • No, not at this moment. SetLinuxVM is a similar tool to "sysprep" and should be used after Linux VM is deployed.
  • SetLinuxVM currently supports SCVMM templates but we use it to fetch Distro, Username and Password information.

Where should I install SetLinuxVM? Hyper-V host or SCVMM server?

  • Actually It doesn't matter! SetLinuxVM supports Hyper-V and SCVMM both. We use managers to query VM list. If you have SCVMM, provisioning process will be shorter.
  • Even when you use Hyper-V host, if it's member of a Failover Cluster, we can detect VMs in cluster. Just you need to run SetLinuxVM with required privileges.

What happened to Distro switch?

  • Distro switch removed after SetLinuxVM v5. SetLinuxVM no longer requires distro switch for any process.

SetLinuxVMWA and REST API doesn't work for Hyper-V servers and clusters?

  • Go to "Task Scheduler" of Windows and checked SetLinuxVM-PoSHServer job. It should runs under a domain account which has enough priviliges to access failover cluster (example: domain admin).
  • You need to end the task, and start again to run SetLinuxVM with new user account. Task Scheduler won't use new run as account unless you don't restart it.

How do I use REST API?

  • 1. You should start SetLinuxVM Web Access first.
  • 2. Generate a REST API key from control panel.
  • 3. You should follow REST API examples.

Linux VM preparation examples for REST API:

  • http://localhost:8080/api/Set-LinuxVM.psxml?JobType=New&RestAPIKey=123456&VMName=Linux01&Username=root&Password=123456&Hostname=CentOS6
  • http://localhost:8080/api/Set-LinuxVM.psxml?JobType=New&RestAPIKey=123456&VMName=Linux01&Username=root&Password=123456&IPAddress=10.10.10.2 &GatewayAddress=10.10.10.1&SubnetAddress=24&DNSAddress=8.8.8.8
  • http://localhost:8080/api/Set-LinuxVM.psxml?JobType=New&RestAPIKey=123456&VMName=Linux01&Username=root&Password=123456&InstallLIC=on
  • http://localhost:8080/api/Set-LinuxVM.psxml?JobType=New&RestAPIKey=123456&VMName=Linux01&Username=root&Password=123456&ExtendLVM=on

How to see Linux VM preparation status with REST API?

  • http://localhost:8080/api/Set-LinuxVM.psxml?RestAPIKey=123456&VMName=Linux01

REST API responses:

  • 100 (Continue): "In progress.."
  • 200 (OK): Linux virtual machine preparation is completed.
  • 201 (Created): RestAPI key validated.
  • 202 (Accepted): Started virtual machine preparation.
  • 204 (No Content): There is no preparation job for this virtual machine.
  • 400 (Bad Request): "Please check Response Message."
  • 401 (Unauthorized): RestAPI key is not correct.
  • 403 (Forbidden): RestAPIKey is not provided.
  • 550 (No Action): No action is needed.

Linux preparation examples:

  • Set-LinuxVM -VMName "Linux01" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4"
  • Set-LinuxVM -VMName "Linux02" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -AnswerFile "C:\answer.txt"
  • Set-LinuxVM -VMName "Linux03" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -Panel "CPanel"
  • Set-LinuxVM -VMName "Linux04" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -Panel "Plesk"
  • Set-LinuxVM -VMName "Linux05" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -InstallLIC
  • Set-LinuxVM -VMName "Linux06" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info"
  • Set-LinuxVM -VMName "Linux07" -VMHost "hyperv01.yusufozturk.info" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4"
  • Set-LinuxVM -VMName "Linux08" -VMMServer "scvmm01.yusufozturk.info" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4"
  • Set-LinuxVM -VMName "Linux09" -Manager "Hyper-V" -Username "yusuf" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4"
  • Set-LinuxVM -VMName "Linux10" -Manager "Hyper-V" -VMHost "hyperv01.yusufozturk.info" -Username "yusuf" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4"
  • Set-LinuxVM -VMName "Linux11" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -ExtendLVM
  • Set-LinuxVM -VMName "Linux12" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -TimeZone "Europe/Istanbul"
  • Set-LinuxVM -VMName "Linux13" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -PrimaryDNSAddress "8.8.8.8" -SecondaryDNSAddress "8.8.4.4" -NewPassword "123654"
  • Set-LinuxVM -VM "Linux14" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IP "192.168.2.2" -Subnet "255.255.255.0" -Gateway "192.168.2.1" -DNS1 "8.8.8.8" -DNS2 "8.8.4.4"
  • Set-LinuxVM -VM "Linux15" -Username "root" -Password "123456" -Hostname "server.yusufozturk.info" -IP "192.168.2.2" -Subnet "255.255.255.0" -Gateway "192.168.2.1" -DNS1 "8.8.8.8" -DNS2 "8.8.4.4" -NewPassword "123654" -TimeZone "Europe/Istanbul" -ExtendLVM -InstallLIC
  • Set-LinuxVM -VMName "Linux16" -Username "root" -Password "123456" -TransferFile "C:\Custom.tar"
  • Set-LinuxVM -VMName "Linux17" -Username "root" -Password "123456" -TransferFile "C:\Custom"

I still have questions. What should I do?

  • Do not hesitate to use "Contact Us" link.

How can I support this project?

  • SetLinuxVM is a free and opensource project. You can modify codes to meet your requirements.
  • You can support this project with a small donation: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=29U2LMLQKPLMQ