Skip to content

Commit 753fe25

Browse files
author
Kelven Yang
committed
Link with create/start command for vmware VMs
1 parent 7eb61b7 commit 753fe25

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎core/src/com/cloud/agent/api/storage/CreateCommand.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class CreateCommand extends Command {
3030
private DiskCharacteristics diskCharacteristics;
3131
private String templateUrl;
3232
private long size;
33+
private String instanceName;
3334

3435
protected CreateCommand() {
3536
super();
@@ -63,6 +64,7 @@ public CreateCommand(VolumeVO vol, VMInstanceVO vm, DiskCharacteristics diskChar
6364
this.pool = new StoragePoolTO(pool);
6465
this.templateUrl = null;
6566
this.size = size;
67+
this.instanceName = vm.getInstanceName();
6668
}
6769

6870
@Override
@@ -89,4 +91,8 @@ public long getVolumeId() {
8991
public long getSize(){
9092
return this.size;
9193
}
94+
95+
public String getInstanceName() {
96+
return instanceName;
97+
}
9298
}

‎setup/db/templates.vmware.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones)
2+
VALUES (2, 'blank', 'BlankVM', 1, now(), 'ext3', 0, 32, 1, 'http://nfs1.lab.vmops.com/templates/vmware/blankvm.tar.bz2', '3eff7ce3d25cf9433efde8b245c63fcb', 0, 'BlankVM', 'VMDK', 47, 1, 1);
3+
14
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (1, 'Windows');
25
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (2, 'Linux');
36
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (3, 'Novell Netware');

0 commit comments

Comments
 (0)