Install VM from command line with virt-installremote virt-viewer on the command line?virt-install automatic...

How can Kazakhstan perform MITM attacks on all HTTPS traffic?

Why is chess failing to attract big name sponsors?

How may I shorten this shell script?

What the purpose of the fuel shutoff valve?

Other than a swing wing, what types of variable geometry have flown?

What happens if an IRB mistakenly approves unethical research?

How could an engineer advance human civilization by time traveling to the past?

I have a domain, static IP address and many devices I'd like to access outside my house. How do I route them?

How important is a good quality camera for good photography?

How can I tell if there was a power cut when I was out?

Is the statement "I/we am/are pressing charges" incorrect?

Why can't a country print its own money to spend it only abroad?

Are glider winch launches rarer in the USA than in the rest of the world? Why?

What is the spanish equivalent of "the boys are sitting"?

Why must API keys be kept private?

Alternative methods for solving a system of one linear one non linear simultaneous equations

Monty Hall Problem with a Fallible Monty

Inverse Colombian Function

Impact of throwing away fruit waste on a peak > 3200 m above a glacier

Considerations when providing money to one child now, and the other later?

"It is what it is" in French

Is an easily guessed plot twist a good plot twist?

Why did modems have speakers?

Historicity doubted by Romans



Install VM from command line with virt-install


remote virt-viewer on the command line?virt-install automatic Debian installation with preseed.cfgVGA passthrough - Code 43 with KVM and libvirt on all AMD hardwarelinux kvm performance questionSetting grub2 boot options for RHEL7 installer with virt-install






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







11















Disclaimer :



I now use virt-manager to create and manage my VM and it is really a life saver. It can be used remotely (from a third machine, typically your workstation) if the host does not have graphical display.



The occurrences of vnc in the installation tutorials I found made me think that the "recommended" procedure required X stuff either on host, guest or both. Absolutely not. My mistake. If you are in the same situation, think twice before trying to install the VM from command line.





I'm trying to install a Debian VM in a Debian host using virt-install and I don't know how to pass it the .iso image.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'

Starting install...
Retrieving file info... | 160 B 00:00 ...
ERROR Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
root@versailles:/etc#


The solutions I have seen seem quite twisted, like using apache to serve locally the .iso image as if it was from a distant place.




  • Linux Mint 14 : install Ubuntu 12.10 Server within KVM via CLI ( no GUI )


  • [Xen-users] installing a vm with virt-install (It is Xen but it looks like it is the same issue anyway.


I can't believe it is that complicated. Is it?



man virt-install says:



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


Isn't this what I'm doing?



Someone says he moved the .iso to /cdrom and it worked but I didn't understand exactly what he did and I couldn't reproduce.



I cannot use --cdrom instead of --location as in this question because --extra-args only work if specified with --location.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --cdrom=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'
ERROR --extra-args only work if specified with --location. See the man page for examples of using --location with CDROM media


Edit:



Log with --debug



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial' --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:187) Launched with command line: /usr/share/virt-manager/virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args=console=tty0 console=ttyS0,115200n8 serial --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:195) Requesting libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:199) Received libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:193) Requesting virt method 'default', hv type 'kvm'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:432) Received virt method 'kvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:433) Hypervisor name is 'hvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:476) DISPLAY is not set: defaulting to nographics.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (guest:208) Setting Guest.os_variant to 'debianwheezy'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (diskbackend:171) Path '/srv/vm' is target for pool 'srv-kvm'. Creating volume 'prod.qcow'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (connection:228) Fetching volume XML failed: Storage volume not found: no storage vol with matching path '/media/cdrom0/debian-8.0.0-amd64-netinst.iso'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:551) Guest.has_install_phase: True

Starting install...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (distroinstaller:417) Using scratchdir=/var/lib/libvirt/boot
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:204) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:214) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/home/jerome/debian-8.0.0-amd64-netinst.iso', '/var/lib/libvirt/boot/virtinstmnt.srz86f']
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:302) Finding distro store for location=/home/jerome/debian-8.0.0-amd64-netinst.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/.treeinfo
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:325) Prioritizing distro store=<class 'virtinst.urlfetcher.DebianDistro'>
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/daily/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Fedora
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:99) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.srz86f/.disk/info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:110) Saved file to /var/lib/libvirt/boot/virtinst-info.lZMVqL
Retrieving file info... | 160 B 00:00 ...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:1016) Regex didn't match, not a ALT Linux distro
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/netboot/version.info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/SL
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/directory.yast
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/CentOS
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/VERSION
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Server
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Client
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/RedHat
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/pxeboot/vmlinuz
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/boot/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/netboot/mini.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:225) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:234) File "/usr/share/virt-manager/virt-install", line 876, in <module>
sys.exit(main())
File "/usr/share/virt-manager/virt-install", line 870, in main
start_install(guest, continue_inst, options)
File "/usr/share/virt-manager/virt-install", line 588, in start_install
fail(e, do_exit=False)
File "/usr/share/virt-manager/virtinst/cli.py", line 234, in fail
logging.debug("".join(traceback.format_stack()))

[mer., 03 juin 2015 17:46:12 virt-install 12991] ERROR (cli:235) Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:237)
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-install", line 560, in start_install
dom = guest.start_install(meter=meter, noboot=options.noreboot)
File "/usr/share/virt-manager/virtinst/guest.py", line 384, in start_install
self._prepare_install(meter, dry)
File "/usr/share/virt-manager/virtinst/guest.py", line 277, in _prepare_install
util.make_scratchdir(self.conn, self.type))
File "/usr/share/virt-manager/virtinst/installer.py", line 201, in prepare
self._prepare(guest, meter, scratchdir)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 444, in _prepare
self._prepare_kernel_url(guest, fetcher)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 347, in _prepare_kernel_url
store = urlfetcher.getDistroStore(guest, fetcher)
File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 346, in getDistroStore
fetcher.location))
ValueError: Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:248) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.


It works with --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ but isn't it a bit of a shame to do this when an .iso image is available locally?




  • Loss of traceability : you can't reproduce later being sure you get the exact same source.


  • Multiplicated use of bandwidth from servers/mirrors.


  • Need for internet access.


  • Slower.











share|improve this question

























  • You are right, but you can mitigate some of those drawbacks by building a local package cache server using apt-cacher-ng, or a full mirror using apt-mirror or ftpsync. Actually CD/DVD/BD distribution is only a tiny subset of the great package collection of Debian, it undesirably spoils its benefits and just irritates us. Therefore many people tend to maintain their local mirror and enjoy its completeness from the beginning of the install.

    – yaegashi
    Jun 3 '15 at 18:03


















11















Disclaimer :



I now use virt-manager to create and manage my VM and it is really a life saver. It can be used remotely (from a third machine, typically your workstation) if the host does not have graphical display.



The occurrences of vnc in the installation tutorials I found made me think that the "recommended" procedure required X stuff either on host, guest or both. Absolutely not. My mistake. If you are in the same situation, think twice before trying to install the VM from command line.





I'm trying to install a Debian VM in a Debian host using virt-install and I don't know how to pass it the .iso image.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'

Starting install...
Retrieving file info... | 160 B 00:00 ...
ERROR Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
root@versailles:/etc#


The solutions I have seen seem quite twisted, like using apache to serve locally the .iso image as if it was from a distant place.




  • Linux Mint 14 : install Ubuntu 12.10 Server within KVM via CLI ( no GUI )


  • [Xen-users] installing a vm with virt-install (It is Xen but it looks like it is the same issue anyway.


I can't believe it is that complicated. Is it?



man virt-install says:



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


Isn't this what I'm doing?



Someone says he moved the .iso to /cdrom and it worked but I didn't understand exactly what he did and I couldn't reproduce.



I cannot use --cdrom instead of --location as in this question because --extra-args only work if specified with --location.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --cdrom=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'
ERROR --extra-args only work if specified with --location. See the man page for examples of using --location with CDROM media


Edit:



Log with --debug



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial' --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:187) Launched with command line: /usr/share/virt-manager/virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args=console=tty0 console=ttyS0,115200n8 serial --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:195) Requesting libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:199) Received libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:193) Requesting virt method 'default', hv type 'kvm'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:432) Received virt method 'kvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:433) Hypervisor name is 'hvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:476) DISPLAY is not set: defaulting to nographics.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (guest:208) Setting Guest.os_variant to 'debianwheezy'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (diskbackend:171) Path '/srv/vm' is target for pool 'srv-kvm'. Creating volume 'prod.qcow'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (connection:228) Fetching volume XML failed: Storage volume not found: no storage vol with matching path '/media/cdrom0/debian-8.0.0-amd64-netinst.iso'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:551) Guest.has_install_phase: True

Starting install...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (distroinstaller:417) Using scratchdir=/var/lib/libvirt/boot
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:204) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:214) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/home/jerome/debian-8.0.0-amd64-netinst.iso', '/var/lib/libvirt/boot/virtinstmnt.srz86f']
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:302) Finding distro store for location=/home/jerome/debian-8.0.0-amd64-netinst.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/.treeinfo
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:325) Prioritizing distro store=<class 'virtinst.urlfetcher.DebianDistro'>
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/daily/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Fedora
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:99) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.srz86f/.disk/info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:110) Saved file to /var/lib/libvirt/boot/virtinst-info.lZMVqL
Retrieving file info... | 160 B 00:00 ...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:1016) Regex didn't match, not a ALT Linux distro
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/netboot/version.info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/SL
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/directory.yast
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/CentOS
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/VERSION
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Server
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Client
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/RedHat
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/pxeboot/vmlinuz
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/boot/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/netboot/mini.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:225) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:234) File "/usr/share/virt-manager/virt-install", line 876, in <module>
sys.exit(main())
File "/usr/share/virt-manager/virt-install", line 870, in main
start_install(guest, continue_inst, options)
File "/usr/share/virt-manager/virt-install", line 588, in start_install
fail(e, do_exit=False)
File "/usr/share/virt-manager/virtinst/cli.py", line 234, in fail
logging.debug("".join(traceback.format_stack()))

[mer., 03 juin 2015 17:46:12 virt-install 12991] ERROR (cli:235) Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:237)
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-install", line 560, in start_install
dom = guest.start_install(meter=meter, noboot=options.noreboot)
File "/usr/share/virt-manager/virtinst/guest.py", line 384, in start_install
self._prepare_install(meter, dry)
File "/usr/share/virt-manager/virtinst/guest.py", line 277, in _prepare_install
util.make_scratchdir(self.conn, self.type))
File "/usr/share/virt-manager/virtinst/installer.py", line 201, in prepare
self._prepare(guest, meter, scratchdir)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 444, in _prepare
self._prepare_kernel_url(guest, fetcher)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 347, in _prepare_kernel_url
store = urlfetcher.getDistroStore(guest, fetcher)
File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 346, in getDistroStore
fetcher.location))
ValueError: Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:248) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.


It works with --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ but isn't it a bit of a shame to do this when an .iso image is available locally?




  • Loss of traceability : you can't reproduce later being sure you get the exact same source.


  • Multiplicated use of bandwidth from servers/mirrors.


  • Need for internet access.


  • Slower.











share|improve this question

























  • You are right, but you can mitigate some of those drawbacks by building a local package cache server using apt-cacher-ng, or a full mirror using apt-mirror or ftpsync. Actually CD/DVD/BD distribution is only a tiny subset of the great package collection of Debian, it undesirably spoils its benefits and just irritates us. Therefore many people tend to maintain their local mirror and enjoy its completeness from the beginning of the install.

    – yaegashi
    Jun 3 '15 at 18:03














11












11








11


3






Disclaimer :



I now use virt-manager to create and manage my VM and it is really a life saver. It can be used remotely (from a third machine, typically your workstation) if the host does not have graphical display.



The occurrences of vnc in the installation tutorials I found made me think that the "recommended" procedure required X stuff either on host, guest or both. Absolutely not. My mistake. If you are in the same situation, think twice before trying to install the VM from command line.





I'm trying to install a Debian VM in a Debian host using virt-install and I don't know how to pass it the .iso image.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'

Starting install...
Retrieving file info... | 160 B 00:00 ...
ERROR Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
root@versailles:/etc#


The solutions I have seen seem quite twisted, like using apache to serve locally the .iso image as if it was from a distant place.




  • Linux Mint 14 : install Ubuntu 12.10 Server within KVM via CLI ( no GUI )


  • [Xen-users] installing a vm with virt-install (It is Xen but it looks like it is the same issue anyway.


I can't believe it is that complicated. Is it?



man virt-install says:



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


Isn't this what I'm doing?



Someone says he moved the .iso to /cdrom and it worked but I didn't understand exactly what he did and I couldn't reproduce.



I cannot use --cdrom instead of --location as in this question because --extra-args only work if specified with --location.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --cdrom=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'
ERROR --extra-args only work if specified with --location. See the man page for examples of using --location with CDROM media


Edit:



Log with --debug



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial' --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:187) Launched with command line: /usr/share/virt-manager/virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args=console=tty0 console=ttyS0,115200n8 serial --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:195) Requesting libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:199) Received libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:193) Requesting virt method 'default', hv type 'kvm'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:432) Received virt method 'kvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:433) Hypervisor name is 'hvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:476) DISPLAY is not set: defaulting to nographics.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (guest:208) Setting Guest.os_variant to 'debianwheezy'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (diskbackend:171) Path '/srv/vm' is target for pool 'srv-kvm'. Creating volume 'prod.qcow'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (connection:228) Fetching volume XML failed: Storage volume not found: no storage vol with matching path '/media/cdrom0/debian-8.0.0-amd64-netinst.iso'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:551) Guest.has_install_phase: True

Starting install...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (distroinstaller:417) Using scratchdir=/var/lib/libvirt/boot
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:204) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:214) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/home/jerome/debian-8.0.0-amd64-netinst.iso', '/var/lib/libvirt/boot/virtinstmnt.srz86f']
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:302) Finding distro store for location=/home/jerome/debian-8.0.0-amd64-netinst.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/.treeinfo
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:325) Prioritizing distro store=<class 'virtinst.urlfetcher.DebianDistro'>
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/daily/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Fedora
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:99) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.srz86f/.disk/info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:110) Saved file to /var/lib/libvirt/boot/virtinst-info.lZMVqL
Retrieving file info... | 160 B 00:00 ...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:1016) Regex didn't match, not a ALT Linux distro
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/netboot/version.info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/SL
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/directory.yast
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/CentOS
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/VERSION
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Server
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Client
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/RedHat
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/pxeboot/vmlinuz
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/boot/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/netboot/mini.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:225) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:234) File "/usr/share/virt-manager/virt-install", line 876, in <module>
sys.exit(main())
File "/usr/share/virt-manager/virt-install", line 870, in main
start_install(guest, continue_inst, options)
File "/usr/share/virt-manager/virt-install", line 588, in start_install
fail(e, do_exit=False)
File "/usr/share/virt-manager/virtinst/cli.py", line 234, in fail
logging.debug("".join(traceback.format_stack()))

[mer., 03 juin 2015 17:46:12 virt-install 12991] ERROR (cli:235) Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:237)
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-install", line 560, in start_install
dom = guest.start_install(meter=meter, noboot=options.noreboot)
File "/usr/share/virt-manager/virtinst/guest.py", line 384, in start_install
self._prepare_install(meter, dry)
File "/usr/share/virt-manager/virtinst/guest.py", line 277, in _prepare_install
util.make_scratchdir(self.conn, self.type))
File "/usr/share/virt-manager/virtinst/installer.py", line 201, in prepare
self._prepare(guest, meter, scratchdir)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 444, in _prepare
self._prepare_kernel_url(guest, fetcher)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 347, in _prepare_kernel_url
store = urlfetcher.getDistroStore(guest, fetcher)
File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 346, in getDistroStore
fetcher.location))
ValueError: Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:248) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.


It works with --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ but isn't it a bit of a shame to do this when an .iso image is available locally?




  • Loss of traceability : you can't reproduce later being sure you get the exact same source.


  • Multiplicated use of bandwidth from servers/mirrors.


  • Need for internet access.


  • Slower.











share|improve this question
















Disclaimer :



I now use virt-manager to create and manage my VM and it is really a life saver. It can be used remotely (from a third machine, typically your workstation) if the host does not have graphical display.



The occurrences of vnc in the installation tutorials I found made me think that the "recommended" procedure required X stuff either on host, guest or both. Absolutely not. My mistake. If you are in the same situation, think twice before trying to install the VM from command line.





I'm trying to install a Debian VM in a Debian host using virt-install and I don't know how to pass it the .iso image.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'

Starting install...
Retrieving file info... | 160 B 00:00 ...
ERROR Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
root@versailles:/etc#


The solutions I have seen seem quite twisted, like using apache to serve locally the .iso image as if it was from a distant place.




  • Linux Mint 14 : install Ubuntu 12.10 Server within KVM via CLI ( no GUI )


  • [Xen-users] installing a vm with virt-install (It is Xen but it looks like it is the same issue anyway.


I can't believe it is that complicated. Is it?



man virt-install says:



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


Isn't this what I'm doing?



Someone says he moved the .iso to /cdrom and it worked but I didn't understand exactly what he did and I couldn't reproduce.



I cannot use --cdrom instead of --location as in this question because --extra-args only work if specified with --location.



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --cdrom=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial'
ERROR --extra-args only work if specified with --location. See the man page for examples of using --location with CDROM media


Edit:



Log with --debug



virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args='console=tty0 console=ttyS0,115200n8 serial' --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:187) Launched with command line: /usr/share/virt-manager/virt-install --connect qemu:///system --virt-type kvm --name prod --ram 6144 --disk /srv/vm/prod.qcow,format=qcow2,size=10 --location=/home/jerome/debian-8.0.0-amd64-netinst.iso --network bridge=br0 --os-type linux --os-variant debianwheezy --extra-args=console=tty0 console=ttyS0,115200n8 serial --debug
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:195) Requesting libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:199) Received libvirt URI qemu:///system
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:193) Requesting virt method 'default', hv type 'kvm'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:432) Received virt method 'kvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:433) Hypervisor name is 'hvm'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:476) DISPLAY is not set: defaulting to nographics.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (guest:208) Setting Guest.os_variant to 'debianwheezy'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (diskbackend:171) Path '/srv/vm' is target for pool 'srv-kvm'. Creating volume 'prod.qcow'.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (connection:228) Fetching volume XML failed: Storage volume not found: no storage vol with matching path '/media/cdrom0/debian-8.0.0-amd64-netinst.iso'
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (virt-install:551) Guest.has_install_phase: True

Starting install...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (distroinstaller:417) Using scratchdir=/var/lib/libvirt/boot
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:204) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:214) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/home/jerome/debian-8.0.0-amd64-netinst.iso', '/var/lib/libvirt/boot/virtinstmnt.srz86f']
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:302) Finding distro store for location=/home/jerome/debian-8.0.0-amd64-netinst.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/.treeinfo
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:325) Prioritizing distro store=<class 'virtinst.urlfetcher.DebianDistro'>
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/daily/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Fedora
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:99) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.srz86f/.disk/info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:110) Saved file to /var/lib/libvirt/boot/virtinst-info.lZMVqL
Retrieving file info... | 160 B 00:00 ...
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:1016) Regex didn't match, not a ALT Linux distro
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/MANIFEST
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/netboot/version.info
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/SL
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/directory.yast
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/CentOS
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/VERSION
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Server
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/Client
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/RedHat
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/pxeboot/vmlinuz
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/boot/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/current/images/netboot/mini.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:183) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.srz86f/install/images/boot.iso
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (urlfetcher:225) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.srz86f
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:234) File "/usr/share/virt-manager/virt-install", line 876, in <module>
sys.exit(main())
File "/usr/share/virt-manager/virt-install", line 870, in main
start_install(guest, continue_inst, options)
File "/usr/share/virt-manager/virt-install", line 588, in start_install
fail(e, do_exit=False)
File "/usr/share/virt-manager/virtinst/cli.py", line 234, in fail
logging.debug("".join(traceback.format_stack()))

[mer., 03 juin 2015 17:46:12 virt-install 12991] ERROR (cli:235) Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:237)
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-install", line 560, in start_install
dom = guest.start_install(meter=meter, noboot=options.noreboot)
File "/usr/share/virt-manager/virtinst/guest.py", line 384, in start_install
self._prepare_install(meter, dry)
File "/usr/share/virt-manager/virtinst/guest.py", line 277, in _prepare_install
util.make_scratchdir(self.conn, self.type))
File "/usr/share/virt-manager/virtinst/installer.py", line 201, in prepare
self._prepare(guest, meter, scratchdir)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 444, in _prepare
self._prepare_kernel_url(guest, fetcher)
File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 347, in _prepare_kernel_url
store = urlfetcher.getDistroStore(guest, fetcher)
File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 346, in getDistroStore
fetcher.location))
ValueError: Could not find an installable distribution at '/home/jerome/debian-8.0.0-amd64-netinst.iso'
The location must be the root directory of an install tree.
[mer., 03 juin 2015 17:46:12 virt-install 12991] DEBUG (cli:248) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start prod
otherwise, please restart your installation.


It works with --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ but isn't it a bit of a shame to do this when an .iso image is available locally?




  • Loss of traceability : you can't reproduce later being sure you get the exact same source.


  • Multiplicated use of bandwidth from servers/mirrors.


  • Need for internet access.


  • Slower.








kvm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:13









Community

1




1










asked Jun 2 '15 at 15:36









JérômeJérôme

9192 gold badges9 silver badges40 bronze badges




9192 gold badges9 silver badges40 bronze badges













  • You are right, but you can mitigate some of those drawbacks by building a local package cache server using apt-cacher-ng, or a full mirror using apt-mirror or ftpsync. Actually CD/DVD/BD distribution is only a tiny subset of the great package collection of Debian, it undesirably spoils its benefits and just irritates us. Therefore many people tend to maintain their local mirror and enjoy its completeness from the beginning of the install.

    – yaegashi
    Jun 3 '15 at 18:03



















  • You are right, but you can mitigate some of those drawbacks by building a local package cache server using apt-cacher-ng, or a full mirror using apt-mirror or ftpsync. Actually CD/DVD/BD distribution is only a tiny subset of the great package collection of Debian, it undesirably spoils its benefits and just irritates us. Therefore many people tend to maintain their local mirror and enjoy its completeness from the beginning of the install.

    – yaegashi
    Jun 3 '15 at 18:03

















You are right, but you can mitigate some of those drawbacks by building a local package cache server using apt-cacher-ng, or a full mirror using apt-mirror or ftpsync. Actually CD/DVD/BD distribution is only a tiny subset of the great package collection of Debian, it undesirably spoils its benefits and just irritates us. Therefore many people tend to maintain their local mirror and enjoy its completeness from the beginning of the install.

– yaegashi
Jun 3 '15 at 18:03





You are right, but you can mitigate some of those drawbacks by building a local package cache server using apt-cacher-ng, or a full mirror using apt-mirror or ftpsync. Actually CD/DVD/BD distribution is only a tiny subset of the great package collection of Debian, it undesirably spoils its benefits and just irritates us. Therefore many people tend to maintain their local mirror and enjoy its completeness from the beginning of the install.

– yaegashi
Jun 3 '15 at 18:03










6 Answers
6






active

oldest

votes


















5














virt-install tries to extract kernel and initrd files from the ISO image. With --debug you can see the whole activities of it including loop-mounting, searching for those files, etc.



Starting install...
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (Installer:182) scratchdir=/var/lib/libvirt/boot
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:184) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:65) Attempting to detect distro:
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/.treeinfo
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Fedora
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Server
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Client
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/RedHat
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/CentOS
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/SL
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/directory.yast
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/daily/MANIFEST
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/netboot/version.info
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/initrd.gz
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:990) Doesn't look like an Ubuntu Distro.
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/platform/i86xpv/kernel/unix
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/platform/i86xpv/kernel/unix
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/STARTUP/XNLOADER.SYS
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/pxeboot/vmlinuz
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/boot.iso
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/boot.iso
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/netboot/mini.iso
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/images/boot.iso
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:205) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
[Wed, 03 Jun 2015 07:56:40 virt-install 29692] ERROR (cli:445) Could not find an installable distribution at '/home/yaegashi/debian-8.0.0-amd64-netinst.iso'


I suppose virt-install doesn't support Debian netinst ISO images with --location (but somehow Ubuntu supported?).



To boot a kernel with --extra-args, virt-install needs to have those kernel and corresponding initrd files. --cdrom simply attaches ISO to the guest's CD drive, that's insufficient to work with --extra-args.



If you want use --extra-args, I recommend you to use "netboot" kernel/initrd files by specifying Debian installer URL of your nearest mirror, like --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ as described in the manual.






share|improve this answer
























  • Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

    – Jérôme
    Jun 3 '15 at 16:24











  • That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

    – Rick Chatham
    Sep 30 '15 at 22:12











  • Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

    – Chaim Eliyah
    Apr 17 at 7:42



















6














This method worked for me:



virt-install --name=centos 
--memory=8196 --vcpus=2
--location=/var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1511.iso
--disk /var/lib/libvirt/images/centos7.qcow2,device=disk,bus=virtio,size=8
--network bridge:br0
--os-type=linux
--nographics
--extra-args='console=tty0 console=ttyS0,115200n8 serial'





share|improve this answer



















  • 2





    Personal favourite answer. Very easy presentation for me to understand. Thanks!

    – bitofagoob
    Jun 17 '17 at 11:06











  • This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

    – GeraldScott
    Feb 22 '18 at 2:02





















1














The difference is in the iso files that are used.



It's not related to the way virt-install is used (--location used with http URL versus --location used with path to a local iso file).



Here's a command that works when using the Debian online repositories as --location (including getting output to complete the installation until first boot (then two other steps are necessary to finally get into the new VM, but that's another story):



virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location http://ftp.at.debian.org/debian/dists/stable/main/installer-amd64/ --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


You can take the exact same command, but using the above mentioned Centos ISO file as --location, and it works as well (except that the connection to the serial console does not seem to work at first, but in principle the installation starts using --location and the ISO file):



virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/CentOS-7-x86_64-Minimal-1511.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


Output is:



Starting install...
Retrieving file .treeinfo... | 2.2 kB 00:00 ...
Retrieving file vmlinuz... | 9.8 MB 00:00 ...
Retrieving file initrd.img... | 73 MB 00:00 ...
Creating domain... | 0 B 00:00
Connected to domain test8
Escape character is ^]


But if you use the Debian ISO file for --location, you get the error:



virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/debian-8.5.0-amd64-CD-1.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'

Starting install...
Retrieving file info... | 150 B 00:00 ...
ERROR Could not find an installable distribution at '/softwarestorage/debian-8.5.0-amd64-CD-1.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start test8
otherwise, please restart your installation.


IMHO this proves that there's something missing / anything "wrong" with the Debian ISO (not sure at the moment where i got it from, but maybe someone can download a fresh one and repeat the tests...)






share|improve this answer
























  • I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

    – Dejay Clayton
    Jul 3 '17 at 18:00



















0














It's ugly, especially if you want to use kickstart files, but here's what I did to get this process going:



root@kvm:~# virt-install -n rhce2 -r 2048 --vcpus=1 --os-variant=rhel6 --accelerate -v --disk path=/var/lib/libvirt/images/RHCE2.img,size=100 -l /root/centos6.7.iso -x "ks=./ks1.cfg" --nographics


The basic difference between what I did and what you did is that I used the --location tag (-l for short) to point to my iso.






share|improve this answer
























  • This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

    – carandraug
    Nov 25 '16 at 18:00



















0














recently ran into this issue. Simply used a remote installer with --location. I must emphasise that depending on your virsh version, links for remote installers may be outdated in the man page.



I just followed this example and everything ran smoothly: https://www.packet.com/developers/guides/kvm-and-libvirt/



In my case, I changed 'xenial' for 'bionic' in http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ and the installation went through. Going to use this method every time from now on.






share|improve this answer































    0














    The following worked for me installing Debian 10 from an Ubuntu 16.04 host system:



    cd /usr/share/virt-manager/virtinst/
    patch <<.
    --- urlfetcher.py.orig 2019-07-25 13:54:37.496567791 +1200
    +++ urlfetcher.py 2019-07-25 13:54:43.180373257 +1200
    @@ -663,6 +663,8 @@
    ]
    _hvm_paths = [("pxeboot/vmlinuz",
    "images/pxeboot/initrd.img"), # Fedora
    + ("install.amd/vmlinuz",
    + "install.amd/initrd.gz"), # Debian
    ]
    _iso_paths = ["images/boot.iso", # RH/Fedora
    "boot/boot.iso", # Suse
    .

    virt-install ... --location=/srv/software/Debian/debian-10.0.0-amd64-netinst.iso --extra-args='console=tty0 console=ttyS0,115200n8'





    share|improve this answer


























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f207090%2finstall-vm-from-command-line-with-virt-install%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      6 Answers
      6






      active

      oldest

      votes








      6 Answers
      6






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      5














      virt-install tries to extract kernel and initrd files from the ISO image. With --debug you can see the whole activities of it including loop-mounting, searching for those files, etc.



      Starting install...
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (Installer:182) scratchdir=/var/lib/libvirt/boot
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:184) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:65) Attempting to detect distro:
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/.treeinfo
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Fedora
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Server
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Client
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/RedHat
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/CentOS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/SL
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/directory.yast
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/daily/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/netboot/version.info
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/initrd.gz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:990) Doesn't look like an Ubuntu Distro.
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/STARTUP/XNLOADER.SYS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/pxeboot/vmlinuz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/netboot/mini.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:205) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] ERROR (cli:445) Could not find an installable distribution at '/home/yaegashi/debian-8.0.0-amd64-netinst.iso'


      I suppose virt-install doesn't support Debian netinst ISO images with --location (but somehow Ubuntu supported?).



      To boot a kernel with --extra-args, virt-install needs to have those kernel and corresponding initrd files. --cdrom simply attaches ISO to the guest's CD drive, that's insufficient to work with --extra-args.



      If you want use --extra-args, I recommend you to use "netboot" kernel/initrd files by specifying Debian installer URL of your nearest mirror, like --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ as described in the manual.






      share|improve this answer
























      • Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

        – Jérôme
        Jun 3 '15 at 16:24











      • That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

        – Rick Chatham
        Sep 30 '15 at 22:12











      • Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

        – Chaim Eliyah
        Apr 17 at 7:42
















      5














      virt-install tries to extract kernel and initrd files from the ISO image. With --debug you can see the whole activities of it including loop-mounting, searching for those files, etc.



      Starting install...
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (Installer:182) scratchdir=/var/lib/libvirt/boot
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:184) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:65) Attempting to detect distro:
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/.treeinfo
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Fedora
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Server
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Client
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/RedHat
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/CentOS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/SL
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/directory.yast
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/daily/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/netboot/version.info
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/initrd.gz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:990) Doesn't look like an Ubuntu Distro.
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/STARTUP/XNLOADER.SYS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/pxeboot/vmlinuz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/netboot/mini.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:205) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] ERROR (cli:445) Could not find an installable distribution at '/home/yaegashi/debian-8.0.0-amd64-netinst.iso'


      I suppose virt-install doesn't support Debian netinst ISO images with --location (but somehow Ubuntu supported?).



      To boot a kernel with --extra-args, virt-install needs to have those kernel and corresponding initrd files. --cdrom simply attaches ISO to the guest's CD drive, that's insufficient to work with --extra-args.



      If you want use --extra-args, I recommend you to use "netboot" kernel/initrd files by specifying Debian installer URL of your nearest mirror, like --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ as described in the manual.






      share|improve this answer
























      • Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

        – Jérôme
        Jun 3 '15 at 16:24











      • That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

        – Rick Chatham
        Sep 30 '15 at 22:12











      • Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

        – Chaim Eliyah
        Apr 17 at 7:42














      5












      5








      5







      virt-install tries to extract kernel and initrd files from the ISO image. With --debug you can see the whole activities of it including loop-mounting, searching for those files, etc.



      Starting install...
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (Installer:182) scratchdir=/var/lib/libvirt/boot
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:184) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:65) Attempting to detect distro:
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/.treeinfo
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Fedora
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Server
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Client
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/RedHat
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/CentOS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/SL
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/directory.yast
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/daily/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/netboot/version.info
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/initrd.gz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:990) Doesn't look like an Ubuntu Distro.
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/STARTUP/XNLOADER.SYS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/pxeboot/vmlinuz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/netboot/mini.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:205) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] ERROR (cli:445) Could not find an installable distribution at '/home/yaegashi/debian-8.0.0-amd64-netinst.iso'


      I suppose virt-install doesn't support Debian netinst ISO images with --location (but somehow Ubuntu supported?).



      To boot a kernel with --extra-args, virt-install needs to have those kernel and corresponding initrd files. --cdrom simply attaches ISO to the guest's CD drive, that's insufficient to work with --extra-args.



      If you want use --extra-args, I recommend you to use "netboot" kernel/initrd files by specifying Debian installer URL of your nearest mirror, like --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ as described in the manual.






      share|improve this answer













      virt-install tries to extract kernel and initrd files from the ISO image. With --debug you can see the whole activities of it including loop-mounting, searching for those files, etc.



      Starting install...
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (Installer:182) scratchdir=/var/lib/libvirt/boot
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:184) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:65) Attempting to detect distro:
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/.treeinfo
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Fedora
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Server
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/Client
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/RedHat
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/CentOS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/SL
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/directory.yast
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/daily/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/MANIFEST
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/netboot/version.info
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/initrd.gz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (OSDistro:990) Doesn't look like an Ubuntu Distro.
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/VERSION
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/platform/i86xpv/kernel/unix
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/STARTUP/XNLOADER.SYS
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/pxeboot/vmlinuz
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/boot/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/current/images/netboot/mini.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:169) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.dwcpql/install/images/boot.iso
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] DEBUG (ImageFetcher:205) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.dwcpql
      [Wed, 03 Jun 2015 07:56:40 virt-install 29692] ERROR (cli:445) Could not find an installable distribution at '/home/yaegashi/debian-8.0.0-amd64-netinst.iso'


      I suppose virt-install doesn't support Debian netinst ISO images with --location (but somehow Ubuntu supported?).



      To boot a kernel with --extra-args, virt-install needs to have those kernel and corresponding initrd files. --cdrom simply attaches ISO to the guest's CD drive, that's insufficient to work with --extra-args.



      If you want use --extra-args, I recommend you to use "netboot" kernel/initrd files by specifying Debian installer URL of your nearest mirror, like --location http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ as described in the manual.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Jun 2 '15 at 23:38









      yaegashiyaegashi

      8,8961 gold badge21 silver badges35 bronze badges




      8,8961 gold badge21 silver badges35 bronze badges













      • Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

        – Jérôme
        Jun 3 '15 at 16:24











      • That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

        – Rick Chatham
        Sep 30 '15 at 22:12











      • Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

        – Chaim Eliyah
        Apr 17 at 7:42



















      • Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

        – Jérôme
        Jun 3 '15 at 16:24











      • That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

        – Rick Chatham
        Sep 30 '15 at 22:12











      • Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

        – Chaim Eliyah
        Apr 17 at 7:42

















      Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

      – Jérôme
      Jun 3 '15 at 16:24





      Thanks. Accepting your answer as it looks like there's no simple way but I think this method has issues (question updated accordingly).

      – Jérôme
      Jun 3 '15 at 16:24













      That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

      – Rick Chatham
      Sep 30 '15 at 22:12





      That will certainly work, but I don't think it answers the question of how to install from a local iso, which you might need to do if you don't have internet access.

      – Rick Chatham
      Sep 30 '15 at 22:12













      Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

      – Chaim Eliyah
      Apr 17 at 7:42





      Note that this is not a link to an ISO, it's a link to ... a directory structure known to contain ISOs. Took me a few tries to figure this out. Why this works differently on KVM-Debian than KVM-CentOS (which I just moved from) I have no idea, but this works (still, in 2019).

      – Chaim Eliyah
      Apr 17 at 7:42













      6














      This method worked for me:



      virt-install --name=centos 
      --memory=8196 --vcpus=2
      --location=/var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1511.iso
      --disk /var/lib/libvirt/images/centos7.qcow2,device=disk,bus=virtio,size=8
      --network bridge:br0
      --os-type=linux
      --nographics
      --extra-args='console=tty0 console=ttyS0,115200n8 serial'





      share|improve this answer



















      • 2





        Personal favourite answer. Very easy presentation for me to understand. Thanks!

        – bitofagoob
        Jun 17 '17 at 11:06











      • This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

        – GeraldScott
        Feb 22 '18 at 2:02


















      6














      This method worked for me:



      virt-install --name=centos 
      --memory=8196 --vcpus=2
      --location=/var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1511.iso
      --disk /var/lib/libvirt/images/centos7.qcow2,device=disk,bus=virtio,size=8
      --network bridge:br0
      --os-type=linux
      --nographics
      --extra-args='console=tty0 console=ttyS0,115200n8 serial'





      share|improve this answer



















      • 2





        Personal favourite answer. Very easy presentation for me to understand. Thanks!

        – bitofagoob
        Jun 17 '17 at 11:06











      • This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

        – GeraldScott
        Feb 22 '18 at 2:02
















      6












      6








      6







      This method worked for me:



      virt-install --name=centos 
      --memory=8196 --vcpus=2
      --location=/var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1511.iso
      --disk /var/lib/libvirt/images/centos7.qcow2,device=disk,bus=virtio,size=8
      --network bridge:br0
      --os-type=linux
      --nographics
      --extra-args='console=tty0 console=ttyS0,115200n8 serial'





      share|improve this answer













      This method worked for me:



      virt-install --name=centos 
      --memory=8196 --vcpus=2
      --location=/var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1511.iso
      --disk /var/lib/libvirt/images/centos7.qcow2,device=disk,bus=virtio,size=8
      --network bridge:br0
      --os-type=linux
      --nographics
      --extra-args='console=tty0 console=ttyS0,115200n8 serial'






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered May 31 '16 at 19:41









      Roman DodinRoman Dodin

      611 silver badge3 bronze badges




      611 silver badge3 bronze badges








      • 2





        Personal favourite answer. Very easy presentation for me to understand. Thanks!

        – bitofagoob
        Jun 17 '17 at 11:06











      • This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

        – GeraldScott
        Feb 22 '18 at 2:02
















      • 2





        Personal favourite answer. Very easy presentation for me to understand. Thanks!

        – bitofagoob
        Jun 17 '17 at 11:06











      • This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

        – GeraldScott
        Feb 22 '18 at 2:02










      2




      2





      Personal favourite answer. Very easy presentation for me to understand. Thanks!

      – bitofagoob
      Jun 17 '17 at 11:06





      Personal favourite answer. Very easy presentation for me to understand. Thanks!

      – bitofagoob
      Jun 17 '17 at 11:06













      This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

      – GeraldScott
      Feb 22 '18 at 2:02







      This works great with Centos, but it does not work with Debian or Ubuntu ISO files. You will get the same problem as described in the original question. The solution is to specify a URL to the location of an installer --location ftp.us.debian.org/debian/dists/stable/main/installer-amd64

      – GeraldScott
      Feb 22 '18 at 2:02













      1














      The difference is in the iso files that are used.



      It's not related to the way virt-install is used (--location used with http URL versus --location used with path to a local iso file).



      Here's a command that works when using the Debian online repositories as --location (including getting output to complete the installation until first boot (then two other steps are necessary to finally get into the new VM, but that's another story):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location http://ftp.at.debian.org/debian/dists/stable/main/installer-amd64/ --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      You can take the exact same command, but using the above mentioned Centos ISO file as --location, and it works as well (except that the connection to the serial console does not seem to work at first, but in principle the installation starts using --location and the ISO file):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/CentOS-7-x86_64-Minimal-1511.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      Output is:



      Starting install...
      Retrieving file .treeinfo... | 2.2 kB 00:00 ...
      Retrieving file vmlinuz... | 9.8 MB 00:00 ...
      Retrieving file initrd.img... | 73 MB 00:00 ...
      Creating domain... | 0 B 00:00
      Connected to domain test8
      Escape character is ^]


      But if you use the Debian ISO file for --location, you get the error:



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/debian-8.5.0-amd64-CD-1.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'

      Starting install...
      Retrieving file info... | 150 B 00:00 ...
      ERROR Could not find an installable distribution at '/softwarestorage/debian-8.5.0-amd64-CD-1.iso'
      The location must be the root directory of an install tree.
      Domain installation does not appear to have been successful.
      If it was, you can restart your domain by running:
      virsh --connect qemu:///system start test8
      otherwise, please restart your installation.


      IMHO this proves that there's something missing / anything "wrong" with the Debian ISO (not sure at the moment where i got it from, but maybe someone can download a fresh one and repeat the tests...)






      share|improve this answer
























      • I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

        – Dejay Clayton
        Jul 3 '17 at 18:00
















      1














      The difference is in the iso files that are used.



      It's not related to the way virt-install is used (--location used with http URL versus --location used with path to a local iso file).



      Here's a command that works when using the Debian online repositories as --location (including getting output to complete the installation until first boot (then two other steps are necessary to finally get into the new VM, but that's another story):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location http://ftp.at.debian.org/debian/dists/stable/main/installer-amd64/ --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      You can take the exact same command, but using the above mentioned Centos ISO file as --location, and it works as well (except that the connection to the serial console does not seem to work at first, but in principle the installation starts using --location and the ISO file):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/CentOS-7-x86_64-Minimal-1511.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      Output is:



      Starting install...
      Retrieving file .treeinfo... | 2.2 kB 00:00 ...
      Retrieving file vmlinuz... | 9.8 MB 00:00 ...
      Retrieving file initrd.img... | 73 MB 00:00 ...
      Creating domain... | 0 B 00:00
      Connected to domain test8
      Escape character is ^]


      But if you use the Debian ISO file for --location, you get the error:



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/debian-8.5.0-amd64-CD-1.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'

      Starting install...
      Retrieving file info... | 150 B 00:00 ...
      ERROR Could not find an installable distribution at '/softwarestorage/debian-8.5.0-amd64-CD-1.iso'
      The location must be the root directory of an install tree.
      Domain installation does not appear to have been successful.
      If it was, you can restart your domain by running:
      virsh --connect qemu:///system start test8
      otherwise, please restart your installation.


      IMHO this proves that there's something missing / anything "wrong" with the Debian ISO (not sure at the moment where i got it from, but maybe someone can download a fresh one and repeat the tests...)






      share|improve this answer
























      • I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

        – Dejay Clayton
        Jul 3 '17 at 18:00














      1












      1








      1







      The difference is in the iso files that are used.



      It's not related to the way virt-install is used (--location used with http URL versus --location used with path to a local iso file).



      Here's a command that works when using the Debian online repositories as --location (including getting output to complete the installation until first boot (then two other steps are necessary to finally get into the new VM, but that's another story):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location http://ftp.at.debian.org/debian/dists/stable/main/installer-amd64/ --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      You can take the exact same command, but using the above mentioned Centos ISO file as --location, and it works as well (except that the connection to the serial console does not seem to work at first, but in principle the installation starts using --location and the ISO file):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/CentOS-7-x86_64-Minimal-1511.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      Output is:



      Starting install...
      Retrieving file .treeinfo... | 2.2 kB 00:00 ...
      Retrieving file vmlinuz... | 9.8 MB 00:00 ...
      Retrieving file initrd.img... | 73 MB 00:00 ...
      Creating domain... | 0 B 00:00
      Connected to domain test8
      Escape character is ^]


      But if you use the Debian ISO file for --location, you get the error:



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/debian-8.5.0-amd64-CD-1.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'

      Starting install...
      Retrieving file info... | 150 B 00:00 ...
      ERROR Could not find an installable distribution at '/softwarestorage/debian-8.5.0-amd64-CD-1.iso'
      The location must be the root directory of an install tree.
      Domain installation does not appear to have been successful.
      If it was, you can restart your domain by running:
      virsh --connect qemu:///system start test8
      otherwise, please restart your installation.


      IMHO this proves that there's something missing / anything "wrong" with the Debian ISO (not sure at the moment where i got it from, but maybe someone can download a fresh one and repeat the tests...)






      share|improve this answer













      The difference is in the iso files that are used.



      It's not related to the way virt-install is used (--location used with http URL versus --location used with path to a local iso file).



      Here's a command that works when using the Debian online repositories as --location (including getting output to complete the installation until first boot (then two other steps are necessary to finally get into the new VM, but that's another story):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location http://ftp.at.debian.org/debian/dists/stable/main/installer-amd64/ --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      You can take the exact same command, but using the above mentioned Centos ISO file as --location, and it works as well (except that the connection to the serial console does not seem to work at first, but in principle the installation starts using --location and the ISO file):



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/CentOS-7-x86_64-Minimal-1511.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'


      Output is:



      Starting install...
      Retrieving file .treeinfo... | 2.2 kB 00:00 ...
      Retrieving file vmlinuz... | 9.8 MB 00:00 ...
      Retrieving file initrd.img... | 73 MB 00:00 ...
      Creating domain... | 0 B 00:00
      Connected to domain test8
      Escape character is ^]


      But if you use the Debian ISO file for --location, you get the error:



      virt-install --virt-type kvm --name test8 --memory 2048 --disk path=/var/lib/libvirt/images/test8-1.qcow2,size=5 --disk path=/var/lib/libvirt/images/test8-2.qcow2,size=2 --location /softwarestorage/debian-8.5.0-amd64-CD-1.iso --graphics none --extra-args='console tty0 console=ttyS0,115200n8 serial'

      Starting install...
      Retrieving file info... | 150 B 00:00 ...
      ERROR Could not find an installable distribution at '/softwarestorage/debian-8.5.0-amd64-CD-1.iso'
      The location must be the root directory of an install tree.
      Domain installation does not appear to have been successful.
      If it was, you can restart your domain by running:
      virsh --connect qemu:///system start test8
      otherwise, please restart your installation.


      IMHO this proves that there's something missing / anything "wrong" with the Debian ISO (not sure at the moment where i got it from, but maybe someone can download a fresh one and repeat the tests...)







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 5 '16 at 14:56









      pndapnda

      111 bronze badge




      111 bronze badge













      • I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

        – Dejay Clayton
        Jul 3 '17 at 18:00



















      • I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

        – Dejay Clayton
        Jul 3 '17 at 18:00

















      I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

      – Dejay Clayton
      Jul 3 '17 at 18:00





      I think you are... very much wrong. In your first example, you're specifying an FTP location, and in your second example, you're specifying a local ISO file. These two approaches differ because with FTP and HTTP URLs, virt-install can "walk" the directory structure looking for initrd.img and kernel.img. With a local ISO, virst-install must first mount the ISO to walk the directory structure, and of course, mount requires root access to mount arbitrary (non-fstab) locations.

      – Dejay Clayton
      Jul 3 '17 at 18:00











      0














      It's ugly, especially if you want to use kickstart files, but here's what I did to get this process going:



      root@kvm:~# virt-install -n rhce2 -r 2048 --vcpus=1 --os-variant=rhel6 --accelerate -v --disk path=/var/lib/libvirt/images/RHCE2.img,size=100 -l /root/centos6.7.iso -x "ks=./ks1.cfg" --nographics


      The basic difference between what I did and what you did is that I used the --location tag (-l for short) to point to my iso.






      share|improve this answer
























      • This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

        – carandraug
        Nov 25 '16 at 18:00
















      0














      It's ugly, especially if you want to use kickstart files, but here's what I did to get this process going:



      root@kvm:~# virt-install -n rhce2 -r 2048 --vcpus=1 --os-variant=rhel6 --accelerate -v --disk path=/var/lib/libvirt/images/RHCE2.img,size=100 -l /root/centos6.7.iso -x "ks=./ks1.cfg" --nographics


      The basic difference between what I did and what you did is that I used the --location tag (-l for short) to point to my iso.






      share|improve this answer
























      • This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

        – carandraug
        Nov 25 '16 at 18:00














      0












      0








      0







      It's ugly, especially if you want to use kickstart files, but here's what I did to get this process going:



      root@kvm:~# virt-install -n rhce2 -r 2048 --vcpus=1 --os-variant=rhel6 --accelerate -v --disk path=/var/lib/libvirt/images/RHCE2.img,size=100 -l /root/centos6.7.iso -x "ks=./ks1.cfg" --nographics


      The basic difference between what I did and what you did is that I used the --location tag (-l for short) to point to my iso.






      share|improve this answer













      It's ugly, especially if you want to use kickstart files, but here's what I did to get this process going:



      root@kvm:~# virt-install -n rhce2 -r 2048 --vcpus=1 --os-variant=rhel6 --accelerate -v --disk path=/var/lib/libvirt/images/RHCE2.img,size=100 -l /root/centos6.7.iso -x "ks=./ks1.cfg" --nographics


      The basic difference between what I did and what you did is that I used the --location tag (-l for short) to point to my iso.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Sep 30 '15 at 22:10









      Rick ChathamRick Chatham

      1096 bronze badges




      1096 bronze badges













      • This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

        – carandraug
        Nov 25 '16 at 18:00



















      • This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

        – carandraug
        Nov 25 '16 at 18:00

















      This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

      – carandraug
      Nov 25 '16 at 18:00





      This is very much wrong. The difference is that he's installing from debian netinstall iso file and you are installing RHCE2.

      – carandraug
      Nov 25 '16 at 18:00











      0














      recently ran into this issue. Simply used a remote installer with --location. I must emphasise that depending on your virsh version, links for remote installers may be outdated in the man page.



      I just followed this example and everything ran smoothly: https://www.packet.com/developers/guides/kvm-and-libvirt/



      In my case, I changed 'xenial' for 'bionic' in http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ and the installation went through. Going to use this method every time from now on.






      share|improve this answer




























        0














        recently ran into this issue. Simply used a remote installer with --location. I must emphasise that depending on your virsh version, links for remote installers may be outdated in the man page.



        I just followed this example and everything ran smoothly: https://www.packet.com/developers/guides/kvm-and-libvirt/



        In my case, I changed 'xenial' for 'bionic' in http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ and the installation went through. Going to use this method every time from now on.






        share|improve this answer


























          0












          0








          0







          recently ran into this issue. Simply used a remote installer with --location. I must emphasise that depending on your virsh version, links for remote installers may be outdated in the man page.



          I just followed this example and everything ran smoothly: https://www.packet.com/developers/guides/kvm-and-libvirt/



          In my case, I changed 'xenial' for 'bionic' in http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ and the installation went through. Going to use this method every time from now on.






          share|improve this answer













          recently ran into this issue. Simply used a remote installer with --location. I must emphasise that depending on your virsh version, links for remote installers may be outdated in the man page.



          I just followed this example and everything ran smoothly: https://www.packet.com/developers/guides/kvm-and-libvirt/



          In my case, I changed 'xenial' for 'bionic' in http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ and the installation went through. Going to use this method every time from now on.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 10 '18 at 15:27









          L_SRL_SR

          11 bronze badge




          11 bronze badge























              0














              The following worked for me installing Debian 10 from an Ubuntu 16.04 host system:



              cd /usr/share/virt-manager/virtinst/
              patch <<.
              --- urlfetcher.py.orig 2019-07-25 13:54:37.496567791 +1200
              +++ urlfetcher.py 2019-07-25 13:54:43.180373257 +1200
              @@ -663,6 +663,8 @@
              ]
              _hvm_paths = [("pxeboot/vmlinuz",
              "images/pxeboot/initrd.img"), # Fedora
              + ("install.amd/vmlinuz",
              + "install.amd/initrd.gz"), # Debian
              ]
              _iso_paths = ["images/boot.iso", # RH/Fedora
              "boot/boot.iso", # Suse
              .

              virt-install ... --location=/srv/software/Debian/debian-10.0.0-amd64-netinst.iso --extra-args='console=tty0 console=ttyS0,115200n8'





              share|improve this answer




























                0














                The following worked for me installing Debian 10 from an Ubuntu 16.04 host system:



                cd /usr/share/virt-manager/virtinst/
                patch <<.
                --- urlfetcher.py.orig 2019-07-25 13:54:37.496567791 +1200
                +++ urlfetcher.py 2019-07-25 13:54:43.180373257 +1200
                @@ -663,6 +663,8 @@
                ]
                _hvm_paths = [("pxeboot/vmlinuz",
                "images/pxeboot/initrd.img"), # Fedora
                + ("install.amd/vmlinuz",
                + "install.amd/initrd.gz"), # Debian
                ]
                _iso_paths = ["images/boot.iso", # RH/Fedora
                "boot/boot.iso", # Suse
                .

                virt-install ... --location=/srv/software/Debian/debian-10.0.0-amd64-netinst.iso --extra-args='console=tty0 console=ttyS0,115200n8'





                share|improve this answer


























                  0












                  0








                  0







                  The following worked for me installing Debian 10 from an Ubuntu 16.04 host system:



                  cd /usr/share/virt-manager/virtinst/
                  patch <<.
                  --- urlfetcher.py.orig 2019-07-25 13:54:37.496567791 +1200
                  +++ urlfetcher.py 2019-07-25 13:54:43.180373257 +1200
                  @@ -663,6 +663,8 @@
                  ]
                  _hvm_paths = [("pxeboot/vmlinuz",
                  "images/pxeboot/initrd.img"), # Fedora
                  + ("install.amd/vmlinuz",
                  + "install.amd/initrd.gz"), # Debian
                  ]
                  _iso_paths = ["images/boot.iso", # RH/Fedora
                  "boot/boot.iso", # Suse
                  .

                  virt-install ... --location=/srv/software/Debian/debian-10.0.0-amd64-netinst.iso --extra-args='console=tty0 console=ttyS0,115200n8'





                  share|improve this answer













                  The following worked for me installing Debian 10 from an Ubuntu 16.04 host system:



                  cd /usr/share/virt-manager/virtinst/
                  patch <<.
                  --- urlfetcher.py.orig 2019-07-25 13:54:37.496567791 +1200
                  +++ urlfetcher.py 2019-07-25 13:54:43.180373257 +1200
                  @@ -663,6 +663,8 @@
                  ]
                  _hvm_paths = [("pxeboot/vmlinuz",
                  "images/pxeboot/initrd.img"), # Fedora
                  + ("install.amd/vmlinuz",
                  + "install.amd/initrd.gz"), # Debian
                  ]
                  _iso_paths = ["images/boot.iso", # RH/Fedora
                  "boot/boot.iso", # Suse
                  .

                  virt-install ... --location=/srv/software/Debian/debian-10.0.0-amd64-netinst.iso --extra-args='console=tty0 console=ttyS0,115200n8'






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 46 mins ago









                  Neil StockbridgeNeil Stockbridge

                  1214 bronze badges




                  1214 bronze badges






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f207090%2finstall-vm-from-command-line-with-virt-install%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                      Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                      Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...