addhw: Make disk page look more like create wizard storage page

This commit is contained in:
Cole Robinson 2010-03-04 15:35:34 -05:00
parent 4d4f34e596
commit 4af71fc07e
2 changed files with 372 additions and 651 deletions

View File

@ -18,7 +18,6 @@
# MA 02110-1301 USA.
#
import os
import logging
import traceback
@ -94,6 +93,9 @@ class vmmAddHardware(gobject.GObject):
self.storage_browser = None
# Host space polling
self.host_storage_timer = None
self._dev = None
self.topwin.hide()
@ -108,10 +110,8 @@ class vmmAddHardware(gobject.GObject):
"on_hardware_type_changed" : self.hardware_type_changed,
"on_storage_partition_address_browse_clicked" : self.browse_storage_partition_address,
"on_storage_file_address_browse_clicked" : self.browse_storage_file_address,
"on_storage_file_address_changed": self.toggle_storage_size,
"on_storage_toggled" : self.change_storage_type,
"on_config_storage_browse_clicked": self.browse_storage,
"on_config_storage_select_toggled": self.toggle_storage_select,
"on_mac_address_clicked" : self.change_macaddr_use,
@ -170,8 +170,17 @@ class vmmAddHardware(gobject.GObject):
def close(self, ignore1=None,ignore2=None):
self.topwin.hide()
self.remove_timers()
return 1
def remove_timers(self):
try:
if self.host_storage_timer:
gobject.source_remove(self.host_storage_timer)
self.host_storage_timer = None
except:
pass
def is_visible(self):
if self.topwin.flags() & gtk.VISIBLE:
return 1
@ -219,7 +228,7 @@ class vmmAddHardware(gobject.GObject):
netmodel_list.add_attribute(text, 'text', 1)
# Disk device type / bus
target_list = self.window.get_widget("target-device")
target_list = self.window.get_widget("config-storage-devtype")
target_model = gtk.ListStore(str, str, str, str, int)
target_list.set_model(target_model)
icon = gtk.CellRendererPixbuf()
@ -231,6 +240,10 @@ class vmmAddHardware(gobject.GObject):
target_list.pack_start(text, True)
target_list.add_attribute(text, 'text', 3)
# Sparse tooltip
sparse_info = self.window.get_widget("config-storage-nosparse-info")
uihelpers.set_sparse_tooltip(sparse_info)
# Input device type
input_list = self.window.get_widget("input-type")
input_model = gtk.ListStore(str, str, str, bool)
@ -305,6 +318,9 @@ class vmmAddHardware(gobject.GObject):
self.window.get_widget("char-info-box").modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("grey"))
def reset_state(self):
is_local = not self.conn.is_remote()
is_storage_capable = self.conn.is_storage_capable()
notebook = self.window.get_widget("create-pages")
notebook.set_current_page(0)
@ -313,24 +329,30 @@ class vmmAddHardware(gobject.GObject):
self.window.get_widget("create-forward").show()
self.window.get_widget("create-forward").grab_focus()
self.window.get_widget("create-back").set_sensitive(False)
self.window.get_widget("storage-file-size").set_sensitive(False)
self.window.get_widget("create-help").hide()
# Storage init
self.change_storage_type()
if os.getuid() == 0:
self.window.get_widget("storage-partition").set_active(True)
else:
self.window.get_widget("storage-file-backed").set_active(True)
self.window.get_widget("storage-partition-address").set_text("")
self.window.get_widget("storage-file-address").set_text("")
self.window.get_widget("storage-file-size").set_value(4000)
self.window.get_widget("non-sparse").set_active(True)
target_list = self.window.get_widget("target-device")
label_widget = self.window.get_widget("phys-hd-label")
if not self.host_storage_timer:
self.host_storage_timer = util.safe_timeout_add(3 * 1000,
uihelpers.host_space_tick,
self.conn, self.config,
label_widget)
self.window.get_widget("config-storage-create").set_active(True)
self.window.get_widget("config-storage-size").set_value(8)
self.window.get_widget("config-storage-entry").set_text("")
self.window.get_widget("config-storage-nosparse").set_active(True)
target_list = self.window.get_widget("config-storage-devtype")
self.populate_target_device_model(target_list.get_model())
if len(target_list.get_model()) > 0:
target_list.set_active(0)
have_storage = (is_local or is_storage_capable)
storage_tooltip = None
if not have_storage:
storage_tooltip = _("Connection does not support storage"
" management.")
# Network init
newmac = uihelpers.generate_macaddr(self.vm.get_connection())
self.window.get_widget("mac-address").set_active(bool(newmac))
@ -397,7 +419,8 @@ class vmmAddHardware(gobject.GObject):
def add_hw_option(name, icon, page, sensitive, tooltip):
model.append([name, icon, page, sensitive, tooltip])
add_hw_option("Storage", "drive-harddisk", PAGE_DISK, True, None)
add_hw_option("Storage", "drive-harddisk", PAGE_DISK, have_storage,
have_storage and storage_tooltip or None)
add_hw_option("Network", "network-idle", PAGE_NETWORK, True, None)
add_hw_option("Input", "input-mouse", PAGE_INPUT, self.vm.is_hvm(),
_("Not supported for this guest type."))
@ -525,42 +548,33 @@ class vmmAddHardware(gobject.GObject):
return _type.get_model().get_value(_type.get_active_iter(), 2)
# Disk getters
def get_config_disk_image(self):
if self.window.get_widget("storage-partition").get_active():
return self.window.get_widget("storage-partition-address").get_text()
else:
return self.window.get_widget("storage-file-address").get_text()
def is_default_storage(self):
return self.window.get_widget("config-storage-create").get_active()
def get_config_partition_size(self):
try:
d = virtinst.VirtualDisk(conn=self.conn.vmm,
path=self.get_config_disk_image(),
readOnly=True)
return int(d.size * 1024) or None
except:
return None
def get_storage_info(self):
path = None
size = self.window.get_widget("config-storage-size").get_value()
sparse = not self.window.get_widget("config-storage-nosparse").get_active()
def get_config_disk_size(self):
if self.window.get_widget("storage-partition").get_active():
return self.get_config_partition_size()
if not self.window.get_widget("storage-file-backed").get_active():
return None
if not self.window.get_widget("storage-file-size").get_editable():
return None
if self.is_default_storage():
path = util.get_default_path(self.conn, self.config,
self.vm.get_name())
logging.debug("Default storage path is: %s" % path)
else:
return self.window.get_widget("storage-file-size").get_value()
path = self.window.get_widget("config-storage-entry").get_text()
return (path, size, sparse)
def get_config_disk_target(self):
target = self.window.get_widget("target-device")
bus = target.get_model().get_value(target.get_active_iter(), 0)
device = target.get_model().get_value(target.get_active_iter(), 1)
return bus, device
target = self.window.get_widget("config-storage-devtype")
model = target.get_model()
idx = target.get_active()
if idx == -1:
return None, None
def is_sparse_file(self):
if self.window.get_widget("non-sparse").get_active():
return False
else:
return True
bus = model[idx][0]
device = model[idx][1]
return bus, device
# Input getters
def get_config_input(self):
@ -748,14 +762,14 @@ class vmmAddHardware(gobject.GObject):
summary_table.show_all()
if hwpage == PAGE_DISK:
size = self.get_config_disk_size()
bus, target = self.get_config_disk_target()
size_str = (self._dev.size and ("%2.2f GB" % self._dev.size)
or "-")
info_list = [
(_("Disk image:"), self.get_config_disk_image()),
(_("Disk size:"), size != None and "%s MB" % size or "-"),
(_("Device type:"), target),
(_("Bus type:"), bus),
(_("Disk image:"), self._dev.path),
(_("Disk size:"), size_str),
(_("Device type:"), self._dev.device),
(_("Bus type:"), self._dev.bus),
]
title = _("Storage")
@ -889,46 +903,15 @@ class vmmAddHardware(gobject.GObject):
self.close()
# Storage listeners
def browse_storage_partition_address(self, src, ignore=None):
textent = self.window.get_widget("storage-partition-address")
def browse_storage(self, ignore1):
self._browse_file(self.window.get_widget("config-storage-entry"))
self._browse_file(textent)
def toggle_storage_select(self, src):
act = src.get_active()
self.window.get_widget("config-storage-browse-box").set_sensitive(act)
def browse_storage_file_address(self, src, ignore=None):
textent = self.window.get_widget("storage-file-address")
self._browse_file(textent, confirm_overwrite=True)
def toggle_storage_size(self, ignore1=None, ignore2=None):
filename = self.get_config_disk_image()
if filename != None and len(filename) > 0 and \
(self.vm.get_connection().is_remote() or
not os.path.exists(filename)):
self.window.get_widget("storage-file-size").set_sensitive(True)
self.window.get_widget("non-sparse").set_sensitive(True)
size = self.get_config_disk_size()
if size == None:
size = 4000
self.window.get_widget("storage-file-size").set_value(size)
else:
self.window.get_widget("storage-file-size").set_sensitive(False)
self.window.get_widget("non-sparse").set_sensitive(False)
if os.path.isfile(filename):
size = os.path.getsize(filename)/(1024*1024)
self.window.get_widget("storage-file-size").set_value(size)
else:
self.window.get_widget("storage-file-size").set_value(0)
def change_storage_type(self, ignore=None):
if self.window.get_widget("storage-partition").get_active():
self.window.get_widget("storage-partition-box").set_sensitive(True)
self.window.get_widget("storage-file-box").set_sensitive(False)
self.window.get_widget("storage-file-size").set_sensitive(False)
self.window.get_widget("non-sparse").set_sensitive(False)
else:
self.window.get_widget("storage-partition-box").set_sensitive(False)
self.window.get_widget("storage-file-box").set_sensitive(True)
self.toggle_storage_size()
def set_disk_storage_path(self, ignore, path):
self.window.get_widget("config-storage-entry").set_text(path)
# Network listeners
def change_macaddr_use(self, ignore=None):
@ -1124,57 +1107,60 @@ class vmmAddHardware(gobject.GObject):
self._dev = None
def validate_page_storage(self):
path = self.get_config_disk_image()
if not path:
return self.err.val_err(_("Storage Path Required"),
_("You must specify a partition or a file for disk storage."))
if self.window.get_widget("target-device").get_active() == -1:
return self.err.val_err(_("Target Device Required"),
_("You must select a target device for the disk."))
bus, device = self.get_config_disk_target()
# Build disk object
filesize = self.get_config_disk_size()
if self.get_config_disk_size() != None:
filesize = self.get_config_disk_size() / 1024.0
readonly = False
if device == virtinst.VirtualDisk.DEVICE_CDROM:
readonly=True
try:
if (os.path.dirname(os.path.abspath(path)) ==
util.DEFAULT_POOL_PATH):
util.build_default_pool(self.vm.get_connection().vmm)
# This can error out
diskpath, disksize, sparse = self.get_storage_info()
self._dev = virtinst.VirtualDisk(self.get_config_disk_image(),
filesize,
sparse=self.is_sparse_file(),
readOnly=readonly,
device=device,
bus=bus,
conn=self.vm.get_connection().vmm)
if self.is_default_storage():
# See if the ideal disk path (/default/pool/vmname.img)
# exists, and if unused, prompt the use for using it
ideal = util.get_ideal_path(self.conn, self.config,
self.vm.get_name())
do_exist = False
ret = True
if (self._dev.type == virtinst.VirtualDisk.TYPE_FILE and
not self.vm.is_hvm() and virtinst.util.is_blktap_capable()):
self._dev.driver_name = virtinst.VirtualDisk.DRIVER_TAP
try:
do_exist = virtinst.VirtualDisk.path_exists(
self.conn.vmm, ideal)
except ValueError, e:
return self.err.val_err(_("Invalid Storage Parameters"), str(e))
ret = virtinst.VirtualDisk.path_in_use_by(self.conn.vmm,
ideal)
except:
logging.exception("Error checking default path usage")
ret = self._dev.is_size_conflict()
if not ret[0] and ret[1]:
res = self.err.ok_cancel(_("Not Enough Free Space"), ret[1])
if not res:
return False
if do_exist and not ret:
do_use = self.err.yes_no(
_("The following path already exists, but is not\n"
"in use by any virtual machine:\n\n%s\n\n"
"Would you like to use this path?") % ideal)
if self._dev.is_conflict_disk(self.vm.get_connection().vmm) is True:
res = self.err.yes_no(
_('Disk "%s" is already in use by another guest!' % self._dev),
_("Do you really want to use the disk?"))
if not res:
return False
if do_use:
diskpath = ideal
if not diskpath:
return self.err.val_err(_("A storage path must be specified."))
disk = virtinst.VirtualDisk(conn = self.conn.vmm,
path = diskpath,
size = disksize,
sparse = sparse,
readOnly = readonly,
device = device,
bus = bus)
if (disk.type == virtinst.VirtualDisk.TYPE_FILE and
not self.vm.is_hvm() and
virtinst.util.is_blktap_capable()):
disk.driver_name = virtinst.VirtualDisk.DRIVER_TAP
except Exception, e:
return self.err.val_err(_("Storage parameter error."), str(e))
# Generate target
used = []
@ -1183,10 +1169,28 @@ class vmmAddHardware(gobject.GObject):
for d in disks:
used.append(d[2])
self._dev.generate_target(used)
disk.generate_target(used)
isfatal, errmsg = disk.is_size_conflict()
if not isfatal and errmsg:
# Fatal errors are reported when setting 'size'
res = self.err.ok_cancel(_("Not Enough Free Space"), errmsg)
if not res:
return False
# Disk collision
if disk.is_conflict_disk(self.conn.vmm):
res = self.err.yes_no(_('Disk "%s" is already in use by another '
'guest!' % disk.path),
_("Do you really want to use the disk?"))
if not res:
return False
uihelpers.check_path_search_for_qemu(self.topwin, self.config,
self.conn, self._dev.path)
self.conn, disk.path)
self._dev = disk
return True
def validate_page_network(self):
@ -1312,27 +1316,17 @@ class vmmAddHardware(gobject.GObject):
# Unsorted helpers #
####################
def _browse_file(self, textent, confirm_overwrite=False):
def confirm_cb(chooser):
# Only called when the user has chosen an existing file
self.window.get_widget("storage-file-size").set_sensitive(False)
return gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME
def _browse_file(self, textent):
def set_storage_cb(src, path):
if path:
textent.set_text(path)
confirm_func = None
if confirm_overwrite:
confirm_func = confirm_cb
conn = self.vm.get_connection()
if self.storage_browser == None:
self.storage_browser = vmmStorageBrowser(self.config, conn)
self.storage_browser.set_finish_cb(set_storage_cb)
self.storage_browser.set_browse_reason(self.config.CONFIG_DIR_IMAGE)
self.storage_browser.set_local_arg("confirm_func", confirm_func)
self.storage_browser.show(conn)

View File

@ -219,461 +219,254 @@
<child>
<widget class="GtkAlignment" id="alignment77">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="left_padding">50</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame1">
<widget class="GtkVBox" id="vbox10">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<widget class="GtkAlignment" id="alignment149">
<widget class="GtkVBox" id="config-storage-box">
<property name="visible">True</property>
<property name="left_padding">12</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<widget class="GtkTable" id="table23">
<widget class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<property name="n_rows">9</property>
<property name="n_columns">5</property>
<property name="column_spacing">6</property>
<property name="row_spacing">2</property>
<property name="spacing">6</property>
<child>
<widget class="GtkAlignment" id="alignment79">
<property name="visible">True</property>
<property name="yalign">0</property>
<property name="yscale">0</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label219">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="xpad">4</property>
<property name="label" translatable="yes">Loc_ation:</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">storage-partition-address</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox33">
<property name="visible">True</property>
<child>
<widget class="GtkImage" id="image84">
<property name="visible">True</property>
<property name="icon_name">gtk-info</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label221">
<property name="visible">True</property>
<property name="xpad">7</property>
<property name="label" translatable="yes">&lt;small&gt;&lt;b&gt;Example:&lt;/b&gt; /dev/hdc2&lt;/small&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label222">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="xpad">4</property>
<property name="label" translatable="yes">_Location:</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">storage-file-address</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label282">
<property name="visible">True</property>
<property name="xalign">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment78">
<property name="visible">True</property>
<property name="yalign">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkRadioButton" id="storage-partition">
<property name="label" translatable="yes">B_lock device (partition):</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_storage_toggled"/>
</widget>
</child>
</widget>
<packing>
<property name="right_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment80">
<property name="visible">True</property>
<property name="yalign">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkRadioButton" id="storage-file-backed">
<property name="label" translatable="yes">F_ile (disk image):</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">storage-partition</property>
<signal name="toggled" handler="on_storage_toggled"/>
</widget>
</child>
</widget>
<packing>
<property name="right_attach">5</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="storage-partition-box">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkEntry" id="storage-partition-address">
<property name="visible">True</property>
<property name="can_focus">True</property>
<accessibility>
<atkproperty name="AtkObject::accessible-name" translatable="yes">Partition Location Field</atkproperty>
</accessibility>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="storage-partition-address-browse">
<property name="label" translatable="yes">Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_storage_partition_address_browse_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="storage-file-box">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkEntry" id="storage-file-address">
<property name="visible">True</property>
<property name="can_focus">True</property>
<accessibility>
<atkproperty name="AtkObject::accessible-name" translatable="yes">File Location Field</atkproperty>
</accessibility>
<signal name="changed" handler="on_storage_file_address_changed"/>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="storage-file-address-browse">
<property name="label" translatable="yes">Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_storage_file_address_browse_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">5</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label300">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="xpad">4</property>
<property name="label" translatable="yes">_Size:</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">storage-file-size</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox41">
<property name="visible">True</property>
<child>
<widget class="GtkAlignment" id="alignment117">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="xscale">0</property>
<child>
<widget class="GtkSpinButton" id="storage-file-size">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="adjustment">500 0 4000000 100 500 0</property>
<property name="climb_rate">1</property>
<property name="snap_to_ticks">True</property>
<property name="numeric">True</property>
<accessibility>
<atkproperty name="AtkObject::accessible-name" translatable="yes">File Size Field</atkproperty>
</accessibility>
<signal name="changed" handler="on_storage_file_size_changed"/>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label301">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="xpad">3</property>
<property name="label" translatable="yes">MB</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox49">
<property name="visible">True</property>
<child>
<widget class="GtkImage" id="image98">
<property name="visible">True</property>
<property name="yalign">0</property>
<property name="icon_name">gtk-dialog-warning</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label349">
<property name="visible">True</property>
<property name="xpad">7</property>
<property name="label" translatable="yes">&lt;small&gt;&lt;b&gt;Warning:&lt;/b&gt;If you do not allocate the entire disk now, space will be allocated as needed while the virtual machine is running. If sufficient free space is not available on the host, this may result in data corruption on the virtual machine.&lt;/small&gt;</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">5</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="non-sparse">
<property name="label" translatable="yes">Allocate entire virtual disk now</property>
<widget class="GtkRadioButton" id="config-storage-create">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<child>
<widget class="GtkLabel" id="label123">
<property name="visible">True</property>
<property name="label" translatable="yes">C_reate a disk image on the computer's hard drive</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">config-storage-create</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
<property name="bottom_padding">6</property>
<property name="left_padding">22</property>
<child>
<widget class="GtkVBox" id="vbox18">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<widget class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkSpinButton" id="config-storage-size">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="width_chars">5</property>
<property name="xalign">1</property>
<property name="adjustment">0 0 1000000 0.10000000000000001 10 0</property>
<property name="climb_rate">1</property>
<property name="digits">1</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label31">
<property name="visible">True</property>
<property name="label" translatable="yes">_GB</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">config-storage-size</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="phys-hd-label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label">&lt;span color='#484848'&gt;Free Space&lt;/span&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox14">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="config-storage-nosparse">
<property name="label" translatable="yes">_Allocate entire disk now</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkImage" id="config-storage-nosparse-info">
<property name="visible">True</property>
<property name="stock">gtk-info</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox9">
<property name="visible">True</property>
<child>
<widget class="GtkRadioButton" id="config-storage-select">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">config-storage-create</property>
<signal name="toggled" handler="on_config_storage_select_toggled"/>
<child>
<widget class="GtkLabel" id="label124">
<property name="visible">True</property>
<property name="label" translatable="yes">Select _managed or other existing storage</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">config-storage-select</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="config-storage-browse-box">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkButton" id="config-storage-browse">
<property name="label" translatable="yes">B_rowse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_config_storage_browse_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
<widget class="GtkEntry" id="config-storage-entry">
<property name="width_request">335</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">3</property>
</packing>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label389">
<widget class="GtkHBox" id="hbox64">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Source:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label388">
<property name="visible">True</property>
<property name="label" translatable="yes">_Device type:</property>
<property name="use_underline">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="config-storage-devtype">
<property name="visible">True</property>
<accessibility>
<atkproperty name="AtkObject::accessible-name" translatable="yes">Device Type Field</atkproperty>
</accessibility>
<signal name="changed" handler="on_target_device_changed"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="type">label_item</property>
<property name="position">1</property>
</packing>
</child>
</widget>
@ -684,72 +477,6 @@
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment151">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment150">
<property name="visible">True</property>
<property name="left_padding">40</property>
<child>
<widget class="GtkHBox" id="hbox64">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label388">
<property name="visible">True</property>
<property name="label" translatable="yes">_Device type:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">target-device</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="target-device">
<property name="visible">True</property>
<accessibility>
<atkproperty name="AtkObject::accessible-name" translatable="yes">Device Type Field</atkproperty>
</accessibility>
<signal name="changed" handler="on_target_device_changed"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label390">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Target:&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">3</property>
@ -1127,7 +854,7 @@
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox7">
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<child>
<widget class="GtkComboBox" id="input-type">
@ -1139,7 +866,7 @@
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment15">
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<child>
<placeholder/>
@ -1672,7 +1399,7 @@
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment2">
<widget class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="left_padding">20</property>
<property name="right_padding">15</property>
@ -1782,7 +1509,7 @@ to connect to the virtual machine.</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment4">
<widget class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="left_padding">20</property>
<property name="right_padding">15</property>
@ -1897,12 +1624,12 @@ to connect to the virtual machine.</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment6">
<widget class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="left_padding">15</property>
<property name="right_padding">12</property>
<child>
<widget class="GtkHBox" id="hbox1">
<widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
@ -1916,7 +1643,7 @@ to connect to the virtual machine.</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment7">
<widget class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
<property name="top_padding">2</property>
<property name="left_padding">12</property>
@ -1976,7 +1703,7 @@ to connect to the virtual machine.</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment8">
<widget class="GtkAlignment" id="alignment9">
<property name="visible">True</property>
<property name="top_padding">2</property>
<property name="left_padding">12</property>
@ -2082,7 +1809,7 @@ to connect to the virtual machine.</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox3">
<widget class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
@ -2129,7 +1856,7 @@ to connect to the virtual machine.</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox4">
<widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
@ -2215,7 +1942,7 @@ to connect to the virtual machine.</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment9">
<widget class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
<child>
<widget class="GtkEventBox" id="char-info-box">
@ -2312,7 +2039,7 @@ to connect to the virtual machine.</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment10">
<widget class="GtkAlignment" id="alignment12">
<property name="visible">True</property>
<property name="left_padding">20</property>
<property name="right_padding">15</property>
@ -2419,7 +2146,7 @@ to connect to the virtual machine.</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment12">
<widget class="GtkAlignment" id="alignment16">
<property name="visible">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>