Skip to content

Instantly share code, notes, and snippets.

@AlexKalinin
Forked from EugeneKay/README.md
Created May 17, 2022 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexKalinin/e31f5668fefdca1a3bbec6ec86d11064 to your computer and use it in GitHub Desktop.
Save AlexKalinin/e31f5668fefdca1a3bbec6ec86d11064 to your computer and use it in GitHub Desktop.
Winode Instructions

NOTE: This Gist concerns the old Linode KVM Beta, NOT the current Manager. Please see linode/docs#501 (comment) for more up-to-date instructions.

You will need:

On the KVM source, run the following to create a VM:

virt-install --name=Winode --controller type=scsi,model=virtio-scsi --disk path=/dev/LVM/Winode,bus=scsi --graphics spice --vcpus=1 --ram=1024 --network bridge=br1 --os-type=windows --boot cdrom --location=/data/software/OSes/Windows\ Server\ 2012\ R2\ Update\ x64.iso

Assumptions are made about the path of an existing LVM device and the iso location. Open virt-manager. Add a second IDE CDROM device pointing to the virtio iso. Delete the provided NIC and create one using the virtio driver. Set the MAC address to that of the existing Linode(use ip link show to get it).

Boot the VM, and go through the windows installation process slecting a Core install. It will fail to find a disk. Add a driver, and navigate to the second CD drive, viostor/2k12r2/amd64/. It should find the "RHEL Virtio SCSI" driver. Add it, then repeat the process with NetKVM/2k12r2/amd64/ for the network driver. Finish the wizard, and let the VM reboot. It will prompt you for a new password, then login.

In the command prompt provided, enable the EMS(serial management, for Lish):

bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200
bcdedit /ems {current} on

Next use the "sconfig" utility. Use option 7 to enable Remote Desktop. Verify the network driver loaded with option 8. Shutdown the VM with option 14.

On your Rescue Mode Linode, run passwd to set a password for root, then service ssh start. From your KVM host, send the disk image up:

# dd if=/dev/LVM/Winode | pv -s 20480M | gzip -1 | ssh root@173.230.158.85 "gzip -d | dd of=/dev/sda"

In the Linode Dashboard, create a Configuration Profile. Kernel should be set to "Direct Disk". root device of /dev/sda. Disable all of the "Boot Helpers". Try to boot the Linode, watching Lish for any BSOD messages. Ask Eugene on IRC if you have any problems. Good luck!

NOTE: These instructions(excluding the Windows-specific commands, including bcdedit) should be valid for any OS which can be booted under qemu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment