Below command work well for standard iso provided by Ubuntu but facing issue when customize iso is used.
virt-install --name=vm--vcpu=18 --ram=65536 --location=/home/customize.iso --network bridge=br0 --network bridge=br0 --disk path=/VMs/harddisk/vm.img -x "console=ttyS0" --nographics -v --debug
Debug log:
Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (cli:265) Launched with command line: /usr/share/virt-manager/virt-install --name=test --vcpu=18 --ram=65536 --location=/var/lib/libvirt/images/test-0_2_4.iso --network bridge=br0 --network bridge=br0 --disk path=/VMs/wdcsbm/wdcsbm.img -x console=ttyS0 --nographics -v --debug [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (cli:279) Requesting libvirt URI default [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (cli:282) Received libvirt URI qemu:///system [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (virt-install:358) Requesting virt method 'hvm', hv type 'default'. [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (virt-install:583) Received virt method 'kvm' [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (virt-install:584) Hypervisor name is 'hvm' [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (virt-install:270) Distilled --network options: ['bridge=br0', 'bridge=br0'] [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (virt-install:316) --graphics compat generated: none [Thu, 07 Mar 2019 05:17:54 virt-install 17496] DEBUG (virt-install:183) Distilled --disk options: ['path=/VMs/test/test.img'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (distroinstaller:283) installer.detect_distro returned=None [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (guest:251) Setting Guest.os_variant to 'None' [Thu, 07 Mar 2019 05:17:55 virt-install 17496] WARNING (virt-install:545) No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results. [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (virt-install:697) Guest.has_install_phase: True
Starting install... [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:56) Using scratchdir=/var/lib/libvirt/boot [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:503) Finding distro store for location=/var/lib/libvirt/images/test-0_2_4.iso [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/var/lib/libvirt/images/test-0_2_4.iso', '-x', '/.treeinfo'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:89) Fetching URI: /.treeinfo Retrieving file .treeinfo... | 0 B 00:00:00 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:164) Saved file to /var/lib/libvirt/boot/virtinst-.treeinfo.d9lSWN [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:404) Did not find 'family' section in treeinfo [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/var/lib/libvirt/images/test-0_2_4.iso', '-x', '/content'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:89) Fetching URI: /content Retrieving file content... | 0 B 00:00:00 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:1144) No treearch found in uri, defaulting to arch=i386 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:357) Running isoinfo: ['isoinfo', '-J', '-i', '/var/lib/libvirt/images/test-0_2_4.iso', '-f'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/current/images/MANIFEST) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/daily/MANIFEST) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/.disk/info) returning True [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/var/lib/libvirt/images/test-0_2_4.iso', '-x', '/.disk/info'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:89) Fetching URI: /.disk/info Retrieving file info... | 51 B 00:00:00 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:1191) Regex didn't match, not a Debian distro [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/Fedora) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/SL) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/CentOS) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/VERSION) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/.disk/info) returning True [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/var/lib/libvirt/images/test-0_2_4.iso', '-x', '/.disk/info'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:89) Fetching URI: /.disk/info Retrieving file info... | 51 B 00:00:00 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:1378) Regex didn't match, not a ALT Linux distro [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:1144) No treearch found in uri, defaulting to arch=i386 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/current/images/MANIFEST) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/daily/MANIFEST) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/.disk/info) returning True [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:345) Running isoinfo: ['isoinfo', '-J', '-i', '/var/lib/libvirt/images/test-0_2_4.iso', '-x', '/.disk/info'] [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:89) Fetching URI: /.disk/info Retrieving file info... | 51 B 00:00:00 [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:1191) Regex didn't match, not a Ubuntu distro [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/Server) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/Client) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/RedHat) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/images/pxeboot/vmlinuz) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/ppc/ppc64/vmlinuz) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/images/boot.iso) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/boot/boot.iso) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/current/images/netboot/mini.iso) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/install/images/boot.iso) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (urlfetcher:144) hasFile(/) returning False [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (cli:317) File "/usr/share/virt-manager/virt-install", line 1008, in sys.exit(main()) File "/usr/share/virt-manager/virt-install", line 1002, in main start_install(guest, options) File "/usr/share/virt-manager/virt-install", line 728, in start_install fail(e, do_exit=False) File "/usr/share/virt-manager/virtinst/cli.py", line 317, in fail logging.debug("".join(traceback.format_stack()))
[Thu, 07 Mar 2019 05:17:55 virt-install 17496] ERROR (cli:318) Could not find an installable distribution at '/var/lib/libvirt/images/test-0_2_4.iso': The URL could not be accessed, maybe you mistyped?
The location must be the root directory of an install tree. See virt-install man page for various distro examples. [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (cli:320) Traceback (most recent call last): File "/usr/share/virt-manager/virt-install", line 707, in start_install transient=options.transient) File "/usr/share/virt-manager/virtinst/guest.py", line 480, in start_install self._prepare_install(meter, dry) File "/usr/share/virt-manager/virtinst/guest.py", line 313, in _prepare_install self.installer.prepare(self, meter) File "/usr/share/virt-manager/virtinst/installer.py", line 200, in prepare self._prepare(guest, meter) File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 220, in _prepare self._prepare_kernel_url(guest, fetcher) File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 127, in _prepare_kernel_url store = self._get_store(guest, fetcher) File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 114, in _get_store self._cached_store = urlfetcher.getDistroStore(guest, fetcher) File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 559, in getDistroStore (fetcher.location, extramsg))) ValueError: Could not find an installable distribution at '/var/lib/libvirt/images/test-0_2_4.iso': The URL could not be accessed, maybe you mistyped?
The location must be the root directory of an install tree. See virt-install man page for various distro examples. [Thu, 07 Mar 2019 05:17:55 virt-install 17496] DEBUG (cli:331) Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start wdcsbm 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 wdcsbm otherwise, please restart your installation. root@kvm01:/media/cdrom#
Any help from anyone will be appreciated.