create the sharedisk on vspere.

~ # df -h
Filesystem   Size   Used Available Use% Mounted on
VMFS-5     815.2G 176.8G    638.4G  22% /vmfs/volumes/datastore7
vfat         4.0G  15.7M      4.0G   0% /vmfs/volumes/4f68bda3-97978538-a782-68b5997930fe
vfat       249.7M 127.4M    122.3M  51% /vmfs/volumes/92755d79-1a111aea-3485-10415c73d394
vfat       249.7M 140.4M    109.3M  56% /vmfs/volumes/8a831a72-44771306-34a5-8ef77b16ba57
vfat       285.8M 176.2M    109.6M  62% /vmfs/volumes/4f68bd8c-db674f0a-6000-68b5997930fe
~ # pwd
/
~ # cd vmfs/volumes/datastore7/
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # mkdir sharedisk
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # cd sharedisk/
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk # vmkfstools
No valid command specified


OPTIONS FOR FILE SYSTEMS:

vmkfstools -C --createfs [vmfs3|vmfs5]
               -b --blocksize #[mMkK]
               -S --setfsname fsName
           -Z --spanfs span-partition
           -G --growfs grown-partition
   deviceName

           -P --queryfs -h --humanreadable
           -T --upgradevmfs
   vmfsPath

OPTIONS FOR VIRTUAL DISKS:

vmkfstools -c --createvirtualdisk #[gGmMkK]
               -d --diskformat [zeroedthick|
                                thin|
                                eagerzeroedthick]
               -a --adaptertype [buslogic|lsilogic|ide]
           -w --writezeros
           -j --inflatedisk
           -k --eagerzero
           -K --punchzero
           -U --deletevirtualdisk
           -E --renamevirtualdisk srcDisk
           -i --clonevirtualdisk srcDisk
               -d --diskformat [zeroedthick|
                                thin|
                                eagerzeroedthick|
                                rdm:<device>|rdmp:<device>|
                                2gbsparse]
               -N --avoidnativeclone
           -X --extendvirtualdisk #[gGmMkK]
               [-d --diskformat eagerzeroedthick]
           -M --migratevirtualdisk
           -r --createrdm /vmfs/devices/disks/...
           -q --queryrdm
           -z --createrdmpassthru /vmfs/devices/disks/...
           -v --verbose #
           -g --geometry
           -I --snapshotdisk srcDisk
           -x --fix [check|repair]
           -e --chainConsistent
   vmfsPath

OPTIONS FOR DEVICES:

           -L --lock [reserve|release|lunreset|targetreset|busreset|readkeys|readresv] /vmfs/devices/disks/...
           -B --breaklock /vmfs/devices/disks/...

/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk # vmkfstools -c 1024m -a lsilogic -d eagerzeroedthick sharedisk.vmdk
Creating disk 'sharedisk.vmdk' and zeroing it out...
Create: 100% done.
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk #
Go to vspere client to add the sharedisk:
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # ls
2008ent_sp1                           Windows Server 2003 Standard Edition  vm01
MR18_126                              sharedisk                             win2k8 R2 x64
VMware Data Recovery                  template
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # cd 2008ent_sp1/
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/2008ent_sp1 # ls
2008ent_sp1-01569b60.vswp        2008ent_sp1.vmdk                 2008ent_sp1.vmxf                 vmx-2008ent_sp1-22453088-1.vswp
2008ent_sp1-flat.vmdk            2008ent_sp1.vmsd                 vmware-1.log
2008ent_sp1.nvram                2008ent_sp1.vmx                  vmware.log
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/2008ent_sp1 # vi 2008ent_sp1.vmx

pciBridge5.pciSlotNumber = "22"                                                                                  
pciBridge6.pciSlotNumber = "23"                                                                                  
pciBridge7.pciSlotNumber = "24"                                                                                  
scsi0.pciSlotNumber = "160"                                                                                      
ethernet0.pciSlotNumber = "32"                                                                                   
vmci0.pciSlotNumber = "33"                                                                                       
scsi0.sasWWID = "50 05 05 6c f9 de 7f b0"                                                                        
hostCPUID.0 = "0000000b756e65476c65746e49656e69"                                                                 
hostCPUID.1 = "000206c200200800029ee3ffbfebfbff"                                                                 
hostCPUID.80000001 = "0000000000000000000000012c100800"                                                          
guestCPUID.0 = "0000000b756e65476c65746e49656e69"                                                                
guestCPUID.1 = "000206c200010800829822030febfbff"                                                                
guestCPUID.80000001 = "00000000000000000000000128100800"                                                         
userCPUID.0 = "0000000b756e65476c65746e49656e69"                                                                 
userCPUID.1 = "000206c200200800029822030febfbff"                                                                 
userCPUID.80000001 = "00000000000000000000000128100800"                                                          
evcCompatibilityMode = "FALSE"                                                                                   
vmotion.checkpointFBSize = "8388608"                                                                             
scsi0:2.fileName = "/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk/sharedisk.vmdk"                  
#iscsi0:2.mode = "persistent"                                                                                    
scsi0:2.ctkEnabled = "false"                                                                                     
scsi0:2.deviceType = "scsi-hardDisk"                                                                             
scsi0:2.present = "true"                                                                                         
scsi0:2.redo = ""                                                                                                
scsil.present="true"                                                                                             
scsil.sharedBus="virtual"                                                                                        
scsil.veritualDev="lsilogic"                                                                                     
scsil:2.mode="independent-persistent"                                                                            
sched.scsil:2.shares="normal"                                                                                    
disk.locking="false"                                                                                             
diskLib.dataCacheMaxSize="0"                                                                                     
diskLib.dataCacheMaxReadAheadSize="0"                                                                            
diskLib.dataCachePageSize="4096"                                                                                 
diskLib.maxUnsyncedWrites="0"
Modify the file on every VM which will use the sharedisk.

 

 

Actually ,you also can use the GUI to finish this:

On the other machine you can add the existing disk into it.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
k should display the current time in hours, minutes, and seconds, and should update every second. Here is an example layout: ``` _______________________ | 12:34:56 | |_______________________| ``` b) To create the digital clock, you can use the `javax.swing.Timer` class to update the time display every second. Here is some sample code to get you started: ```java import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.Timer; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.time.LocalTime; import java.time.format.DateTimeFormatter; public class DigitalClock extends JFrame implements ActionListener { private JLabel timeLabel; public DigitalClock() { // Set up the JFrame super("Digital Clock"); setSize(200, 100); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Set up the time label timeLabel = new JLabel(); timeLabel.setFont(new Font("Arial", Font.BOLD, 24)); add(timeLabel); // Start the timer to update the time display every second Timer timer = new Timer(1000, this); timer.start(); } public void actionPerformed(ActionEvent e) { // Get the current time LocalTime time = LocalTime.now(); // Format the time as HH:mm:ss DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss"); String formattedTime = time.format(formatter); // Update the time label timeLabel.setText(formattedTime); } public static void main(String[] args) { DigitalClock clock = new DigitalClock(); clock.setVisible(true); } } ``` This code creates a `JFrame` with a `JLabel` to display the time. It uses a `javax.swing.Timer` to update the time display every second, and the `java.time` package to get the current time and format it as a string. You can customize the font, size, and position of the time label to match your desired layout.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值