distri icon indicating copy to clipboard operation
distri copied to clipboard

distri on Hyper-V

Open joachimlindenberg opened this issue 5 years ago • 4 comments

I tested (lets say a smoke test) on Hyper-V and it worked. I followed instructions at https://www.windowspro.de/tool/vmdk-vhdx-vdi-virtuelle-disks-konvertieren-qemu-img-fuer-windows and used a command like qemu-img.exe convert -O vhdx distri-disk.img distri-disk.vhdx. I used the resulting .vhdx for a new virtual machine on Hyper-V (gen 1) and bootet.. Ok, not really an issue, but you may want to add it to your how to section..

joachimlindenberg avatar Aug 11 '19 17:08 joachimlindenberg

I would be tempted to tag this as an enhancement, doc(s), (ms-)windows and ooh good-first-issue . There might be more or less, but my labeler seems to not work.

JamesB192 avatar Aug 18 '19 16:08 JamesB192

Thanks for filing this, and sorry for the late reply, this escaped my inbox.

I agree that this would be good to add to the howto section.

stapelberg avatar Aug 20 '19 06:08 stapelberg

Worth mentioning that distri-disk.img also runs on Azure when used as a disk (also known as a specialized VM) Steps needed are:

  1. Ensure you can SSH into distri (create a user, define authorized_keys or set PermitRootLogin to yes)
  2. Convert to VHD using qemu-img convert with -o subformat=fixed,force_size -O vpc distri-azure.vhd
  3. Upload file with az storage blob upload --account-name ... --account-key ... --container-name ... --type page --file distri-azure.vhd
  4. Create a managed disk with az disk create -g ... --name ... --source <url from previous step>
  5. Create and start the VM with az vm create -g ... --location ... --name ... --os-type linux --attach-os-disk <name from previous step>

Optionally, add console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300 to the kernel cmdline in GRUB and add ClientAliveInterval 180 to sshd_config.

Without cloud-init, ignition or similar, distri can't be "generalized" (= distributed as an image) for Azure just yet.

bureado avatar Aug 25 '19 22:08 bureado

Thanks for documenting these steps. Would you mind sending a PR to add them to the README please?

Optionally, add console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300 to the kernel cmdline in GRUB and add ClientAliveInterval 180 to sshd_config.

What are these steps for? Use the serial disk image (distri-qemu-serial.img, or specify serial=1 if you’re using make image) and the serial console should work fine, no? rootdelay shouldn’t be required either, as we use dracut, which uses udev, so we should already wait the correct amount of time for root devices to show up.

Without cloud-init, ignition or similar, distri can't be "generalized" (= distributed as an image) for Azure just yet.

Yep, same for Google Cloud.

stapelberg avatar Aug 26 '19 07:08 stapelberg