1 <%doc>Copyright (C) 2009-2010 HDE, Inc.</%doc>
2 <%inherit file="../include/common.part" />
4 from karesansui.lib.template import view_autounit, view_megaunit
5 from karesansui.lib.const import DEFAULT_DECIMAL_POINT
8 <script type="text/javascript">
10 function validates_guest(){
16 CHECK_EMPTY | CHECK_LENGTH | CHECK_ONLYSPACE,
19 MACHINE_NAME_MIN_LENGTH,
20 MACHINE_NAME_MAX_LENGTH
25 CHECK_LENGTH | CHECK_ONLYSPACE,
28 NOTE_TITLE_MIN_LENGTH,
42 var form_tmp = $("#tags").val();
43 var tags = $("#tags").val().split(",");
46 for (var idx in tags){
47 $("#tags").val(tags[idx]);
48 tag_check = check_string(
50 CHECK_LENGTH | CHECK_ONLYSPACE,
56 if(tag_check == false){
60 $("#tags").val(form_tmp);
61 check = check && tag_check;
66 CHECK_EMPTY | CHECK_LENGTH | CHECK_VALID | CHECK_ONLYSPACE,
74 CHECK_VALID | CHECK_MIN | CHECK_EMPTY,
75 "${_('Memory Size (MB)')}",
81 CHECK_VALID | CHECK_MIN | CHECK_EMPTY,
82 "${_('Disk Size (MB)')}",
86 boot_image = $("input:radio[name='boot_image']:checked").val();
87 if(boot_image == "kernel") {
88 check = check_startfile(
90 CHECK_EMPTY | CHECK_VALID,
91 "${_('Kernel Image')}"
93 check = check_startfile(
95 CHECK_EMPTY | CHECK_VALID,
96 "${_('Initrd Image')}"
99 check = check_startfile(
101 CHECK_EMPTY | CHECK_VALID,
106 check = check_number(
108 CHECK_EMPTY | CHECK_VALID | CHECK_MIN | CHECK_MAX,
109 "${_('VNC Port Number')}",
114 check = check_macaddr(
116 CHECK_EMPTY | CHECK_VALID,
117 "${_('MAC Address')}"
121 show_alert_msg("${_('Please input correct value.')}\n" + ERROR_MSG);
127 function setDefaultValue() {
128 hypervisor = $("#m_hypervisor").children(":selected").val();
129 if(hypervisor == 2) { /* kvm */
130 $("#boot_image_iso_html").css("display","block")
131 } else { /* not kvm as xen */
132 $("#boot_image_iso_html").css("display","none")
134 % for x in hypervisors.keys():
135 if("${hypervisors[x]}" == hypervisor) {
136 $("#vm_mac").val("${mac_address[x]}");
138 keymap_html = '<select id="keymap" name="keymap">'
139 % for y in keymaps[x]:
140 % if y == DEFAULT_KEYMAP:
141 keymap_html += '<option value="${y | h}" selected="selected">${y | h}</option>'
143 keymap_html += '<option value="${y | h}">${y | h}</option>'
146 keymap_html += '</select>';
147 $("#select_keymap_html").html(keymap_html);
149 phydev_html = '<select id="phydev" name="phydev">'
150 % for y in phydev[x]:
151 phydev_html += '<option value="${y | h}">${y | h}</option>'
153 phydev_html += '</select>';
154 $("#select_phydev_html").html(phydev_html);
156 virnet_html = '<select id="virnet" name="virnet">'
157 % for y in virnet[x]:
158 virnet_html += '<option value="${y | h}">${y | h}</option>'
160 virnet_html += '</select>'
161 $("#select_virnet_html").html(virnet_html)
165 boot_image = $("input:radio[name='boot_image']:checked").val();
166 if(boot_image == "kernel") {
167 $("#vm_kernel_require_str").css("display","");
168 $("#vm_initrd_require_str").css("display","");
169 $("#vm_iso_require_str").css("display","none");
170 $("#vm_kernel").attr("disabled", "");
171 $("#vm_initrd").attr("disabled", "");
172 $("#vm_iso").attr("disabled", "disabled");
174 $("#vm_kernel_require_str").css("display","none");
175 $("#vm_initrd_require_str").css("display","none");
176 $("#vm_iso_require_str").css("display","");
177 $("#vm_kernel").attr("disabled", "disabled");
178 $("#vm_initrd").attr("disabled", "disabled");
179 $("#vm_iso").attr("disabled", "");
182 nic_type = $("input:radio[name='nic_type']:checked").val();
183 if(nic_type == "phydev") {
184 $("#phydev").attr("disabled", "");
185 $("#virnet").attr("disabled", "disabled");
187 $("#phydev").attr("disabled", "disabled");
188 $("#virnet").attr("disabled", "");
193 function show_element(id,flag) {
201 function get_pools_info(){
202 var pools_info = new Array();
203 % for pool_name in pools_info.keys():
204 var pool_info = new Array();
205 pool_info['available'] = "${pools_info[pool_name]['available']}";
206 pool_info['capacity'] = "${pools_info[pool_name]['capacity']}";
207 pool_info['type'] = "${pools_info[pool_name]['type']}";
208 pools_info["${pool_name}"] = pool_info
214 function get_vols_info(){
215 var vols_info = new Array();
216 % for pool_name in pools_iscsi_blocks.keys():
217 % for vol_info in pools_iscsi_blocks[pool_name]:
218 var vol_info = new Array();
219 vol_info['capacity'] = "${vol_info['capacity']}";
220 vol_info['path'] = "${vol_info['target']['path']}";
221 vol_info['realpath'] = "${vol_info['real']['dir']}/${vol_info['real']['name']}";
222 vols_info["${vol_info['name']}"] = vol_info;
229 function set_pool_name(name){
231 var default_start_disk_size = 8192;
232 var default_view_start_disk_size = view_autounit(default_start_disk_size, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true);
233 var pools_info = get_pools_info();
234 var vols_info = get_vols_info();
235 var parts = name.split("/");
236 var pool_name = parts[0];
237 var disk_type = pools_info[pool_name]['type'];
239 if(disk_type == 'iscsi'){
241 if(parts.length > 1){
244 var disk_capacity = view_megaunit(vols_info[vol_name]['capacity'], 'B');
245 var view_disk_capacity = view_autounit(vols_info[vol_name]['capacity'], null, DEFAULT_DECIMAL_POINT, true);
246 $("#disk_size_box").hide();
247 $("#disk_type_value_box").html(disk_type);
248 $("#disk_available_capacity_box").hide();
249 $("#disk_capacity_box").show();
250 $("#disk_capacity_value_box").html('<span>' + disk_capacity + '</span><span class="dark-text slider_autounit">(' + view_disk_capacity + ')</span>');
251 $("#disk_format_box").hide();
252 $("#disk_path_value_box").html(vols_info[vol_name]['path']);
253 $("#disk_realpath_value_box").html(vols_info[vol_name]['realpath']);
254 $("#disk_path_box").show();
255 $("#disk_realpath_box").show();
256 $("#pool_type").val("block");
257 } else { // type is 'dir' or 'fs'
258 var disk_available = view_megaunit(pools_info[pool_name]['available'], 'B');
259 var disk_capacity = view_megaunit(pools_info[pool_name]['capacity'], 'B');
260 var view_disk_available = view_autounit(pools_info[pool_name]['available'], null, DEFAULT_DECIMAL_POINT, true);
261 var view_disk_capacity = view_autounit(pools_info[pool_name]['capacity'], null, DEFAULT_DECIMAL_POINT, true);
263 var start_disk_size = default_start_disk_size;
264 var view_start_disk_size = default_view_start_disk_size;
265 if(disk_available < default_start_disk_size){
266 start_disk_size = disk_available;
267 view_start_disk_size = view_autounit(start_disk_size, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true);
269 $("#disk_size_box").show();
278 $("#vm_disk_size_autounit").text('(' + view_start_disk_size + ')');
279 $("#vm_disk_size").change(function(){
280 var value = $(this).attr('value');
281 var view_value = view_autounit(value, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true);
282 $("#vm_disk_size_autounit").text('(' + view_value + ')');
284 $("#disk_type_value_box").html(disk_type);
285 $("#disk_available_capacity_box").show();
286 $("#disk_available_capacity_value_box").html('<span>' + disk_available + '</span><span class="dark-text slider_autounit">(' + view_disk_available + ')</span> / <span>' + disk_capacity + '</span><span class="dark-text slider_autounit">(' + view_disk_capacity + ')</span>');
287 $("#disk_capacity_box").hide();
288 $("#disk_format_box").show();
289 $("#disk_path_box").hide();
290 $("#disk_realpath_box").hide();
291 $("#pool_type").val(disk_type);
295 $(document).ready(function(){
296 var start_mem_size = 512;
297 var view_start_mem_size = view_autounit(start_mem_size, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true);
298 if(${free_mem} < start_mem_size){
299 start_mem_size = ${free_mem};
300 view_start_mem_size = view_autounit(start_mem_size, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true)
311 $("#vm_mem_size_autounit").text('(' + view_start_mem_size + ')');
312 $("#vm_mem_size").change(function(){
313 var value = $(this).attr('value');
314 var view_value = view_autounit(value, ['MB','GB','TB', 'PB', 'EB'], DEFAULT_DECIMAL_POINT, true);
315 $("#vm_mem_size_autounit").text('(' + view_value + ')');
318 var pool_name = $('#pool_dir option:selected').val();
319 set_pool_name(pool_name);
320 $("#pool_dir").change(function(){
321 var pool_name = $('#pool_dir option:selected').val();
322 set_pool_name(pool_name);
325 $("#disk_path_box").hide();
326 $("#disk_realpath_box").hide();
330 "#input_guest_icon_form",
331 "${ctx.homepath}/icon",
332 function(){return true;}
336 "#input_guest_submit",
337 "${ctx.homepath}${ctx.path}",
338 "#input_guest :input",
343 helptip("#guest_name_help",
344 "${_('Guest Name')}",
345 "${_('Name of the guest. This will be used in Karesansui control panel. Any letters, including spaces and symbols are allowed.')}");
347 helptip("#guest_domain_name_help",
348 "${_('Domain Name')}",
349 "${_(r'VM domain name of the guest. This will be used to distinguish each guests in VM, so it should be unique between all guests (This is NOT a DNS \"domain\"). Alphabets and some symbols are allowed.')}");
351 helptip("#guest_icon_help",
352 "${_('Guest Icon')}",
353 "${_('Icon image to be used in Karesansui control panel. Choose the file and click upload button.')}");
355 helptip("#guest_memory_help",
356 "${_('Memory Size')}",
357 "${_('The amount of RAM for the guest to use (in mega-bytes).')}");
360 // ストレージとは 1系でいうディスクをさします。
362 // 利用するストレージを設定します。\nストレージ追加\n新規にストレージを作成します。\n\niSCSIストレージ利用\nネットワークストレージを利用します。\n
363 helptip("#disk_layout_help",
364 "${_('Storage Type')}",
365 "${_(r'Create New Disk Image: Create a new storage image. <br />Use iSCSI: Use iSCSI networked storage.')}");
369 // ストレージプールを選択してください。ストレージプールは、ストレージプール画面から操作することができます。
370 helptip("#guest_disk_storage_name_help",
371 "${_('Storage Pool To Use')}",
372 "${_(r'Select the storage pool to use. You can manupulate storage pools in \"Storage Pool\" tab.')}");
376 // そのストレージプールの空き容量です。(MB)
377 helptip("#guest_disk_storage_available_help",
379 "${_('Available space in the storage pool.(MB)')}");
382 // ストレージプールの総容量です。(MB)
383 helptip("#guest_disk_storage_capacity_help",
385 "${_('Total capacity of the storage pool. (MB)')}");
389 // ゲストOSのストレージ容量を設定します。(MB)
390 helptip("#guest_disk_storage_help",
391 "${_('Disk Size (MB)')}",
392 "${_('Set the storage capacity of the guest OS. (MB)')}");
397 raw: もっともシンプルなイメージ形式です。(簡単に他のシステムで利用できる利点があります。)
398 vmdk : VMwareのバージョン3と4に対応するイメージ形式です。
399 cow: User Mode Linux利用されるイメージ形式です。
400 qcow: 古いQemuでサポートされているイメージ形式です。(互換性の維持で残されています。)
401 qcow2 : Qemuがサポートする最も一般的なイメージ形式です。
403 raw: This is the simplest image format. (Benefits available in other file systems easily.)
404 vmdk: VMware image format corresponding to the version 3 and 4.
405 cow: User Mode Linux is used image format.
406 qcow: Qemu is an older image formats are supported. (We have left in place to maintain compatibility.)
407 qcow2: Qemu is the most common image formats supported.
410 helptip("#guest_disk_os_image_type_help",
411 "${_('Image Type')}",
412 "${_(r'raw: The simplest image format. High interoperability with other systems.\nvmdk: Format which is used in VMWare 3 or 4.\ncow: Format used in User Mode Linux.\nqcow: Format used in old versions of Qemu. Left for compatibility.\nqcow2: The most common image format supported by Qemu.\n')}");
416 // ストレージプールの種別です。ネットワークストレージ及びストレージプールの画面で設定を行うことができます。
417 helptip("#guest_iscsi_storage_pool_type_help",
418 "${_('Storage Pool Type')}",
419 "${_('The type of storage pool. You can set this in networked storage tab and storage pool tab.')}");
423 // ストレージプールの名前です。ストレージプールの設定はストレージプール画面から行うことができます。
424 helptip("#guest_iscsi_storage_pool_help",
425 "${_('Storage Pool Name')}",
426 "${_('The name of the storage. Storage pool settings are available in storage pool tab.')}");
430 // ストレージプール内で実際に使われるボリューム名です。
431 helptip("#guest_iscsi_storage_volume_name_help",
432 "${_('Storage Volume Name')}",
433 "${_('Volume name actually used in the storage pool.')}");
437 // デバイスの制御方法を設定します。準仮想化デバイスとして動作するvirtio(KVM)/xen(Xen)を推奨します。
438 helptip("#guest_bus_type_help",
440 "${_('Set the device controlling method. We recommend virtio (KVM) / xen (Xen), which allows device to act as a para-virtualized device.')}");
445 helptip("#device_display_bootup_vnc_keymap_help",
446 "${_('VNC Keymap')}",
447 "${_('Keymap of the keyboard to use with VNC.')}");
449 helptip("#guest_disk_help",
451 "${_('Size of the disk of the guest (MB)')}");
453 helptip("#guest_kernel_help",
454 "${_('Kernel Image')}",
455 "${_('Kernel image for the guest. Specify FTP/HTTP URL, or a valid absolute file path.')}");
457 helptip("#guest_initrd_help",
458 "${_('Initrd Image')}",
459 "${_('The initrd (bootup RAM disk) image for the guest. Specify FTP/HTTP URL, or a valid absolute file path.')}");
461 helptip("#guest_iso_help",
463 "${_('The ISO 9660 CD-ROM/DVD-ROM image for the guest. Specify a valid absolute file path.')}");
465 helptip("#guest_vnc_port_help",
466 "${_('VNC Port Number')}",
467 "${_('(Auto-recommended value displayed below.) TCP port number to access the guest with VNC. Numbers greater than 5900 are allowed. Unique number between all guests are recommended.')}");
469 helptip("#guest_interface_type_help",
470 "${_('Interface Type')}",
471 "${_(r'Type of the virtual network interface connection. Choose \"Physical Device\" to connect directly to the physical network, or \"Virtual Network\" to connect guest to the virtual network (which are in \"Network\" tab of the host). ')}");
473 helptip("#guest_mac_address_help",
474 "${_('MAC Address')}",
475 "${_('(Auto-recommended value displayed below.) MAC address of the guest in xx:xx:xx:xx:xx:xx format. Specify an address not used in the network.')}");
477 helptip("#guest_option_help",
478 "${_('Extra Kernel Options')}",
479 "${_('Kernel parameters to pass to the guest kernel on guest installation.')}");
481 helptip("#guest_tag_help",
483 "${_(r'Tag to add to the guest to be used in Karesansui control panel. Can be used to search guests using tags in the \"Guests\" panel. Separate tags with commas to specify two or more tags. Any letters, including spaces and symbols are allowed.')}");
488 <div id="input_guest">
489 <div class="grayout-head">
490 <span class="grayout-title">
491 <a href="#" id="server" class="path-a"><img src="${ctx.homepath}/static/images/settings-title.gif" alt="">${_('Create Guest')}</a>
493 <br style="clear: both;"/>
496 <div class="grayout-contents">
497 <div class="grayout-param">${_('Guest Name')}<span id="guest_name_help"/></div>
498 <div class="grayout-value grayout-form">
499 <input type="text" id="m_name" name="m_name" value="" size="40" maxlength="256" /><span class="require-text">${_('Require')}</span>
501 <div class="grayout-param">${_('Hypervisor')}</div>
502 <div class="grayout-value grayout-form">
503 <select id="m_hypervisor" name="m_hypervisor" onChange="javascript:setDefaultValue()">
504 % for x in hypervisors.keys():
505 <option value="${hypervisors[x]}">${_(x)}</option>
509 <div class="grayout-param">${_('Domain Name')}<span id="guest_domain_name_help"/></div>
510 <div class="grayout-value grayout-form">
511 <input type="text" id="domain_name" name="domain_name" value="" size="40" /><span class="require-text">${_('Require')}</span>
515 <div class="grayout-param">${_('Guest Icon')}<span id="guest_icon_help"/></div>
516 <div class="grayout-value grayout-form">
517 <form action="#" method="post" id="input_guest_icon_form" name="input_guest_icon_form">
518 <input type="file" id="multi_icon" name="multi_icon" size="40" />
519 <input type="hidden" id="icon_filename" name="icon_filename" value="" />
520 <a href="#" name="icon_upload_submit" id="icon_upload_submit" class="button" style="display: inline">
521 <span class="button-left"> </span><span class="button-right">${_('Upload')}</span>
523 <a href="#" name="icon_cancel_submit" id="icon_cancel_submit" class="button" style="display: inline">
524 <span class="button-left"> </span><span class="button-right">${_('Cancel')}</span>
529 <div class="grayout-param">${_('Memory Size (MB)')}<span id="guest_memory_help"/></div>
530 <div class="grayout-value grayout-form">
531 <div style="display:table;">
532 <div id="mem_slider" class="slider"></div>
533 <div class="slider_value">
534 <input type="text" id="vm_mem_size" name="vm_mem_size" size="16" /><span id="vm_mem_size_autounit" class="dark-text slider_autounit">(0B)</span><span class="require-text">${_('Require')}</span>
539 <div class="grayout-param">${_('Storage Type')}<span id="disk_layout_help"/></div>
540 <div class="grayout-value grayout-form">
541 ${_("Storage Pool Name")} :
542 <select id="pool_dir" name="pool_dir">
543 % for group_type in ['dir', 'fs', 'iscsi']:
544 <optgroup label="${group_type}">
545 % for name in sorted(pools_info.keys()):
546 % if group_type == 'dir' and pools_info[name]['type'] == 'dir':
547 % if pools_info[name]['name'] == 'default':
548 <option value="${name}" selected>${name}</option>
550 <option value="${name}">${name}</option>
554 % if group_type == 'fs' and pools_info[name]['type'] == 'fs':
555 <option value="${name}">${name}</option>
558 % if group_type == 'iscsi' and pools_info[name]['type'] == 'iscsi':
559 % if name in pools_iscsi_blocks:
560 % for vol_info in pools_iscsi_blocks[name]:
561 <option value="${name}/${vol_info['name']}">${name} - ${vol_info['name']}</option>
569 <div class="grayout-detail">
570 <input type="hidden" id="pool_type" name="pool_type" value="dir" />
571 <table class="detail-contents">
572 <tr id="disk_type_box">
573 <th>${_('Storage Pool Type')}</th>
574 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
575 <td id="disk_type_value_box">
576 <span>${_('-')}</span>
579 <tr id="disk_size_box">
580 <th>${_('Disk Size (MB)')}</th>
581 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
582 <td id="disk_size_value_box">
583 <div id="disk_slider" class="slider"></div>
584 <div class="slider_value">
585 <input type="text" id="vm_disk_size" name="vm_disk_size" value="0" size="16" /><span id="vm_disk_size_autounit" class="dark-text slider_autounit">(0B)</span><span class="require-text">${_('Require')}</span>
589 <tr id="disk_available_capacity_box">
591 <span>${_('Available (MB)')}</span><span> / </span><span>${_('Capacity (MB)')}</span>
593 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
594 <td id="disk_available_capacity_value_box">
595 <span>${_('-')}</span>
598 <tr id="disk_capacity_box" style="display:none;">
600 <span>${_('Capacity (MB)')}</span>
602 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
603 <td id="disk_capacity_value_box">
604 <span>${_('-')}</span>
607 <tr id="disk_format_box">
608 <th>${_('OS Image Type')}</th>
609 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
610 <td id="disk_format_value_box">
611 <select id="select_disk_format" name="disk_format">
612 % if "KVM" in hypervisors.keys():
613 % for x in DISK_QEMU_FORMAT.values():
615 <option value="${x}" selected>${x}</option>
617 <option value="${x}">${x}</option>
621 % for x in DISK_NON_QEMU_FORMAT.values():
622 <option value="${x}">${x}</option>
628 <tr id="disk_path_box">
629 <th>${_('Device Path')}</th>
630 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
631 <td id="disk_path_value_box"></td>
633 <tr id="disk_realpath_box">
634 <th>${_('Device Real Path')}</th>
635 <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
636 <td id="disk_realpath_value_box"></td>
642 <div class="grayout-param">${_('Bus Type')}<span id="guest_bus_type_help"/></div>
643 <div class="grayout-value grayout-form">
644 <select name="bus_type">
645 % if "KVM" in hypervisors.keys():
646 % for x in bus_types:
648 <option value="${x}" selected>${_(x)}</option>
650 <option value="${x}">${_(x)}</option>
654 % for x in bus_types:
656 <option value="${x}" selected>${_(x)}</option>
658 <option value="${x}">${_(x)}</option>
665 <div class="grayout-param">${_('Boot Image')}<span id="guest_boot_image_help"/></div>
666 <div class="grayout-value grayout-form">
667 <div style="background-color: #FFFFFF">
668 <div id="boot_image_kernel_html">
669 <table width="100%" style="background-color: #FFFFFF; padding: 10px">
672 <input type="radio" name="boot_image" id="boot_image_kernel" value="kernel" checked onChange="javascript:setDefaultValue()"/>
675 <table width="100%" style="background-color: #F5F5F5;">
678 ${_('Kernel Image')}<span id="guest_kernel_help"/>
681 <input type="text" id="vm_kernel" name="vm_kernel" value="" size="60" /><span class="require-text" id="vm_kernel_require_str">${_('Require')}</span>
686 ${_('Initrd Image')}<span id="guest_initrd_help"/>
689 <input type="text" id="vm_initrd" name="vm_initrd" value="" size="60" /><span class="require-text" id="vm_initrd_require_str">${_('Require')}</span>
698 <div id="boot_image_iso_html">
699 <table width="100%" style="background-color: #FFFFFF; padding: 0px 10px 10px 10px">
702 <input type="radio" name="boot_image" id="boot_image_iso" value="iso" onChange="javascript:setDefaultValue()"/>
705 <table width="100%" style="background-color: #F5F5F5;">
708 ${_('ISO Image')}<span id="guest_iso_help"/>
711 <input type="text" id="vm_iso" name="vm_iso" value="" size="60" /><span class="require-text" id="vm_iso_require_str">${_('Require')}</span>
722 <div class="grayout-param">${_('VNC Keymap')}<span id="device_display_bootup_vnc_keymap_help" /></div>
723 <div class="grayout-value grayout-form">
724 <div id="select_keymap_html"></div>
727 <div class="grayout-param">${_('VNC Port Number')}<span id="guest_vnc_port_help"/></div>
728 <div class="grayout-value grayout-form">
729 <input type="text" id="vm_vncport" name="vm_vncport" value="${vnc_port | h}" size="6" maxlength="5" /><span class="require-text">${_('Require')}</span>
732 <div class="grayout-param">${_('Interface Type')}<span id="guest_interface_type_help" /></div>
733 <div class="grayout-value grayout-form">
734 <div style="background-color: #FFFFFF">
735 <div id="nic_type_phy_html">
736 <table width="100%" style="background-color: #FFFFFF; padding: 10px">
739 <input type="radio" name="nic_type" id="nic_type_phy" value="phydev" checked onChange="javascript:setDefaultValue()"/>
742 <table width="100%" style="background-color: #F5F5F5;">
745 ${_('Physical Device')}<span id="guest_iso_help"/>
748 <div id="select_phydev_html"></div>
756 <div id="nic_type_vir_html">
757 <table width="100%" style="background-color: #FFFFFF; padding: 0px 10px 10px 10px">
760 <input type="radio" name="nic_type" id="nic_type_vir" value="virnet" onChange="javascript:setDefaultValue()"/>
763 <table width="100%" style="background-color: #F5F5F5;">
766 ${_('Virtual Network')}<span id="guest_iso_help"/>
769 <div id="select_virnet_html"></div>
780 <div class="grayout-param">${_('MAC Address')}<span id="guest_mac_address_help"/></div>
781 <div class="grayout-value grayout-form">
782 <input type="text" id="vm_mac" name="vm_mac" value="" size="20" maxlength="17" /><span class="require-text">${_('Require')}</span>
784 <div class="grayout-param">${_('Extra Kernel Options')}<span id="guest_option_help"/></div>
785 <div class="grayout-value grayout-form">
786 <input type="text" id="vm_extra" name="vm_extra" value="" size="40" />
788 <div class="grayout-param">${_('Notebook')}</div>
789 <div class="grayout-value grayout-form">
791 <input type="text" id="note_title" name="note_title" value="" size="40" maxlength="64" />
793 <textarea id="note_value" name="note_value" cols="50" rows="5"></textarea>
795 <div class="grayout-param">${_('Tag')}<span id="guest_tag_help"/></div>
796 <div class="grayout-value grayout-form">
797 <input type="text" id="tags" name="tags" value="" size="40" />
800 <div class="grayout-footer">
801 <a href="#" name="input_guest_submit" id="input_guest_submit" class="button">
802 <span class="button-left"> </span><span class="button-right">${_('Create')}</span>
804 <br style="clear: both;"/>
806 <br style="clear: both;"/>