My Experience setti...
 
Notifications
Clear all

My Experience setting up Hyperv to create Linux Vms (Ubuntu 20.04 and Centos 7)

2 Posts
1 Users
1 Reactions
686 Views
Posts: 237
Topic starter
(@hxkd)
Reputable Member
Joined: 7 years ago

Hi Guys This is just my experience with setting up the hyperv vm creation with linux, maybe this might help others that are unsure what to do, I had to try fumble around to find out myself as I am a windows user.

Firstly you need to manually create a linux machine on hyperV. I created an Ubuntu 20.04.3 LTS Server.

  1. I downloaded the ubuntu image from ubuntu's servers online and setup a hyperV vm, using generation 1, 50Gb dynamically expanding vdhx, linked to the switch and added a lan connection, the HDD was ide0 and dvd was ide1, Once created set the dvd to a boot image and select the ubuntu iso you downloaded from ubuntu.
    1. Boot the vm and follow the directions mine were, English, I left the keyboard settings as defaults, I then added an ip address that I would use to communicate with the server on eth0, no, proxy, storage settings, use entire disk, I took defaults, then at profile, I added my name as admin, gave the server a name ubuntu20043, username of user, and added a password.
    2. I enabled Openssh, and continued on, at this point ubuntu is installing (after each selection above you select "done" just to be clear. :-))
    3. Once completed,  connect to the vps, login as user and the password you selected.
    4. run a sudo apt-get update to update the system
    5. then connect to the server and upload the SCPLinux-x64 folder to the server downloaded from here, you need to upload the compiled version only. https://github.com/FuseCP/SolidCP/tree/master/SolidCP/Sources/Tools/SolidCP.VmConfig/Linux/NetCoreVersion/SolidCP.LinuxVmConfig
    6. once uploaded then use the below commands to install and activate the linux agent in your vm, this will allow you to change the root user, server name and ips from solidcp.
    7. once enabled in the vm you can then shutdown the vm and copy the vm hard disk, maybe rename it to ubuntuvm.vhdx or centos7vm.vhdx and copy it to your templates folder to use to create linux vms using solidcp. You can also make any changes to the vm before doing this, but this is just a quick and dirty on how to get the linux agent working in centos7 and ubuntu 20.04
Installing - Ubuntu:
1 - If not installed then:
		apt-get update
		apt-get install --install-recommends linux-virtual
		apt-get install linux-tools-virtual linux-cloud-tools-virtual
2 - Copy "Compiled\SCPLinux-x64" on your server.
3 - cd /{Your path}/SCPLinux-x64
4 - chmod 774 SolidCP.LinuxVmConfig
5 - ./SolidCP.LinuxVmConfig install
6 - "SolidCP.service successfully installed." message - Done

Installing - CentOS:
1 - Copy "Compiled\SCPLinux-x64" on your server.
2 - cd /{Your path}/SCPLinux-x64
3 - chmod 774 SolidCP.LinuxVmConfig
4 - ./SolidCP.LinuxVmConfig install
5 - "SolidCP.service successfully installed." message - Done
Topic Tags
1 Reply
Posts: 237
Topic starter
(@hxkd)
Reputable Member
Joined: 7 years ago

Update : one catch with the Ubuntu 20.04.3 version is that the agent uses the ifconfig commands to get info for the network and the latest version of ubuntu this is deprecated and removed, this then only leaves the password and machine name working, to make it work with the network just run the following command

apt-get install net-tools

this will install the ifconfig libraries and then you can change the ip addresses as well.

Reply
Share: