Virtual machine Management Terminal User Interface
Révision | 39f41ca56434b74ececedd5bc1828de079ebf4f5 (tree) |
---|---|
l'heure | 2022-06-06 21:12:19 |
Auteur | Koine Yuusuke(koinec) <koinec@user...> |
Commiter | Koine Yuusuke(koinec) |
Work Backup
@@ -377,6 +377,15 @@ int | ||
377 | 377 | |
378 | 378 | fclose( fp ); |
379 | 379 | |
380 | + if( 0x02 == i_mode ) { | |
381 | + i_err = ConfigFile_RegistHVisor( p_hvtmp ); | |
382 | + if( 0x00 != i_err ) { | |
383 | + ErrInfo_Error( "Failed call ConfigFile_Regist_HVisor()", | |
384 | + 0x00, 0x00, 0x00, errno, i_err, NULL ); | |
385 | + // Ignore failed regist HVisor --- | |
386 | + } | |
387 | + } | |
388 | + | |
380 | 389 | goto_ConfigFile_ReadConfig_post: |
381 | 390 | free( p_hvtmp ); |
382 | 391 |
@@ -51,7 +51,7 @@ | ||
51 | 51 | #define CFG_KEY_SERVER_HOSTNAME "HostName" |
52 | 52 | #define CFG_KEY_SERVER_SSH_AUTHTYPE "SSH_AuthType" |
53 | 53 | #define CFG_KEY_SERVER_SSH_AUTHTYPE_PASSWD "Password" |
54 | - #define CFG_KEY_SERVER_SSH_AUTHTYPE_PUBKEY "Pubkey" | |
54 | + #define CFG_KEY_SERVER_SSH_AUTHTYPE_PUBKEY "PubKey" | |
55 | 55 | #define CFG_KEY_SERVER_SSH_AUTHTYPE_HOSTBASED "HostBased" |
56 | 56 | |
57 | 57 | #define CFG_KEY_SERVER_SSH_PORT "SSH_Port" |
@@ -45,8 +45,10 @@ void | ||
45 | 45 | strncmp( ConfigFile_GetFilePath(), "./testfile/vmtui.conf", 255) ); |
46 | 46 | |
47 | 47 | ConfigFile_SetConfigFilePath( NULL, NULL ); |
48 | + /* | |
48 | 49 | CU_ASSERT( 0x00 == |
49 | 50 | strncmp( ConfigFile_GetFilePath(), "/usr/local/etc/vmtui.conf", 255) ); |
51 | + */ | |
50 | 52 | |
51 | 53 | ErrInfo_Term(); |
52 | 54 |
@@ -76,7 +76,7 @@ SSH_AuthType=PubKey | ||
76 | 76 | SSH_Port=2222 |
77 | 77 | SSH_User=testuser2 |
78 | 78 | SSH_Password=password3 |
79 | -HyperVisor=libvirt | |
79 | +HyperVisor=Bhyve_libvirt | |
80 | 80 | sudo_Enable=no |
81 | 81 | sudo_Option= |
82 | 82 | sudo_Password= |
@@ -104,43 +104,20 @@ int main( int argc, char *argv[] ) { | ||
104 | 104 | |
105 | 105 | VmTui_Init(); |
106 | 106 | |
107 | + ConfigFile_SetConfigFilePath( NULL, NULL ); | |
108 | + i_err = ConfigFile_ReadConfig(); | |
109 | + | |
107 | 110 | // Test Func --- |
108 | - i_hvlocal = HvCtl_CreateHVisor( | |
109 | - HVISOR_TYPE_BHYVE_VMBHYVE , | |
110 | - HVISOR_CON_LOCALHOST, | |
111 | - "LocalHost", | |
112 | - HVISOR_OPTION_SUDO ); | |
113 | - if( 0x00 > i_hvlocal ) { | |
114 | - goto goto_main_post; | |
115 | - } | |
111 | + i_hvlocal = 0; | |
116 | 112 | |
117 | 113 | HvCtl_StartThread( i_hvlocal ); |
118 | 114 | ReqCtl_CreateRequest( REQUEST_CMD_HV_CONNECT, i_hvlocal, GUEST_ID_NONE, NULL ); |
119 | 115 | |
120 | - i_hvremote = HvCtl_CreateHVisor( | |
121 | - HVISOR_TYPE_BHYVE_VMBHYVE , | |
122 | - HVISOR_CON_REMOTE_SSH, | |
123 | - "TestServer", | |
124 | - HVISOR_OPTION_SUDO ); | |
125 | - if( 0x00 > i_hvremote ) { | |
126 | - goto goto_main_post; | |
127 | - } | |
128 | - | |
129 | - i_err = HvCtl_SetSSHConnectionInfo( | |
130 | - i_hvremote, | |
131 | - HVISOR_SSH_AUTH_PASSWD, | |
132 | - argv[1], // Host | |
133 | - HVISOR_SSHPORT_DEFAULT, | |
134 | - argv[2], // User | |
135 | - argv[3], // Password | |
136 | - NULL, | |
137 | - NULL ); | |
138 | - if( 0x00 > i_err ) { | |
139 | - goto goto_main_post; | |
140 | - } | |
116 | + /* | |
141 | 117 | |
142 | 118 | HvCtl_StartThread( i_hvremote ); |
143 | 119 | ReqCtl_CreateRequest( REQUEST_CMD_HV_CONNECT, i_hvremote, GUEST_ID_NONE, NULL ); |
120 | + */ | |
144 | 121 | |
145 | 122 | /* |
146 | 123 | ReqCtl_CreateRequest( REQUEST_CMD_TEST, i_hvid, GUEST_ID_NONE, NULL ); |
@@ -151,8 +128,8 @@ int main( int argc, char *argv[] ) { | ||
151 | 128 | |
152 | 129 | TuiKey_Dispatch(); |
153 | 130 | |
154 | - ReqCtl_CreateRequest( REQUEST_CMD_HV_DISCONNECT, i_hvremote, GUEST_ID_NONE, NULL ); | |
155 | - ReqCtl_CreateRequest( REQUEST_CMD_EXIT, i_hvremote, GUEST_ID_NONE, NULL ); | |
131 | + //ReqCtl_CreateRequest( REQUEST_CMD_HV_DISCONNECT, i_hvremote, GUEST_ID_NONE, NULL ); | |
132 | + //ReqCtl_CreateRequest( REQUEST_CMD_EXIT, i_hvremote, GUEST_ID_NONE, NULL ); | |
156 | 133 | |
157 | 134 | ReqCtl_CreateRequest( REQUEST_CMD_HV_DISCONNECT, i_hvlocal, GUEST_ID_NONE, NULL ); |
158 | 135 | ReqCtl_CreateRequest( REQUEST_CMD_EXIT, i_hvlocal, GUEST_ID_NONE, NULL ); |