Public bug reported:

It looks like no way to force disk size overcommit in utopic.

$ virt-install --noautoconsole --name test --ram 512 --boot hd --disk 
pool=default,size=2048,format=qcow2
WARNING  KVM acceleration not available, using 'qemu'
WARNING  The requested volume capacity will exceed the available pool space 
when the volume is fully allocated. (2097152 M requested capacity > 49161 M 
available)
ERROR    Error: --disk pool=default,size=2048,format=qcow2: There is not enough 
free space on the storage pool to create the volume. (2097152 M requested 
allocation > 49161 M available)

[with --force and --debug]
$ virt-install --noautoconsole --name test --ram 512 --boot hd --disk 
pool=default,size=2048,format=qcow2 --debug --force
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (cli:187) Launched with 
command line: /usr/share/virt-manager/virt-install --noautoconsole --name test 
--ram 512 --boot hd --disk pool=default,size=2048,format=qcow2 --debug --force
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (cli:195) Requesting 
libvirt URI default
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (cli:199) Received libvirt 
URI qemu:///system
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (virt-install:193) 
Requesting virt method 'default', hv type 'default'.
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (virt-install:432) 
Received virt method 'kvm'
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (virt-install:433) 
Hypervisor name is 'hvm'
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (diskbackend:172) Path '' 
is target for pool 'default'. Creating volume 'test.qcow2'.
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] WARNING (storage:618) The 
requested volume capacity will exceed the available pool space when the volume 
is fully allocated. (2097152 M requested capacity > 47383 M available)
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (cli:1155) Exception 
parsing inst=None optstr=pool=default,size=2048,format=qcow2
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtinst/cli.py", line 1141, in parse
    devs = self._parse_single_optstr(guest, optstr, optinst)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1200, in 
_parse_single_optstr
    return self._parse(opts, inst)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1692, in _parse
    self.guest, path, pool, vol, size, fmt, sparse)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1596, in 
_parse_disk_source
    guest.conn, vname, poolobj, size, sparse)
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 447, in 
build_vol_install
    return diskbackend.build_vol_install(*args, **kwargs)
  File "/usr/share/virt-manager/virtinst/diskbackend.py", line 184, in 
build_vol_install
    volinst.allocation = alloc
  File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 618, in setter
    self._validate_cb(xmlbuilder, val)
  File "/usr/share/virt-manager/virtinst/storage.py", line 608, in 
_validate_allocation
    raise ValueError(ret[1])
ValueError: There is not enough free space on the storage pool to create the 
volume. (2097152 M requested allocation > 47383 M available)
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] 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 861, in main
    guest = build_guest_instance(conn, options, parsermap)
  File "/usr/share/virt-manager/virt-install", line 463, in build_guest_instance
    cli.parse_option_strings(parsermap, options, guest, None)
  File "/usr/share/virt-manager/virtinst/cli.py", line 2270, in 
parse_option_strings
    validate=not update)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1158, in parse
    "options": optstr, "err": str(e)})
  File "/usr/share/virt-manager/virtinst/cli.py", line 234, in fail
    logging.debug("".join(traceback.format_stack()))

[Fri, 08 Aug 2014 12:57:28 virt-install 13258] ERROR (cli:235) Error: --disk 
pool=default,size=2048,format=qcow2: There is not enough free space on the 
storage pool to create the volume. (2097152 M requested allocation > 47383 M 
available)
[Fri, 08 Aug 2014 12:57:28 virt-install 13258] DEBUG (cli:237) 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtinst/cli.py", line 1141, in parse
    devs = self._parse_single_optstr(guest, optstr, optinst)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1200, in 
_parse_single_optstr
    return self._parse(opts, inst)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1692, in _parse
    self.guest, path, pool, vol, size, fmt, sparse)
  File "/usr/share/virt-manager/virtinst/cli.py", line 1596, in 
_parse_disk_source
    guest.conn, vname, poolobj, size, sparse)
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 447, in 
build_vol_install
    return diskbackend.build_vol_install(*args, **kwargs)
  File "/usr/share/virt-manager/virtinst/diskbackend.py", line 184, in 
build_vol_install
    volinst.allocation = alloc
  File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 618, in setter
    self._validate_cb(xmlbuilder, val)
  File "/usr/share/virt-manager/virtinst/storage.py", line 608, in 
_validate_allocation
    raise ValueError(ret[1])
ValueError: There is not enough free space on the storage pool to create the 
volume. (2097152 M requested allocation > 47383 M available)


In trusty version, there was a way to overcommit with "--force".

$ virt-install --noautoconsole --name test --ram 512 --boot hd --disk 
pool=default,size=2048,format=qcow2 
ERROR    The requested volume capacity will exceed the available pool space 
when the volume is fully allocated. (2097152 M requested capacity > 716
1 M available) (Use --prompt or --force to override)

$ virt-install --noautoconsole --name test --ram 512 --boot hd --disk 
pool=default,size=2048,format=qcow2 --force
WARNING  The requested volume capacity will exceed the available pool space 
when the volume is fully allocated. (2097152 M requested capacity > 7161 M 
available)

Starting install...
Allocating 'test.img'                                                           
                                            | 2.0 TB     00:00     
Creating domain...                                                              
                                            |    0 B     00:00     
Domain creation completed. You can restart your domain by running:
  virsh --connect qemu:///system start test

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: virtinst 1:1.0.1-0ubuntu2
ProcVersionSignature: Ubuntu 3.16.0-6.11-generic 3.16.0-rc7
Uname: Linux 3.16.0-6-generic x86_64
ApportVersion: 2.14.5-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Aug  8 12:49:40 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-05-19 (81 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140518)
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: virt-manager (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug utopic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1354263

Title:
  [virt-install] no way to force disk size overcommit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/1354263/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to