The officially official Devuan Forum!

You are not logged in.

#1 Re: Installation » Trying to install Devuan ASCII in qemu/libvirt virtual machine » 2018-07-05 14:15:28

Panopticon wrote:

I dont quite understand, not familiar enough with advanced qemu and libvirt. Are you trying to install a linux operating system (devuan ascii) onto an existing virtual machine?

Depends on what you mean by "existing". virt-install usually creates a new VM if you don't choose to import an existing virtual disk.

Panopticon wrote:

Link is a nice guide on qemu: https://fosspost.org/tutorials/use-qemu … tributions

That guide is sadly only for native qemu. Libvirt (and it's tools like virt-install, virt-manager, ...) is a complete layer between qemu and the user. So if you use libvirt, like in my case, you basically don't interact diretly with qemu at all.

Panopticon wrote:

Having a quick look at the man page, for virt-install maybe you are missing the --cdrom option in the command?

There are different methods for providing a boot medium to the VM. --cdrom does not allow me to use the --extra-args parameter, which I need in order to add additional kernel arguments that allow me to access the VMs console. --location is the only param that allows the use of --extra-args, therefore I need to use that.

man page says:

-l LOCATION
--location=LOCATION
Distribution tree installtion source. virt-install can recognize certain distribution trees and fetches a bootable kernel/initrd pair to launch the install. 

With libvirt 0.9.4 or later, network URL installs work for remote connections. virt-install will download kernel/initrd to the local machine, and then upload the media to the remote host. This option requires the URL to be accessible by both the local and remote host.

--location allows things like --extra-args for kernel arguments, and using --initrd-inject. If you want to use those options with CDROM media, you have a few options:
* Run virt-install as root and do --location ISO
* Mount the ISO at a local directory, and do --location DIRECTORY
* Mount the ISO at a local directory, export that directory over local http, and do --location http://localhost/DIRECTORY

The "LOCATION" can take one of the following forms:

http://host/path
An HTTP server location containing an installable distribution image.

ftp://host/path
An FTP server location containing an installable distribution image.

nfs:host:/path or nfs://host/path
An NFS server location containing an installable distribution image. This requires running virt-install as root.

DIRECTORY
Path to a local directory containing an installable distribution image. Note that the directory will not be accessible by the guest after initial boot, so the OS installer will need another way to access the rest of the install media.

ISO
Mount the ISO and probe the directory. This requires running virt-install as root, and has the same VM access caveat as DIRECTORY.

I've tried pointing the --location path to the iso file as such, as well as to a directory where the iso file is mounted. I don't really want to get into setting up a local http or ftp server, but I don't believe it would make a difference. As the man page says, "virt-install can recognize certain distribution trees", I think there are just some that are compatible, and some that are not.
For devuan Jessie, it works fine, that's why I'm wondering if there are any changes to ASCIIs installer / install tree compared to Jessie.

#2 Installation » Trying to install Devuan ASCII in qemu/libvirt virtual machine » 2018-07-05 11:47:00

EfEm
Replies: 4

Hi all, I hope this is the right place to ask...

I'm trying to install ASCII in a libvirt/qemu virtual machine using the command line tool virt-install (Version 1.4.3).
(I am aware that Devuan provides a ready-to-use qemu Image, but for a number of reasons, that is not a option for me.)

This is the command I run:

# virt-install --name myvm02ascii --ram 1024 --disk size=10 --vcpus 2 --os-type linux --os-variant debian9 --network bridge=br0 --graphics none --console pty,target_type=serial --location /root/devuan_ascii_2.0.0_amd64_netinst.iso --extra-args 'console=ttyS0,115200n8 serial'

which results in the following error:

ERROR    Could not find an installable distribution at '/root/devuan_ascii_2.0.0_amd64_netinst.iso'
The location must be the root directory of an install tree.

Am I doing something wrong? If I use a Devuan Jessie .iso instead of ASCII, or completely other distributions such as CentOS under the same conditions on the same host System, everything works fine - which leads me to believe that something in the devuan installer/iso must have changed from Jessie to ASCII, so that virt-install's --location parameter won't recognize it any more.
Initially, I got the same error with Jessie, but after manually updating virt-install from 1.4.0 to 1.4.3, that problem went away. Now, using the ASCII iso, it's back.

Board footer

Forum Software