distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
536 stars 26 forks source link

distri on Hyper-V #29

Open joachimlindenberg opened 5 years ago

joachimlindenberg commented 5 years ago

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..

JamesB192 commented 5 years ago

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.

stapelberg commented 5 years ago

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.

bureado commented 5 years ago

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.

stapelberg commented 5 years ago

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.