The officially official Devuan Forum!

You are not logged in.

#1 2018-07-05 11:47:00

EfEm
Member
Registered: 2018-07-05
Posts: 2  

Trying to install Devuan ASCII in qemu/libvirt virtual machine

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.

Offline

#2 2018-07-05 12:27:11

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: Trying to install Devuan ASCII in qemu/libvirt virtual machine

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?

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

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

-c OPTIONS
       --cdrom OPTIONS
           File or device used as a virtual CD-ROM device.  It can be path to an
           ISO image, or to a CDROM device. It can also be a URL from which to
           fetch/access a minimal boot ISO image. The URLs take the same format
           as described for the "--location" argument. If a cdrom has been
           specified via the "--disk" option, and neither "--cdrom" nor any other
           install option is specified, the "--disk" cdrom is used as the install
           media.

Last edited by Panopticon (2018-07-05 12:38:22)

Offline

#3 2018-07-05 14:15:28

EfEm
Member
Registered: 2018-07-05
Posts: 2  

Re: Trying to install Devuan ASCII in qemu/libvirt virtual machine

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.

Offline

#4 2018-07-05 19:49:31

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: Trying to install Devuan ASCII in qemu/libvirt virtual machine

Sorry, i can't help here but i am a bit confused why libvirt would need knowledge about the installer layout. Why wouldn't it just setup a virtual CD drive and run the installer? It's full hardware virtualization after all. Qemu has no problem with the ISO as it obviously does not care what's on it as long as it's bootable.

Offline

#5 2018-07-06 11:40:38

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: Trying to install Devuan ASCII in qemu/libvirt virtual machine

Sorry for commenting here, way above my knowledge on qemu and libvirt. I can only assume you are trying to do an install virtually onto real hardware perhaps? I just dont get it.

Offline

Board footer