sglee
asked on
How to clone a USB flash drive containing ESXi operating system
Hi,
I have a VMWare box running ESXi V6 and installed ESXi on an external USB flash drive. So everytime I reboot VMWare box, it needs this USB flash drive to load ESXi OS.
How do I create a duplicate USB flash drive just in case it goes bad in the future?
Thanks.
I have a VMWare box running ESXi V6 and installed ESXi on an external USB flash drive. So everytime I reboot VMWare box, it needs this USB flash drive to load ESXi OS.
How do I create a duplicate USB flash drive just in case it goes bad in the future?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And that's why I said, and emphasized, "identical."
and that's why I wrote
and even if you purchase a 16GB flash drive, from the same vendor, we have found that are not the same size, and hence any image will not write correctly. (using those tools specified!).
You cannot tell, when you purchase 2 x Kingston 16GB, the packaging states 16GB, but they vary by a few bits here and there are images are useless!
the image will not write, or will be short write, and ESXi will complain and not BOOT. (it's never been technically supported either, it was a good solution many years ago, but since ESXi moved to GPT, there are many issues!) I even wrote an EE Article once...
How to Backup an ESXi installation on an USB Flash Drive or SD card, for security or redundancy.
and if your configuration changes on the host ESXi USB flash drive, you are going to have to Power Off the server and try and image, Backup and Restore can be down with the server powered up!
and even if you purchase a 16GB flash drive, from the same vendor, we have found that are not the same size, and hence any image will not write correctly. (using those tools specified!).
You cannot tell, when you purchase 2 x Kingston 16GB, the packaging states 16GB, but they vary by a few bits here and there are images are useless!
the image will not write, or will be short write, and ESXi will complain and not BOOT. (it's never been technically supported either, it was a good solution many years ago, but since ESXi moved to GPT, there are many issues!) I even wrote an EE Article once...
How to Backup an ESXi installation on an USB Flash Drive or SD card, for security or redundancy.
and if your configuration changes on the host ESXi USB flash drive, you are going to have to Power Off the server and try and image, Backup and Restore can be down with the server powered up!
ASKER
I will try both suggestions tomorrow and report back.
ASKER
Is it possible to move ESXi OS from an external usb flash drive to a local hard drive?
Is it possible to move ESXi OS from an external usb flash drive to a local hard drive?
it would take you longer that a reinstall!
No.
Why would you ?
ASKER
My experience with USB boot up method has been a mixed one. On the other hand, VMWare servers loading ESX from local HD have never failed so far. Don’t need to create a duplicate USB either.
Just make sure you always have a backup of your ESXi configuration and you'll be fine.
ASKER
How do I backup ESXi configuration?
I posted the details in my firs and opening post! https:#a42502992 !
This is what you should be doing as part of regular Administration!
This is what you should be doing as part of regular Administration!
ASKER
@Dr. Klahn
I tried both USB Image Tool and ImageUSB software and both worked well I thought that USB Image Tool was faster than ImageUSB in both creating a backup and restoring from the backup.
I used 8GB USB Stick and took a long time to backup and restore as it was creating a 8GB image file instead of actual data size which was < 500MB.
If I had used 2GB, that would it have taken less time in backup and restore?
Is 2GB USB stick big enough in a typical configuration of ESXi? When do you ever go beyond 1GB of data?
I tried both USB Image Tool and ImageUSB software and both worked well I thought that USB Image Tool was faster than ImageUSB in both creating a backup and restoring from the backup.
I used 8GB USB Stick and took a long time to backup and restore as it was creating a 8GB image file instead of actual data size which was < 500MB.
If I had used 2GB, that would it have taken less time in backup and restore?
Is 2GB USB stick big enough in a typical configuration of ESXi? When do you ever go beyond 1GB of data?
If you look at specifications VMware still state minimum of 1GB or 2GB to use!
Still quicker to backup and restore ESXi configuration and supported!
If you had used a 2GB stick of course it's quicker less sectors to read and restore!
Less data!
Less data!
Have you booted and used the restored sticks?
ASKER
"Have you booted and used the restored sticks?" --> Yes. Restored USB sticks worked well.
ASKER
"Still quicker to backup and restore ESXi configuration and supported!" --> I know that you provided the script "vicfg-cfgbackup --server=ESXi_host_IP_addr ess --username=root -l backup_file". But where do you run that?
So how does you 8GB image work for a 2GB or 32GB stick if you do not have any 8GB sticks to hand?
You run it from Windows or Vma!
Install the software I linked to!
You run it from Windows or Vma!
Install the software I linked to!
ASKER
@Andrew,
Are you referring to "http://slymsoft.com/esxi-conf-backup/"?
Are you referring to "http://slymsoft.com/esxi-conf-backup/"?
Yes
If you do not like command lines it's a GUI wrapper and you will still need the VMware download
What are you trying to avoid, and now you have a backup USB stick with ESXi, what happens in the future when you change
1. ESXi configuration ?
2. Patch Critical and Security Updates on ESXi ?
Will you shutdown your server, remove the USB stick, and backup again ?
If you do not like command lines it's a GUI wrapper and you will still need the VMware download
What are you trying to avoid, and now you have a backup USB stick with ESXi, what happens in the future when you change
1. ESXi configuration ?
2. Patch Critical and Security Updates on ESXi ?
Will you shutdown your server, remove the USB stick, and backup again ?
ASKER
I downloaded and installed vSphere Configuration Backup 2.1 and enter ESXi host IP address along with password.
When I clicked [SAVE] button, it opened the file in notepad and below is the contents.
Is this what I should expect?
************************** ********** **
#!/usr/bin/perl -w
#
# Copyright 2008 VMware, Inc. All rights reserved.
#
use strict;
use warnings;
use Getopt::Long;
use VMware::VIRuntime;
use VMware::VILib;
use VMware::VIExt;
my %opts = (
vihost => {
alias => "h",
type => "=s",
help => qq! The host to use when connecting via Virtual Center!,
required => 0,
},
);
Opts::add_options(%opts);
Opts::parse();
Util::connect();
my $host_view = VIExt::get_host_view(1, ['config.product.fullName' , 'configManager.storageSyst em']);
print $host_view->{'config.produ ct.fullNam e'};;
Util::disconnect();
************************** ********** **
When I clicked [SAVE] button, it opened the file in notepad and below is the contents.
Is this what I should expect?
**************************
#!/usr/bin/perl -w
#
# Copyright 2008 VMware, Inc. All rights reserved.
#
use strict;
use warnings;
use Getopt::Long;
use VMware::VIRuntime;
use VMware::VILib;
use VMware::VIExt;
my %opts = (
vihost => {
alias => "h",
type => "=s",
help => qq! The host to use when connecting via Virtual Center!,
required => 0,
},
);
Opts::add_options(%opts);
Opts::parse();
Util::connect();
my $host_view = VIExt::get_host_view(1, ['config.product.fullName'
print $host_view->{'config.produ
Util::disconnect();
**************************
You also need to install the components from VMware ?
Please click Settings ?
Please click Settings ?
Okay you are missing a VMware component, the VMware vCLI
https://my.vmware.com/web/vmware/details?downloadGroup=VCLI600&productId=491
make sure you download v6.0!
https://my.vmware.com/web/vmware/details?downloadGroup=VCLI600&productId=491
make sure you download v6.0!
When you enter the FQDN of your ESXi server and hit Save, it should check and login, and tell you the version of ESXi in a pop up
Yes, that's configured now, and it's found the vSphere vCLI you've installed.
did you read any of the notes, guide ?????
did you configure it all ? location of to store backups, settings retention etc
to backup you run vSphere Configuration Backup
did you read any of the notes, guide ?????
did you configure it all ? location of to store backups, settings retention etc
to backup you run vSphere Configuration Backup
ASKER
the tar.gz are your backups to restore!
ASKER
"the tar.gz are your backups to restore!" 00> Got it.
How do I restore this?
In case of duplicate USB sticks, I understand that if one USB stick is corrupted, you can stick in the backup USB stick.
When would I use tar.gz file?
How do I restore this?
In case of duplicate USB sticks, I understand that if one USB stick is corrupted, you can stick in the backup USB stick.
When would I use tar.gz file?
In case of duplicate USB sticks, I understand that if one USB stick is corrupted, you can stick in the backup USB stick.
not supported
it may work...but your backup USB stick is now out of date since you inserted the server USB stick back in the server!
if you've changed your configuration, and patched your ESXi host ? what do you do now ?
So are you not going to patch, update change any configuration on your host now, because your USB stick will be out of date!
e.g. you current host has not been patched for 12 months, and is old, and is behind by at least 7 updates, so how are you going to update your backup flash drive ?
You restore using the details in this URL
https://kb.vmware.com/s/article/2042141
ASKER
"you current host has not been patched for 12 months, and is old, and is behind by at least 7 updates, so how are you going to update your backup flash drive " ---> As I was backing up USB stick, I was thinking the same. Whenever I make any changes to ESXi Host such as adding new VM or change RAM or increase HD size ... etc, now I have to go thru USB stick duplicate process ... that is not good.
So I see the benefit of using vSphere Configuration Backup along with Configuration Manager.
"You restore using the details in this URL" --> So backing up configuration is done thru the menu. However restoring is manual process using CLI command? Is there such a thing as "vSphere Configuration Restore"?
So I see the benefit of using vSphere Configuration Backup along with Configuration Manager.
"You restore using the details in this URL" --> So backing up configuration is done thru the menu. However restoring is manual process using CLI command? Is there such a thing as "vSphere Configuration Restore"?
"you current host has not been patched for 12 months, and is old, and is behind by at least 7 updates, so how are you going to update your backup flash drive " ---> As I was backing up USB stick, I was thinking the same. Whenever I make any changes to ESXi Host such as adding new VM or change RAM or increase HD size ... etc, now I have to go thru USB stick duplicate process ... that is not good.
Correct, you are now thinking, and understanding, that duplication is not as good an idea as it seems!!!
So I see the benefit of using vSphere Configuration Backup along with Configuration Manager.
Hallelujah Amen Brother
"You restore using the details in this URL" --> So backing up configuration is done thru the menu. However restoring is manual process using CLI command? Is there such a thing as "vSphere Configuration Restore"?
I'm afraid not, manual restore using command line.
ASKER
"Hallelujah Amen Brother" ---> LOL! Thanks Brother.
Let me try CLI command this weekend and get back to you.
I just wanted to make sure that I understand when I would perform this restore operation:
Say my original USB stick is corrupted and I don't have a backup usb stick. So I would install the right version of ESXi using CD and install the OS on a new USB stick. Then I run this CLI command to restore tar.gz file?
Let me try CLI command this weekend and get back to you.
I just wanted to make sure that I understand when I would perform this restore operation:
Say my original USB stick is corrupted and I don't have a backup usb stick. So I would install the right version of ESXi using CD and install the OS on a new USB stick. Then I run this CLI command to restore tar.gz file?
I just wanted to make sure that I understand when I would perform this restore operation:
Say my original USB stick is corrupted and I don't have a backup usb stick. So I would install the right version of ESXi using CD and install the OS on a new USB stick. Then I run this CLI command to restore tar.gz file?
Bingo Bongo - yes!
ASKER
Another question.
Whenever I like to duplicate a USB stick, should I turn off ESXi Host completely and pull it out or can I just pull it out while ESXi Host is turned on? The reason for asking is that I have noticed "heavy light blinking" on my USB stick right before it turned itself off. I am wondering if the changes are supposed to be written to USB stick before shutdown or restart...
Whenever I like to duplicate a USB stick, should I turn off ESXi Host completely and pull it out or can I just pull it out while ESXi Host is turned on? The reason for asking is that I have noticed "heavy light blinking" on my USB stick right before it turned itself off. I am wondering if the changes are supposed to be written to USB stick before shutdown or restart...
Whenever I like to duplicate a USB stick, should I turn off ESXi Host completely and pull it out or can I just pull it out while ESXi Host is turned on?
The host must be turned off, ESXi is not designed to have the USB stick removed.
The reason for asking is that I have noticed "heavy light blinking" on my USB stick right before it turned itself off. I am wondering if the changes are supposed to be written to USB stick before shutdown or restart...
there is a schedule which periodically writes to the USB flash drive.
because USB flash drives are not supposed to be written to many times! So ESXi does not do it.
ASKER
I tried to duplicate 4gb USB stick, but the extra 4gb USB stick is bad. So I ended up buying 16gb USB stick. How do I go about duplicating a 4gb USB to a 16 GB USB stick?
How do I go about duplicating a 4gb USB to a 16 GB USB stick?
that is also an issue... it does not work! I did try to tell you cloning USB sticks, is useless!
ASKER
@Andrew,
I downloaded & installed "VMware-vSphere-CLI-5.1.0- 780721.exe (vCLI on Windows) on my Windows 10 PC and opened command prompt and ran the following command to back up a configuration file:
vicfg-cfgbackup.pl --server=192.168.2.101 --username=root -s TEST_ESXi_backup.tgz
However I do not think it created "TEST_ESXi_backup.tgz". instead it opens up vicfg-cfgbackup.pl file in Notepad program.
What am I doing wrong?
I downloaded & installed "VMware-vSphere-CLI-5.1.0-
vicfg-cfgbackup.pl --server=192.168.2.101 --username=root -s TEST_ESXi_backup.tgz
However I do not think it created "TEST_ESXi_backup.tgz". instead it opens up vicfg-cfgbackup.pl file in Notepad program.
What am I doing wrong?
the pl files are not associated with the perl binary, because they've been associated with notepad!
or make sure perl binary is in the path, or use a reference to perl to start the perl script
or make sure perl binary is in the path, or use a reference to perl to start the perl script
ASKER
"the pl files are not associated with the perl binary, because they've been associated with notepad! or make sure perl binary is in the path, or use a reference to perl to start the perl scrip" --> This sounds all foreign to me. Is there a simpler way of doing this?
Simple Windows 10 file associations, you've associate .pl files to notepad.
https://stackoverflow.com/questions/20601270/activeperl-pl-files-no-longer-execute-but-open-in-notepad-instead
https://stackoverflow.com/questions/20601270/activeperl-pl-files-no-longer-execute-but-open-in-notepad-instead